Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11524

hadoop_do_classpath_subcommand throws a shellcheck warning

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: scripts
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

          CLASS=org.apache.hadoop.util.Classpath
          ^-- SC2034: CLASS appears unused. Verify it or export it.
      

      We should probably use a local var here and return it or something, even though CLASS is technically a global.

        Activity

        Hide
        cnauroth Chris Nauroth added a comment -

        This got by me in my last code review. I'll take this and clean it up.

        Show
        cnauroth Chris Nauroth added a comment - This got by me in my last code review. I'll take this and clean it up.
        Hide
        aw Allen Wittenauer added a comment -

        Not a big deal. I should spend some time trying to figure out how to add shellcheck to the test-patch bits.

        Show
        aw Allen Wittenauer added a comment - Not a big deal. I should spend some time trying to figure out how to add shellcheck to the test-patch bits.
        Hide
        cnauroth Chris Nauroth added a comment -

        This patch avoids the warning by asking the caller to pass in the output variable name to receive the class and then eval'ing it. I tested it through the hadoop, hdfs, yarn and mapred entry points. Allen Wittenauer, how does this look?

        Show
        cnauroth Chris Nauroth added a comment - This patch avoids the warning by asking the caller to pass in the output variable name to receive the class and then eval'ing it. I tested it through the hadoop , hdfs , yarn and mapred entry points. Allen Wittenauer , how does this look?
        Hide
        aw Allen Wittenauer added a comment -

        +1 lgtm. Probably a better API this way too.

        Show
        aw Allen Wittenauer added a comment - +1 lgtm. Probably a better API this way too.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12706969/HADOOP-11524.001.patch
        against trunk revision a16bfff.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs:

        org.apache.hadoop.hdfs.server.balancer.TestBalancer
        org.apache.hadoop.hdfs.server.namenode.TestFsck
        org.apache.hadoop.tracing.TestTracing

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5988//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5988//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12706969/HADOOP-11524.001.patch against trunk revision a16bfff. +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The patch failed these unit tests in hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.balancer.TestBalancer org.apache.hadoop.hdfs.server.namenode.TestFsck org.apache.hadoop.tracing.TestTracing Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5988//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5988//console This message is automatically generated.
        Hide
        cnauroth Chris Nauroth added a comment -

        I committed this to trunk. The test warnings are unrelated to any changes in the shell code. Allen, thank you for the code review.

        Show
        cnauroth Chris Nauroth added a comment - I committed this to trunk. The test warnings are unrelated to any changes in the shell code. Allen, thank you for the code review.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #7437 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7437/)
        HADOOP-11524. hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f)

        • hadoop-yarn-project/hadoop-yarn/bin/yarn
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-mapreduce-project/bin/mapred
        • hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7437 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7437/ ) HADOOP-11524 . hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f) hadoop-yarn-project/hadoop-yarn/bin/yarn hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-mapreduce-project/bin/mapred hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs hadoop-common-project/hadoop-common/src/main/bin/hadoop
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #144 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/144/)
        HADOOP-11524. hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f)

        • hadoop-mapreduce-project/bin/mapred
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
        • hadoop-yarn-project/hadoop-yarn/bin/yarn
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #144 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/144/ ) HADOOP-11524 . hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f) hadoop-mapreduce-project/bin/mapred hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/src/main/bin/hadoop hadoop-common-project/hadoop-common/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs hadoop-yarn-project/hadoop-yarn/bin/yarn
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #878 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/878/)
        HADOOP-11524. hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f)

        • hadoop-common-project/hadoop-common/src/main/bin/hadoop
        • hadoop-mapreduce-project/bin/mapred
        • hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-yarn-project/hadoop-yarn/bin/yarn
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #878 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/878/ ) HADOOP-11524 . hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f) hadoop-common-project/hadoop-common/src/main/bin/hadoop hadoop-mapreduce-project/bin/mapred hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-yarn-project/hadoop-yarn/bin/yarn hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #144 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/144/)
        HADOOP-11524. hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f)

        • hadoop-mapreduce-project/bin/mapred
        • hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-yarn-project/hadoop-yarn/bin/yarn
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #144 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/144/ ) HADOOP-11524 . hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f) hadoop-mapreduce-project/bin/mapred hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs hadoop-common-project/hadoop-common/CHANGES.txt hadoop-yarn-project/hadoop-yarn/bin/yarn hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/src/main/bin/hadoop
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2094 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2094/)
        HADOOP-11524. hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f)

        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop
        • hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
        • hadoop-yarn-project/hadoop-yarn/bin/yarn
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-mapreduce-project/bin/mapred
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2094 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2094/ ) HADOOP-11524 . hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f) hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/src/main/bin/hadoop hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs hadoop-yarn-project/hadoop-yarn/bin/yarn hadoop-common-project/hadoop-common/CHANGES.txt hadoop-mapreduce-project/bin/mapred
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2076 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2076/)
        HADOOP-11524. hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f)

        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop
        • hadoop-yarn-project/hadoop-yarn/bin/yarn
        • hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
        • hadoop-mapreduce-project/bin/mapred
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2076 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2076/ ) HADOOP-11524 . hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f) hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/bin/hadoop hadoop-yarn-project/hadoop-yarn/bin/yarn hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs hadoop-mapreduce-project/bin/mapred
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #135 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/135/)
        HADOOP-11524. hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f)

        • hadoop-mapreduce-project/bin/mapred
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop
        • hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
        • hadoop-yarn-project/hadoop-yarn/bin/yarn
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #135 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/135/ ) HADOOP-11524 . hadoop_do_classpath_subcommand throws a shellcheck warning. Contributed by Chris Nauroth. (cnauroth: rev 4528eb9fb2e1a99c985926eacb3450b806ea6b4f) hadoop-mapreduce-project/bin/mapred hadoop-common-project/hadoop-common/src/main/bin/hadoop hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs hadoop-yarn-project/hadoop-yarn/bin/yarn hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/CHANGES.txt

          People

          • Assignee:
            cnauroth Chris Nauroth
            Reporter:
            aw Allen Wittenauer
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development