Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-11304 Migrate to Log4j2 from Log4j 1.x
  3. HIVE-12402

Split hive.root.logger separately to make it compatible with log4j1.x

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Logging

    Description

      With new Log4j2.x specifying logger name and log level together will not work.

      With old logger following will work
      --hiveconf hive.root.logger=DEBUG,console

      But with new logger we should specify logger and level separately
      --hiveconf hive.root.logger=console --hiveconf hive.log.level=DEBUG

      We can do this change internally for users still using the old configs.

      Attachments

        1. HIVE-12402.patch
          2 kB
          Prasanth Jayachandran

        Issue Links

          Activity

            sershe Can you take a look at this patch?

            prasanth_j Prasanth Jayachandran added a comment - sershe Can you take a look at this patch?

            Instead of direct reference to log4j::Level its better to use slf4j api to configure logging for log4j. Thats the whole point of using facade like slf4j.

            ashutoshc Ashutosh Chauhan added a comment - Instead of direct reference to log4j::Level its better to use slf4j api to configure logging for log4j. Thats the whole point of using facade like slf4j.

            It doesn't look like it will correctly deal with hive.root.logger=INFO which IIRC used to be legal. Otherwise looks good

            sershe Sergey Shelukhin added a comment - It doesn't look like it will correctly deal with hive.root.logger=INFO which IIRC used to be legal. Otherwise looks good

            I tried that first but unfortunately there is no Level in sl4j. It just provides api/spi but Level seems to impl specific.

            prasanth_j Prasanth Jayachandran added a comment - I tried that first but unfortunately there is no Level in sl4j. It just provides api/spi but Level seems to impl specific.

            Thats unfortunate. Thanks, for checking.

            ashutoshc Ashutosh Chauhan added a comment - Thats unfortunate. Thanks, for checking.

            I tried branch-1 with just hive.root.logger=DEBUG but it doesn't seem to be doing anything. No debug logs in console or hive.log location. It accepts it but doesn't log anywhere. IMO, we shouldn't encourage that usage.

            prasanth_j Prasanth Jayachandran added a comment - I tried branch-1 with just hive.root.logger=DEBUG but it doesn't seem to be doing anything. No debug logs in console or hive.log location. It accepts it but doesn't log anywhere. IMO, we shouldn't encourage that usage.

            +1

            sershe Sergey Shelukhin added a comment - +1
            hiveqa Hive QA added a comment -

            Here are the results of testing the latest attachment:
            https://issues.apache.org/jira/secure/attachment/12772135/HIVE-12402.patch

            ERROR: -1 due to no test(s) being added or modified.

            ERROR: -1 due to 5 failed/errored test(s), 9767 tests executed
            Failed tests:

            TestHWISessionManager - did not produce a TEST-*.xml file
            TestMiniTezCliDriver-vector_partition_diff_num_cols.q-vectorization_10.q-orc_merge9.q-and-12-more - did not produce a TEST-*.xml file
            org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_cbo_rp_annotate_stats_groupby
            org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_uri_import
            org.apache.hive.jdbc.TestSSL.testSSLVersion
            

            Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/6031/testReport
            Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/6031/console
            Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-6031/

            Messages:

            Executing org.apache.hive.ptest.execution.TestCheckPhase
            Executing org.apache.hive.ptest.execution.PrepPhase
            Executing org.apache.hive.ptest.execution.ExecutionPhase
            Executing org.apache.hive.ptest.execution.ReportingPhase
            Tests exited with: TestsFailedException: 5 tests failed
            

            This message is automatically generated.

            ATTACHMENT ID: 12772135 - PreCommit-HIVE-TRUNK-Build

            hiveqa Hive QA added a comment - Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12772135/HIVE-12402.patch ERROR: -1 due to no test(s) being added or modified. ERROR: -1 due to 5 failed/errored test(s), 9767 tests executed Failed tests: TestHWISessionManager - did not produce a TEST-*.xml file TestMiniTezCliDriver-vector_partition_diff_num_cols.q-vectorization_10.q-orc_merge9.q-and-12-more - did not produce a TEST-*.xml file org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_cbo_rp_annotate_stats_groupby org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_uri_import org.apache.hive.jdbc.TestSSL.testSSLVersion Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/6031/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/6031/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-6031/ Messages: Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 5 tests failed This message is automatically generated. ATTACHMENT ID: 12772135 - PreCommit-HIVE-TRUNK-Build

            Committed to master

            prasanth_j Prasanth Jayachandran added a comment - Committed to master
            leftyl Lefty Leverenz added a comment -

            Doc note: This should be documented in the logging section of Getting Started.

            leftyl Lefty Leverenz added a comment - Doc note: This should be documented in the logging section of Getting Started. Getting Started – Hive Logging

            People

              prasanth_j Prasanth Jayachandran
              prasanth_j Prasanth Jayachandran
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: