Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-5383

Fix findbugs for nodemanager & checkstyle warnings in nodemanager.ContainerExecutor

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.9.0, 3.0.0-alpha1
    • Component/s: nodemanager
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Nodemanager build shows a findbugs warning

      Performance Warnings
      
      Code	Warning
      WMI	org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor.writeLaunchEnv(OutputStream, Map, Map, List, Path, String) makes inefficient use of keySet iterator instead of entrySet iterator
      Bug type WMI_WRONG_MAP_ITERATOR (click for details) 
      In class org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor
      In method org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor.writeLaunchEnv(OutputStream, Map, Map, List, Path, String)
      At ContainerExecutor.java:[line 330]
      
      Details
      
      WMI_WRONG_MAP_ITERATOR: Inefficient use of keySet iterator instead of entrySet iterator
      
      This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.
      

      There are also several checkstyle errors in the same class org.apache.hadoop.yarn.server.nodemanager.ContainerExecutorContainerExecutor

      [ERROR] src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java[308] (indentation) Indentation: 'ContainerLaunch' have incorrect indentation level 6, expected level should be 8.
      [ERROR] src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java[319:29] (whitespace) WhitespaceAfter: ',' is not followed by whitespace.
      [ERROR] src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java[474:52] (coding) HiddenField: 'conf' hides a field.
      [ERROR] src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java[497:52] (coding) HiddenField: 'conf' hides a field.
      [ERROR] src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java[522:52] (coding) HiddenField: 'conf' hides a field.
      [ERROR] src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java[529] (sizes) LineLength: Line is longer than 80 characters (found 81).
      [ERROR] src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java[571:21] (coding) HiddenField: 'conf' hides a field.
      

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-trunk-Commit #10106 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10106/)
        YARN-5383. Fix findbugs and checkstyle issues in ContainerExecutor. (varunsaxena: rev a72cb3825a11830be9ad35ae7ddbf42a3d2892b0)

        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #10106 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10106/ ) YARN-5383 . Fix findbugs and checkstyle issues in ContainerExecutor. (varunsaxena: rev a72cb3825a11830be9ad35ae7ddbf42a3d2892b0) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java
        Hide
        varun_saxena Varun Saxena added a comment -

        Committed to trunk, branch-2.
        Thanks Vrushali C for your contribution and Akira Ajisaka for review.

        Show
        varun_saxena Varun Saxena added a comment - Committed to trunk, branch-2. Thanks Vrushali C for your contribution and Akira Ajisaka for review.
        Hide
        ajisakaa Akira Ajisaka added a comment -

        LGTM, +1.

        Show
        ajisakaa Akira Ajisaka added a comment - LGTM, +1.
        Hide
        varun_saxena Varun Saxena added a comment -

        LGTM. Will commit it later today.

        Show
        varun_saxena Varun Saxena added a comment - LGTM. Will commit it later today.
        Hide
        vrushalic Vrushali C added a comment -

        The findbugs warning shown in red is for trunk, which is exactly what this patch fixes

        Show
        vrushalic Vrushali C added a comment - The findbugs warning shown in red is for trunk, which is exactly what this patch fixes
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 31s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s 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 mvninstall 6m 43s trunk passed
        +1 compile 0m 26s trunk passed
        +1 checkstyle 0m 16s trunk passed
        +1 mvnsite 0m 28s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        -1 findbugs 0m 41s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager in trunk has 1 extant Findbugs warnings.
        +1 javadoc 0m 17s trunk passed
        +1 mvninstall 0m 23s the patch passed
        +1 compile 0m 23s the patch passed
        +1 javac 0m 23s the patch passed
        +1 checkstyle 0m 13s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager: The patch generated 0 new + 0 unchanged - 7 fixed = 0 total (was 7)
        +1 mvnsite 0m 24s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 0m 47s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager generated 0 new + 0 unchanged - 1 fixed = 0 total (was 1)
        +1 javadoc 0m 14s the patch passed
        +1 unit 13m 4s hadoop-yarn-server-nodemanager in the patch passed.
        +1 asflicense 0m 15s The patch does not generate ASF License warnings.
        26m 6s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12818058/YARN-5383.01.patch
        JIRA Issue YARN-5383
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 97a24b319b6c 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / e549a9a
        Default Java 1.8.0_91
        findbugs v3.0.0
        findbugs https://builds.apache.org/job/PreCommit-YARN-Build/12335/artifact/patchprocess/branch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-warnings.html
        Test Results https://builds.apache.org/job/PreCommit-YARN-Build/12335/testReport/
        modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/12335/console
        Powered by Apache Yetus 0.3.0 http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 31s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s 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 mvninstall 6m 43s trunk passed +1 compile 0m 26s trunk passed +1 checkstyle 0m 16s trunk passed +1 mvnsite 0m 28s trunk passed +1 mvneclipse 0m 13s trunk passed -1 findbugs 0m 41s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager in trunk has 1 extant Findbugs warnings. +1 javadoc 0m 17s trunk passed +1 mvninstall 0m 23s the patch passed +1 compile 0m 23s the patch passed +1 javac 0m 23s the patch passed +1 checkstyle 0m 13s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager: The patch generated 0 new + 0 unchanged - 7 fixed = 0 total (was 7) +1 mvnsite 0m 24s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 47s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager generated 0 new + 0 unchanged - 1 fixed = 0 total (was 1) +1 javadoc 0m 14s the patch passed +1 unit 13m 4s hadoop-yarn-server-nodemanager in the patch passed. +1 asflicense 0m 15s The patch does not generate ASF License warnings. 26m 6s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12818058/YARN-5383.01.patch JIRA Issue YARN-5383 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 97a24b319b6c 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / e549a9a Default Java 1.8.0_91 findbugs v3.0.0 findbugs https://builds.apache.org/job/PreCommit-YARN-Build/12335/artifact/patchprocess/branch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-warnings.html Test Results https://builds.apache.org/job/PreCommit-YARN-Build/12335/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager Console output https://builds.apache.org/job/PreCommit-YARN-Build/12335/console Powered by Apache Yetus 0.3.0 http://yetus.apache.org This message was automatically generated.
        Hide
        vrushalic Vrushali C added a comment -

        Uploading patch v1, no extra tests added since the fixes are for findbugs & checkstyle reported issues

        Show
        vrushalic Vrushali C added a comment - Uploading patch v1, no extra tests added since the fixes are for findbugs & checkstyle reported issues

          People

          • Assignee:
            vrushalic Vrushali C
            Reporter:
            vrushalic Vrushali C
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development