Sqoop
  1. Sqoop
  2. SQOOP-672

Unify logger usage across entire code base

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 1.99.3
    • Component/s: None
    • Labels:

      Description

      We should unify same logging classes and logger names across entire code base.

      1. SQOOP-672.txt
        18 kB
        Raghav Kumar Gautam

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          SUCCESS: Integrated in Sqoop2-hadoop100 #483 (See https://builds.apache.org/job/Sqoop2-hadoop100/483/)
          SQOOP-672: Unify logger usage across entire code base (jarcec: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1f016abb93a5e44ee9813ff11753d88553f07370)

          • execution/mapreduce/src/main/java/org/apache/sqoop/job/etl/HdfsExportExtractor.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopMapper.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/ProgressRunnable.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopInputFormat.java
          • connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopDestroyerExecutor.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopFileOutputFormat.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopNullOutputFormat.java
          • server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopReducer.java
          • server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
          • server/src/main/java/org/apache/sqoop/handler/FrameworkRequestHandler.java
          • test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableExportTest.java
          • core/src/main/java/org/apache/sqoop/framework/JobManager.java
          • server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java
          Show
          Hudson added a comment - SUCCESS: Integrated in Sqoop2-hadoop100 #483 (See https://builds.apache.org/job/Sqoop2-hadoop100/483/ ) SQOOP-672 : Unify logger usage across entire code base (jarcec: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1f016abb93a5e44ee9813ff11753d88553f07370 ) execution/mapreduce/src/main/java/org/apache/sqoop/job/etl/HdfsExportExtractor.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopMapper.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/ProgressRunnable.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopInputFormat.java connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopDestroyerExecutor.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopFileOutputFormat.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopNullOutputFormat.java server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopReducer.java server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java server/src/main/java/org/apache/sqoop/handler/FrameworkRequestHandler.java test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableExportTest.java core/src/main/java/org/apache/sqoop/framework/JobManager.java server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java
          Hide
          Hudson added a comment -

          SUCCESS: Integrated in Sqoop2-hadoop200 #461 (See https://builds.apache.org/job/Sqoop2-hadoop200/461/)
          SQOOP-672: Unify logger usage across entire code base (jarcec: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1f016abb93a5e44ee9813ff11753d88553f07370)

          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopDestroyerExecutor.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopMapper.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/ProgressRunnable.java
          • server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/etl/HdfsExportExtractor.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopFileOutputFormat.java
          • server/src/main/java/org/apache/sqoop/handler/FrameworkRequestHandler.java
          • connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java
          • server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
          • core/src/main/java/org/apache/sqoop/framework/JobManager.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopNullOutputFormat.java
          • server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopInputFormat.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopReducer.java
          • test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableExportTest.java
          • execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java
          Show
          Hudson added a comment - SUCCESS: Integrated in Sqoop2-hadoop200 #461 (See https://builds.apache.org/job/Sqoop2-hadoop200/461/ ) SQOOP-672 : Unify logger usage across entire code base (jarcec: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1f016abb93a5e44ee9813ff11753d88553f07370 ) execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopDestroyerExecutor.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopMapper.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/ProgressRunnable.java server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java execution/mapreduce/src/main/java/org/apache/sqoop/job/etl/HdfsExportExtractor.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopFileOutputFormat.java server/src/main/java/org/apache/sqoop/handler/FrameworkRequestHandler.java connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java core/src/main/java/org/apache/sqoop/framework/JobManager.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopNullOutputFormat.java server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopInputFormat.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopReducer.java test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableExportTest.java execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java
          Hide
          Jarek Jarcec Cecho added a comment -

          Thank you Raghav Kumar Gautam for your contribution!

          Show
          Jarek Jarcec Cecho added a comment - Thank you Raghav Kumar Gautam for your contribution!
          Hide
          ASF subversion and git services added a comment -

          Commit 1f016abb93a5e44ee9813ff11753d88553f07370 in branch refs/heads/sqoop2 from Jarek Jarcec Cecho
          [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=1f016ab ]

          SQOOP-672: Unify logger usage across entire code base

          (Raghav Kumar Gautam via Jarek Jarcec Cecho)

          Show
          ASF subversion and git services added a comment - Commit 1f016abb93a5e44ee9813ff11753d88553f07370 in branch refs/heads/sqoop2 from Jarek Jarcec Cecho [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=1f016ab ] SQOOP-672 : Unify logger usage across entire code base (Raghav Kumar Gautam via Jarek Jarcec Cecho)
          Hide
          Sqoop QA bot added a comment -

          Here are the results of testing the latest attachment
          https://issues.apache.org/jira/secure/attachment/12591678/SQOOP-672.txt against branch sqoop2.

          Overall: +1 all checks pass

          SUCCESS: Clean was successful
          SUCCESS: Patch applied correctly
          SUCCESS: Patch compiled
          SUCCESS: All tests passed

          Console output: https://builds.apache.org/job/PreCommit-SQOOP-Build/53/console

          This message is automatically generated.

          Show
          Sqoop QA bot added a comment - Here are the results of testing the latest attachment https://issues.apache.org/jira/secure/attachment/12591678/SQOOP-672.txt against branch sqoop2. Overall: +1 all checks pass SUCCESS: Clean was successful SUCCESS: Patch applied correctly SUCCESS: Patch compiled SUCCESS: All tests passed Console output: https://builds.apache.org/job/PreCommit-SQOOP-Build/53/console This message is automatically generated.
          Hide
          Venkat Ranganathan added a comment -

          Raghav Kumar Gautam - Thanks for offering to take this up

          Show
          Venkat Ranganathan added a comment - Raghav Kumar Gautam - Thanks for offering to take this up
          Hide
          Jarek Jarcec Cecho added a comment -

          Hi Venkat,
          I'm excited to hear that you're interested in solving this issue. I would like to have unified usage of logger in entire Sqoop 2 code base. At the top of my head:

          • Have unified name for logger object across entire code base. I believe that we already have this in place where all logger objects are called "LOG", but it do not hurts to verify that.
          • Use the same logging packages and libraries. We're missing this one as for example:
          core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java
          import org.apache.log4j.Logger;
          ...
            private static final Logger LOG = Logger.getLogger(FrameworkManager.class);
          
          execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopMapper.java
          import org.apache.commons.logging.Log;
          import org.apache.commons.logging.LogFactory;
          ...
            public static final Log LOG =
                LogFactory.getLog(SqoopMapper.class.getName());
          

          Both files are using different packages and different idioms to get the logger object. I would prefer to have that unified.

          Show
          Jarek Jarcec Cecho added a comment - Hi Venkat, I'm excited to hear that you're interested in solving this issue. I would like to have unified usage of logger in entire Sqoop 2 code base. At the top of my head: Have unified name for logger object across entire code base. I believe that we already have this in place where all logger objects are called "LOG", but it do not hurts to verify that. Use the same logging packages and libraries. We're missing this one as for example: core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java import org.apache.log4j.Logger; ... private static final Logger LOG = Logger.getLogger(FrameworkManager.class); execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopMapper.java import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ... public static final Log LOG = LogFactory.getLog(SqoopMapper.class.getName()); Both files are using different packages and different idioms to get the logger object. I would prefer to have that unified.
          Hide
          Venkat Ranganathan added a comment -

          Hi Jarek,

          Can you please let me know at a higher level what needs to be done for this? I can take this up

          Show
          Venkat Ranganathan added a comment - Hi Jarek, Can you please let me know at a higher level what needs to be done for this? I can take this up

            People

            • Assignee:
              Raghav Kumar Gautam
              Reporter:
              Jarek Jarcec Cecho
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development