Details

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

      Description

      [WARNING] /Users/daniel/NetBeansProjects/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/Router.java:[100,45] non-varargs call of varargs method with inexact argument type for last parameter;
        cast to java.lang.Class<?> for a varargs call
        cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
      [WARNING] /Users/daniel/NetBeansProjects/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java:[62,46] non-varargs call of varargs method with inexact argument type for last parameter;
        cast to java.lang.Class<?> for a varargs call
        cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
      [WARNING] /Users/daniel/NetBeansProjects/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java:[64,34] non-varargs call of varargs method with inexact argument type for last parameter;
        cast to java.lang.Object for a varargs call
        cast to java.lang.Object[] for a non-varargs call and to suppress this warning
      
      1. YARN-4366.001.patch
        2 kB
        Daniel Templeton

        Activity

        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 12m 5s docker + precommit patch detected.
        +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 7m 40s trunk passed
        +1 compile 0m 23s trunk passed with JDK v1.8.0_66
        +1 compile 0m 28s trunk passed with JDK v1.7.0_85
        +1 checkstyle 0m 14s trunk passed
        +1 mvnsite 0m 34s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        -1 findbugs 1m 19s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common in trunk has 3 extant Findbugs warnings.
        +1 javadoc 0m 28s trunk passed with JDK v1.8.0_66
        +1 javadoc 0m 33s trunk passed with JDK v1.7.0_85
        +1 mvninstall 0m 29s the patch passed
        +1 compile 0m 23s the patch passed with JDK v1.8.0_66
        +1 javac 0m 23s the patch passed
        +1 compile 0m 28s the patch passed with JDK v1.7.0_85
        +1 javac 0m 28s the patch passed
        +1 checkstyle 0m 15s the patch passed
        +1 mvnsite 0m 32s the patch passed
        +1 mvneclipse 0m 12s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 28s the patch passed
        +1 javadoc 0m 28s the patch passed with JDK v1.8.0_66
        +1 javadoc 0m 34s the patch passed with JDK v1.7.0_85
        +1 unit 1m 52s hadoop-yarn-common in the patch passed with JDK v1.8.0_66.
        +1 unit 2m 6s hadoop-yarn-common in the patch passed with JDK v1.7.0_85.
        +1 asflicense 0m 24s Patch does not generate ASF License warnings.
        34m 2s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:date2015-11-17
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12772862/YARN-4366.001.patch
        JIRA Issue YARN-4366
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux b7349bfccb3c 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 /home/jenkins/jenkins-slave/workspace/PreCommit-YARN-Build/patchprocess/apache-yetus-3f4279a/precommit/personality/hadoop.sh
        git revision trunk / dfbde3f
        findbugs v3.0.0
        findbugs https://builds.apache.org/job/PreCommit-YARN-Build/9714/artifact/patchprocess/branch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-warnings.html
        JDK v1.7.0_85 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9714/testReport/
        modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common
        Max memory used 77MB
        Powered by Apache Yetus http://yetus.apache.org
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/9714/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 12m 5s docker + precommit patch detected. +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 7m 40s trunk passed +1 compile 0m 23s trunk passed with JDK v1.8.0_66 +1 compile 0m 28s trunk passed with JDK v1.7.0_85 +1 checkstyle 0m 14s trunk passed +1 mvnsite 0m 34s trunk passed +1 mvneclipse 0m 12s trunk passed -1 findbugs 1m 19s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common in trunk has 3 extant Findbugs warnings. +1 javadoc 0m 28s trunk passed with JDK v1.8.0_66 +1 javadoc 0m 33s trunk passed with JDK v1.7.0_85 +1 mvninstall 0m 29s the patch passed +1 compile 0m 23s the patch passed with JDK v1.8.0_66 +1 javac 0m 23s the patch passed +1 compile 0m 28s the patch passed with JDK v1.7.0_85 +1 javac 0m 28s the patch passed +1 checkstyle 0m 15s the patch passed +1 mvnsite 0m 32s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 28s the patch passed +1 javadoc 0m 28s the patch passed with JDK v1.8.0_66 +1 javadoc 0m 34s the patch passed with JDK v1.7.0_85 +1 unit 1m 52s hadoop-yarn-common in the patch passed with JDK v1.8.0_66. +1 unit 2m 6s hadoop-yarn-common in the patch passed with JDK v1.7.0_85. +1 asflicense 0m 24s Patch does not generate ASF License warnings. 34m 2s Subsystem Report/Notes Docker Image:yetus/hadoop:date2015-11-17 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12772862/YARN-4366.001.patch JIRA Issue YARN-4366 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux b7349bfccb3c 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 /home/jenkins/jenkins-slave/workspace/PreCommit-YARN-Build/patchprocess/apache-yetus-3f4279a/precommit/personality/hadoop.sh git revision trunk / dfbde3f findbugs v3.0.0 findbugs https://builds.apache.org/job/PreCommit-YARN-Build/9714/artifact/patchprocess/branch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-warnings.html JDK v1.7.0_85 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9714/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common Max memory used 77MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-YARN-Build/9714/console This message was automatically generated.
        Hide
        templedf Daniel Templeton added a comment -

        There are no new tests because there is no behavior change.

        Show
        templedf Daniel Templeton added a comment - There are no new tests because there is no behavior change.
        Hide
        rkanter Robert Kanter added a comment -

        We should verify that this doesn't break anything. As explained in this StackOverflow, there's a difference between something like cls.getMethod(action, null); and something like cls.getMethod(action);. The latter constructs an empty array while the former is ambiguous if it passes a single null instance or an array with a single null element (hence the warning).

        Unfortunately, besides being reflection, the code is very generic, so it's not straightforward to track down what it's being called on and what those expect here.

        Show
        rkanter Robert Kanter added a comment - We should verify that this doesn't break anything. As explained in this StackOverflow , there's a difference between something like cls.getMethod(action, null); and something like cls.getMethod(action); . The latter constructs an empty array while the former is ambiguous if it passes a single null instance or an array with a single null element (hence the warning). Unfortunately, besides being reflection, the code is very generic, so it's not straightforward to track down what it's being called on and what those expect here.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 13s 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 59s trunk passed
        +1 compile 0m 27s trunk passed with JDK v1.8.0_77
        +1 compile 0m 25s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 18s trunk passed
        +1 mvnsite 0m 30s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        +1 findbugs 1m 13s trunk passed
        +1 javadoc 0m 28s trunk passed with JDK v1.8.0_77
        +1 javadoc 0m 32s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 27s the patch passed
        +1 compile 0m 21s the patch passed with JDK v1.8.0_77
        +1 javac 0m 21s the patch passed
        +1 compile 0m 24s the patch passed with JDK v1.7.0_95
        +1 javac 0m 24s the patch passed
        +1 checkstyle 0m 16s the patch passed
        +1 mvnsite 0m 29s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 21s the patch passed
        +1 javadoc 0m 26s the patch passed with JDK v1.8.0_77
        +1 javadoc 0m 30s the patch passed with JDK v1.7.0_95
        +1 unit 1m 59s hadoop-yarn-common in the patch passed with JDK v1.8.0_77.
        +1 unit 2m 12s hadoop-yarn-common in the patch passed with JDK v1.7.0_95.
        +1 asflicense 0m 20s Patch does not generate ASF License warnings.
        21m 11s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:fbe3e86
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12772862/YARN-4366.001.patch
        JIRA Issue YARN-4366
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 4e74a152a4fb 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 / 35f0770
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_77 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/11058/testReport/
        modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/11058/console
        Powered by Apache Yetus 0.2.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 13s 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 59s trunk passed +1 compile 0m 27s trunk passed with JDK v1.8.0_77 +1 compile 0m 25s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 18s trunk passed +1 mvnsite 0m 30s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 13s trunk passed +1 javadoc 0m 28s trunk passed with JDK v1.8.0_77 +1 javadoc 0m 32s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 27s the patch passed +1 compile 0m 21s the patch passed with JDK v1.8.0_77 +1 javac 0m 21s the patch passed +1 compile 0m 24s the patch passed with JDK v1.7.0_95 +1 javac 0m 24s the patch passed +1 checkstyle 0m 16s the patch passed +1 mvnsite 0m 29s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 21s the patch passed +1 javadoc 0m 26s the patch passed with JDK v1.8.0_77 +1 javadoc 0m 30s the patch passed with JDK v1.7.0_95 +1 unit 1m 59s hadoop-yarn-common in the patch passed with JDK v1.8.0_77. +1 unit 2m 12s hadoop-yarn-common in the patch passed with JDK v1.7.0_95. +1 asflicense 0m 20s Patch does not generate ASF License warnings. 21m 11s Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12772862/YARN-4366.001.patch JIRA Issue YARN-4366 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 4e74a152a4fb 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 / 35f0770 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_77 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/11058/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common Console output https://builds.apache.org/job/PreCommit-YARN-Build/11058/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        templedf Daniel Templeton added a comment -

        It's ambiguous, but not nondeterministic. If you pass null as a vararg parameter, you will receive a null array in the method. For the getMethod() method, the explicitly stated behavior is that if you pass null for the vararg parameter, it's the same as passing an empty array. If you need further proof of the safeness of this change, consider for a second what it would mean to call getMethod() with a type array that contains a single null (the other possible interpretation of the existing code). It won't match anything, because there is no such thing as a null-typed parameter. (It doesn't even match a Void parameter.) The obviously intended behavior was to pass an empty array.

        Show
        templedf Daniel Templeton added a comment - It's ambiguous, but not nondeterministic. If you pass null as a vararg parameter, you will receive a null array in the method. For the getMethod() method, the explicitly stated behavior is that if you pass null for the vararg parameter, it's the same as passing an empty array. If you need further proof of the safeness of this change, consider for a second what it would mean to call getMethod() with a type array that contains a single null (the other possible interpretation of the existing code). It won't match anything, because there is no such thing as a null-typed parameter. (It doesn't even match a Void parameter.) The obviously intended behavior was to pass an empty array.
        Hide
        rkanter Robert Kanter added a comment -

        +1

        Show
        rkanter Robert Kanter added a comment - +1
        Hide
        rkanter Robert Kanter added a comment -

        Thanks Daniel Templeton. Committed to trunk and branch-2!

        Show
        rkanter Robert Kanter added a comment - Thanks Daniel Templeton . Committed to trunk and branch-2!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-trunk-Commit #10081 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10081/)
        YARN-4366. Fix Lint Warnings in YARN Common (templedf via rkanter) (rkanter: rev bf6f4a3b980a07d0b268eeb984a649a362877734)

        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/Router.java
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #10081 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10081/ ) YARN-4366 . Fix Lint Warnings in YARN Common (templedf via rkanter) (rkanter: rev bf6f4a3b980a07d0b268eeb984a649a362877734) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/Router.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java

          People

          • Assignee:
            templedf Daniel Templeton
            Reporter:
            templedf Daniel Templeton
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development