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

AllocationFileLoaderService.reloadAllocations() should use the diamond operator

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha4
    • Fix Version/s: 3.0.0-beta1
    • Component/s: fairscheduler
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      Here:

          for (FSQueueType queueType : FSQueueType.values()) {
            configuredQueues.put(queueType, new HashSet<String>());
          }

      and here:

          List<Element> queueElements = new ArrayList<Element>();

        Issue Links

          Activity

          Hide
          LarryLo Larry Lo added a comment -

          Cool, really appreciate it.

          Show
          LarryLo Larry Lo added a comment - Cool, really appreciate it.
          Hide
          templedf Daniel Templeton added a comment -

          Not really. The problem is that Java 7 is not as capable as Java 8 at type inference. Don't worry about it, though. The patch is still committed to trunk, which is what matters.

          Show
          templedf Daniel Templeton added a comment - Not really. The problem is that Java 7 is not as capable as Java 8 at type inference. Don't worry about it, though. The patch is still committed to trunk, which is what matters.
          Hide
          LarryLo Larry Lo added a comment -

          Is there anything I can do to fix it ?

          Show
          LarryLo Larry Lo added a comment - Is there anything I can do to fix it ?
          Hide
          templedf Daniel Templeton added a comment -

          Reverted from branch-2. It was breaking the build.

          Show
          templedf Daniel Templeton added a comment - Reverted from branch-2. It was breaking the build.
          Hide
          yufeigu Yufei Gu added a comment -

          This seems break branch-2.

          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project hadoop-yarn-server-resourcemanager: Compilation failure
          [ERROR] /Users/yufei.gu/asf/branch2-4backport/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationFileLoaderService.java:[270,39] incompatible types: java.util.HashSet<java.lang.Object> cannot be converted to java.util.Set<java.lang.String>
          
          Show
          yufeigu Yufei Gu added a comment - This seems break branch-2. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile ( default -compile) on project hadoop-yarn-server-resourcemanager: Compilation failure [ERROR] /Users/yufei.gu/asf/branch2-4backport/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationFileLoaderService.java:[270,39] incompatible types: java.util.HashSet<java.lang. Object > cannot be converted to java.util.Set<java.lang. String >
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12171 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12171/)
          YARN-6882. AllocationFileLoaderService.reloadAllocations() should use (templedf: rev 0996acde6c325667aa19ae0740eb6b40bf4a682a)

          • (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationFileLoaderService.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12171 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12171/ ) YARN-6882 . AllocationFileLoaderService.reloadAllocations() should use (templedf: rev 0996acde6c325667aa19ae0740eb6b40bf4a682a) (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationFileLoaderService.java
          Hide
          templedf Daniel Templeton added a comment -

          Thanks for the patch, Larry Lo. Committed to trunk and branch-2.

          Show
          templedf Daniel Templeton added a comment - Thanks for the patch, Larry Lo . Committed to trunk and branch-2.
          Hide
          templedf Daniel Templeton added a comment -

          Those are known flakey tests.

          Show
          templedf Daniel Templeton added a comment - Those are known flakey tests.
          Hide
          LarryLo Larry Lo added a comment -

          Hi, Daniel Templeton. It looks like not all unit tests passed.
          I have no idea why the minor changes cause this problem.
          Could you give me some suggestions to fix it ?

          Show
          LarryLo Larry Lo added a comment - Hi, Daniel Templeton . It looks like not all unit tests passed. I have no idea why the minor changes cause this problem. Could you give me some suggestions to fix it ?
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 17s Docker mode activated.
                Prechecks
          +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.
                trunk Compile Tests
          +1 mvninstall 13m 38s trunk passed
          +1 compile 0m 31s trunk passed
          +1 checkstyle 0m 22s trunk passed
          +1 mvnsite 0m 34s trunk passed
          +1 findbugs 0m 56s trunk passed
          +1 javadoc 0m 19s trunk passed
                Patch Compile Tests
          +1 mvninstall 0m 28s the patch passed
          +1 compile 0m 28s the patch passed
          +1 javac 0m 28s the patch passed
          +1 checkstyle 0m 22s the patch passed
          +1 mvnsite 0m 31s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 6s the patch passed
          +1 javadoc 0m 16s the patch passed
                Other Tests
          -1 unit 44m 21s hadoop-yarn-server-resourcemanager in the patch failed.
          +1 asflicense 0m 12s The patch does not generate ASF License warnings.
          65m 34s



          Reason Tests
          Failed junit tests hadoop.yarn.server.resourcemanager.monitor.TestSchedulingMonitor
            hadoop.yarn.server.resourcemanager.scheduler.fair.TestFSAppStarvation
            hadoop.yarn.server.resourcemanager.TestRMEmbeddedElector



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue YARN-6882
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12881288/YARN-6882.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 719829fd1018 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 312e57b
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          unit https://builds.apache.org/job/PreCommit-YARN-Build/16831/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/16831/testReport/
          modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/16831/console
          Powered by Apache Yetus 0.6.0-SNAPSHOT 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 17s Docker mode activated.       Prechecks +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.       trunk Compile Tests +1 mvninstall 13m 38s trunk passed +1 compile 0m 31s trunk passed +1 checkstyle 0m 22s trunk passed +1 mvnsite 0m 34s trunk passed +1 findbugs 0m 56s trunk passed +1 javadoc 0m 19s trunk passed       Patch Compile Tests +1 mvninstall 0m 28s the patch passed +1 compile 0m 28s the patch passed +1 javac 0m 28s the patch passed +1 checkstyle 0m 22s the patch passed +1 mvnsite 0m 31s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 6s the patch passed +1 javadoc 0m 16s the patch passed       Other Tests -1 unit 44m 21s hadoop-yarn-server-resourcemanager in the patch failed. +1 asflicense 0m 12s The patch does not generate ASF License warnings. 65m 34s Reason Tests Failed junit tests hadoop.yarn.server.resourcemanager.monitor.TestSchedulingMonitor   hadoop.yarn.server.resourcemanager.scheduler.fair.TestFSAppStarvation   hadoop.yarn.server.resourcemanager.TestRMEmbeddedElector Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue YARN-6882 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12881288/YARN-6882.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 719829fd1018 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 312e57b Default Java 1.8.0_131 findbugs v3.1.0-RC1 unit https://builds.apache.org/job/PreCommit-YARN-Build/16831/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/16831/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager Console output https://builds.apache.org/job/PreCommit-YARN-Build/16831/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          templedf Daniel Templeton added a comment -

          LGTM +1

          Show
          templedf Daniel Templeton added a comment - LGTM +1
          Hide
          LarryLo Larry Lo added a comment -

          Please help to review this patch, thanks.

          Show
          LarryLo Larry Lo added a comment - Please help to review this patch, thanks.
          Hide
          LarryLo Larry Lo added a comment -

          Thanks to Daniel for filling this form, I would like to take this task, thanks!

          Show
          LarryLo Larry Lo added a comment - Thanks to Daniel for filling this form, I would like to take this task, thanks!

            People

            • Assignee:
              LarryLo Larry Lo
              Reporter:
              templedf Daniel Templeton
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development