Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13032

Hive services need HADOOP_CLIENT_OPTS for proper log4j2 initialization

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.1.0
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      HIVE-12497 removed HADOOP_CLIENT_OPTS as it slowed down cli launch time. But it leads to log4j2 not being initialized when using services other than CLI. Other services like metastore, schematool etc. rely on log4j to initialize the logging based on the presence of log4j2.properties file in the classpath. If we use the standard name for log4j configuration file (log4j2.properties) then automatic initialization will happen. If not, we have to tell log4j to look for specific properties file. This is done via -Dlog4j.configurationFile system property. If we pass this system property via HADOOP_CLIENT_OPTS then all hive services will have logging initialized properly.

      In HIVE-12497, the problem was we had HADOOP_CLIENT_OPTS at the top of the script. As a result, hadoop and hbase commands tries to initialize logging which took long time slowing down the startup time.

        Attachments

        1. HIVE-13032.1.patch
          0.4 kB
          Prasanth Jayachandran
        2. HIVE-13032.2.patch
          0.8 kB
          Prasanth Jayachandran

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              prasanth_j Prasanth Jayachandran Assign to me
              Reporter:
              prasanth_j Prasanth Jayachandran

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment