You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/04/23 02:54:38 UTC

[GitHub] [hadoop] belugabehr opened a new pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

belugabehr opened a new pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974


   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] hadoop-yetus commented on issue #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
hadoop-yetus commented on issue #1974:
URL: https://github.com/apache/hadoop/pull/1974#issuecomment-618496312


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  8s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | -1 :x: |  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 :green_heart: |  mvninstall  |  22m 14s |  trunk passed  |
   | -1 :x: |  compile  |  18m 34s |  root in trunk failed.  |
   | +1 :green_heart: |  checkstyle  |   0m 49s |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 23s |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  18m  0s |  branch has no errors when building and testing our client artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 54s |  trunk passed  |
   | +0 :ok: |  spotbugs  |   2m  9s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |   2m  7s |  trunk passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 51s |  the patch passed  |
   | -1 :x: |  compile  |  17m 11s |  root in the patch failed.  |
   | -1 :x: |  javac  |  17m 11s |  root in the patch failed.  |
   | -0 :warning: |  checkstyle  |   0m 48s |  hadoop-common-project/hadoop-common: The patch generated 1 new + 326 unchanged - 3 fixed = 327 total (was 329)  |
   | +1 :green_heart: |  mvnsite  |   1m 25s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  shadedclient  |  15m 27s |  patch has no errors when building and testing our client artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 53s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |   2m 16s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   9m  8s |  hadoop-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 45s |  The patch does not generate ASF License warnings.  |
   |  |   | 114m 57s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/2/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/1974 |
   | JIRA Issue | HADOOP-17009 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle |
   | uname | Linux 98e69cbf294c 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | personality/hadoop.sh |
   | git revision | trunk / 459eb2a |
   | Default Java | Private Build-1.8.0_252-8u252-b09-1~16.04-b09 |
   | compile | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/2/artifact/out/branch-compile-root.txt |
   | compile | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/2/artifact/out/patch-compile-root.txt |
   | javac | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/2/artifact/out/patch-compile-root.txt |
   | checkstyle | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/2/artifact/out/diff-checkstyle-hadoop-common-project_hadoop-common.txt |
   |  Test Results | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/2/testReport/ |
   | Max. process+thread count | 2763 (vs. ulimit of 5500) |
   | modules | C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common |
   | Console output | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/2/console |
   | versions | git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] hadoop-yetus commented on issue #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
hadoop-yetus commented on issue #1974:
URL: https://github.com/apache/hadoop/pull/1974#issuecomment-618190862


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |  29m 12s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  No case conflicting files found.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | -1 :x: |  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 :green_heart: |  mvninstall  |  21m 49s |  trunk passed  |
   | -1 :x: |  compile  |  17m 59s |  root in trunk failed.  |
   | +1 :green_heart: |  checkstyle  |   0m 49s |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 23s |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  18m 12s |  branch has no errors when building and testing our client artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 55s |  trunk passed  |
   | +0 :ok: |  spotbugs  |   2m  9s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |   2m  5s |  trunk passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 52s |  the patch passed  |
   | -1 :x: |  compile  |  17m 22s |  root in the patch failed.  |
   | -1 :x: |  javac  |  17m 22s |  root in the patch failed.  |
   | -0 :warning: |  checkstyle  |   0m 48s |  hadoop-common-project/hadoop-common: The patch generated 4 new + 326 unchanged - 3 fixed = 330 total (was 329)  |
   | +1 :green_heart: |  mvnsite  |   1m 23s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  shadedclient  |  15m 30s |  patch has no errors when building and testing our client artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 54s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |   2m 15s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  |   9m  9s |  hadoop-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 46s |  The patch does not generate ASF License warnings.  |
   |  |   | 142m 26s |   |
   
   
   | Reason | Tests |
   |-------:|:------|
   | Failed junit tests | hadoop.security.TestRaceWhenRelogin |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/1/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/1974 |
   | JIRA Issue | HADOOP-17009 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle |
   | uname | Linux 7c4575a5fc62 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | personality/hadoop.sh |
   | git revision | trunk / 5958af4 |
   | Default Java | Private Build-1.8.0_252-8u252-b09-1~16.04-b09 |
   | compile | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/1/artifact/out/branch-compile-root.txt |
   | compile | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/1/artifact/out/patch-compile-root.txt |
   | javac | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/1/artifact/out/patch-compile-root.txt |
   | checkstyle | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/1/artifact/out/diff-checkstyle-hadoop-common-project_hadoop-common.txt |
   | unit | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/1/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt |
   |  Test Results | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/1/testReport/ |
   | Max. process+thread count | 1385 (vs. ulimit of 5500) |
   | modules | C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common |
   | Console output | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/1/console |
   | versions | git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] goiri merged pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
goiri merged pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] hadoop-yetus commented on pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
hadoop-yetus commented on pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#issuecomment-618661444


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  5s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  No case conflicting files found.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | -1 :x: |  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 :green_heart: |  mvninstall  |  21m 24s |  trunk passed  |
   | -1 :x: |  compile  |  18m  1s |  root in trunk failed.  |
   | +1 :green_heart: |  checkstyle  |   0m 49s |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 21s |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  17m 59s |  branch has no errors when building and testing our client artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 55s |  trunk passed  |
   | +0 :ok: |  spotbugs  |   2m  8s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |   2m  5s |  trunk passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 51s |  the patch passed  |
   | -1 :x: |  compile  |  17m 21s |  root in the patch failed.  |
   | -1 :x: |  javac  |  17m 21s |  root in the patch failed.  |
   | -0 :warning: |  checkstyle  |   0m 48s |  hadoop-common-project/hadoop-common: The patch generated 1 new + 326 unchanged - 3 fixed = 327 total (was 329)  |
   | +1 :green_heart: |  mvnsite  |   1m 23s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  shadedclient  |  15m 15s |  patch has no errors when building and testing our client artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 56s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |   2m 15s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   9m 10s |  hadoop-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 45s |  The patch does not generate ASF License warnings.  |
   |  |   | 113m 29s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/3/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/1974 |
   | JIRA Issue | HADOOP-17009 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle |
   | uname | Linux eace52f3e6a4 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | personality/hadoop.sh |
   | git revision | trunk / 459eb2a |
   | Default Java | Private Build-1.8.0_252-8u252-b09-1~16.04-b09 |
   | compile | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/3/artifact/out/branch-compile-root.txt |
   | compile | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/3/artifact/out/patch-compile-root.txt |
   | javac | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/3/artifact/out/patch-compile-root.txt |
   | checkstyle | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/3/artifact/out/diff-checkstyle-hadoop-common-project_hadoop-common.txt |
   |  Test Results | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/3/testReport/ |
   | Max. process+thread count | 3230 (vs. ulimit of 5500) |
   | modules | C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common |
   | Console output | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/3/console |
   | versions | git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] goiri commented on pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
goiri commented on pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#issuecomment-646770849


   @Cosss7 thanks for the review.
   Merged.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] goiri commented on a change in pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
goiri commented on a change in pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#discussion_r415103835



##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
##########
@@ -196,10 +196,8 @@ protected Node getNodeForNetworkLocation(Node node) {
         loc = loc.substring(1);
       }
       InnerNode rack = (InnerNode) clusterMap.getLoc(loc);
-      if (rack == null) {
-        return null;
-      }
-      return new ArrayList<Node>(rack.getChildren());
+      return (rack == null) ? Collections.emptyList()

Review comment:
       Why can we use unmodifiable here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] Cosss7 commented on pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
Cosss7 commented on pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#issuecomment-646585702


   @goiri I'm not commiter but the patch LGTM.
   +1


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] hadoop-yetus commented on pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
hadoop-yetus commented on pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#issuecomment-620072129


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 44s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | -1 :x: |  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 :green_heart: |  mvninstall  |  19m 55s |  trunk passed  |
   | +1 :green_heart: |  compile  |  17m 18s |  trunk passed  |
   | +1 :green_heart: |  checkstyle  |   1m  1s |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 30s |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  16m 53s |  branch has no errors when building and testing our client artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m  4s |  trunk passed  |
   | +0 :ok: |  spotbugs  |   2m 13s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |   2m 11s |  trunk passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 52s |  the patch passed  |
   | +1 :green_heart: |  compile  |  16m 31s |  the patch passed  |
   | +1 :green_heart: |  javac  |  16m 31s |  the patch passed  |
   | -0 :warning: |  checkstyle  |   0m 59s |  hadoop-common-project/hadoop-common: The patch generated 1 new + 326 unchanged - 3 fixed = 327 total (was 329)  |
   | +1 :green_heart: |  mvnsite  |   1m 28s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  shadedclient  |  14m  8s |  patch has no errors when building and testing our client artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m  7s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |   2m 14s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  |   9m 17s |  hadoop-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 54s |  The patch does not generate ASF License warnings.  |
   |  |   | 109m 20s |   |
   
   
   | Reason | Tests |
   |-------:|:------|
   | Failed junit tests | hadoop.fs.ftp.TestFTPFileSystem |
   |   | hadoop.metrics2.source.TestJvmMetrics |
   |   | hadoop.io.compress.snappy.TestSnappyCompressorDecompressor |
   |   | hadoop.security.token.delegation.TestZKDelegationTokenSecretManager |
   |   | hadoop.io.compress.TestCompressorDecompressor |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/4/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/1974 |
   | JIRA Issue | HADOOP-17009 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle |
   | uname | Linux fca82cb31ab0 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | personality/hadoop.sh |
   | git revision | trunk / 18d7dfbf355 |
   | Default Java | Private Build-1.8.0_252-8u252-b09-1~18.04-b09 |
   | checkstyle | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/4/artifact/out/diff-checkstyle-hadoop-common-project_hadoop-common.txt |
   | unit | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/4/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt |
   |  Test Results | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/4/testReport/ |
   | Max. process+thread count | 1975 (vs. ulimit of 5500) |
   | modules | C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common |
   | Console output | https://builds.apache.org/job/hadoop-multibranch/job/PR-1974/4/console |
   | versions | git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] Cosss7 commented on pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
Cosss7 commented on pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#issuecomment-641879709


   Hi~ @goiri 
   It looks like you have approved the PR. Why don't you merge it ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] goiri commented on pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
goiri commented on pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#issuecomment-646302044


   I wanted to give others a chance to comment.
   @Cosss7 any thoughts?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] goiri commented on a change in pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
goiri commented on a change in pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#discussion_r414009203



##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/CompositeGroupsMapping.java
##########
@@ -78,15 +79,13 @@
             user, provider.getClass().getSimpleName(), e.toString());
         LOG.debug("Stacktrace: ", e);
       }        
-      if (groups != null && ! groups.isEmpty()) {
+      if (!groups.isEmpty()) {
         groupSet.addAll(groups);
         if (!combined) break;
       }
     }
 
-    List<String> results = new ArrayList<String>(groupSet.size());
-    results.addAll(groupSet);
-    return results;
+    return Collections.unmodifiableList(new ArrayList<>(groupSet));

Review comment:
       Now, somebody calling getGroups() would start failing if it was adding new things to the list while that was not the case before. I've tried using inmodifiable before but is kind of dangerous.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] belugabehr commented on a change in pull request #1974: HADOOP-17009: Embrace Immutability of Java Collections

Posted by GitBox <gi...@apache.org>.
belugabehr commented on a change in pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#discussion_r415831875



##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
##########
@@ -196,10 +196,8 @@ protected Node getNodeForNetworkLocation(Node node) {
         loc = loc.substring(1);
       }
       InnerNode rack = (InnerNode) clusterMap.getLoc(loc);
-      if (rack == null) {
-        return null;
-      }
-      return new ArrayList<Node>(rack.getChildren());
+      return (rack == null) ? Collections.emptyList()

Review comment:
       Ya, I guess we probably shouldn't.  My thinking wsa "
   
   - Returning null is usually a bad idea, return Collections.emptyList()
   - Collections.emptyList() is immutable
   - To make the method consistent, the list of racks should be immutable too.
   
   I will revert this to return an emptyList (new ArrayList<>(0))




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org