[ https://issues.apache.org/jira/browse/HDFS-17098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17854465#comment-17854465 ]
ASF GitHub Bot commented on HDFS-17098: --------------------------------------- hadoop-yetus commented on PR #6840: URL: https://github.com/apache/hadoop/pull/6840#issuecomment-2163304972 :broken_heart: **-1 overall** | Vote | Subsystem | Runtime | Logfile | Comment | |:----:|----------:|--------:|:--------:|:-------:| | +0 :ok: | reexec | 0m 21s | | Docker mode activated. | |||| _ Prechecks _ | | +1 :green_heart: | dupname | 0m 0s | | No case conflicting files found. | | +0 :ok: | codespell | 0m 0s | | codespell was not available. | | +0 :ok: | detsecrets | 0m 0s | | detect-secrets was not available. | | +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 | 32m 27s | | trunk passed | | +1 :green_heart: | compile | 0m 42s | | trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 | | +1 :green_heart: | compile | 0m 37s | | trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08 | | +1 :green_heart: | checkstyle | 0m 40s | | trunk passed | | +1 :green_heart: | mvnsite | 0m 42s | | trunk passed | | +1 :green_heart: | javadoc | 0m 40s | | trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 | | +1 :green_heart: | javadoc | 1m 5s | | trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08 | | +1 :green_heart: | spotbugs | 1m 43s | | trunk passed | | +1 :green_heart: | shadedclient | 20m 42s | | branch has no errors when building and testing our client artifacts. | |||| _ Patch Compile Tests _ | | +1 :green_heart: | mvninstall | 0m 37s | | the patch passed | | +1 :green_heart: | compile | 0m 36s | | the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 | | +1 :green_heart: | javac | 0m 36s | | the patch passed | | +1 :green_heart: | compile | 0m 32s | | the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08 | | +1 :green_heart: | javac | 0m 32s | | the patch passed | | +1 :green_heart: | blanks | 0m 0s | | The patch has no blanks issues. | | +1 :green_heart: | checkstyle | 0m 28s | | the patch passed | | +1 :green_heart: | mvnsite | 0m 37s | | the patch passed | | +1 :green_heart: | javadoc | 0m 30s | | the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 | | +1 :green_heart: | javadoc | 1m 1s | | the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08 | | +1 :green_heart: | spotbugs | 1m 38s | | the patch passed | | +1 :green_heart: | shadedclient | 20m 42s | | patch has no errors when building and testing our client artifacts. | |||| _ Other Tests _ | | -1 :x: | unit | 211m 8s | [/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6840/4/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt) | hadoop-hdfs in the patch passed. | | +1 :green_heart: | asflicense | 0m 28s | | The patch does not generate ASF License warnings. | | | | 297m 30s | | | | Reason | Tests | |-------:|:------| | Failed junit tests | hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl | | | hadoop.hdfs.server.blockmanagement.TestDatanodeManager | | Subsystem | Report/Notes | |----------:|:-------------| | Docker | ClientAPI=1.45 ServerAPI=1.45 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6840/4/artifact/out/Dockerfile | | GITHUB PR | https://github.com/apache/hadoop/pull/6840 | | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets | | uname | Linux 620c1788bd6e 5.15.0-106-generic #116-Ubuntu SMP Wed Apr 17 09:17:56 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | dev-support/bin/hadoop.sh | | git revision | trunk / 97e987746192b3dd5e9b1c5ae91773a30bc6b32a | | Default Java | Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08 | | Multi-JDK versions | /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08 | | Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6840/4/testReport/ | | Max. process+thread count | 4528 (vs. ulimit of 5500) | | modules | C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs | | Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6840/4/console | | versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 | | Powered by | Apache Yetus 0.14.0 https://yetus.apache.org | This message was automatically generated. > DatanodeManager does not handle null storage type properly > ---------------------------------------------------------- > > Key: HDFS-17098 > URL: https://issues.apache.org/jira/browse/HDFS-17098 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: ConfX > Priority: Critical > Labels: pull-request-available > Attachments: reproduce.sh > > > h2. What happened: > Got a {{NullPointerException}} without message when sorting datanodes in > {{{}NetworkTopology{}}}. > h2. Where's the bug: > In line 654 of {{{}DatanodeManager{}}}, the manager creates a second sorter > using the standard {{Comparator}} class: > {noformat} > Comparator<DatanodeInfoWithStorage> comp = > Comparator.comparing(DatanodeInfoWithStorage::getStorageType); > secondarySort = list -> Collections.sort(list, comp);{noformat} > This comparator is then used in {{NetworkTopology}} as a secondary sort to > break ties: > {noformat} > if (secondarySort != null) { > // a secondary sort breaks the tie between nodes. > secondarySort.accept(nodesList); > }{noformat} > However, if the storage type is {{{}null{}}}, a {{NullPointerException}} > would be thrown since the default {{Comparator.comparing}} cannot handle > comparison between null values. > h2. How to reproduce: > (1) Set {{dfs.heartbeat.interval}} to {{{}1753310367{}}}, and > {{dfs.namenode.read.considerStorageType}} to {{true}} > (2) Run test: > {{org.apache.hadoop.hdfs.server.blockmanagement.TestSortLocatedBlock#testAviodStaleAndSlowDatanodes}} > h2. Stacktrace: > {noformat} > java.lang.NullPointerException > at > java.base/java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469) > at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) > at java.base/java.util.TimSort.sort(TimSort.java:220) > at java.base/java.util.Arrays.sort(Arrays.java:1515) > at java.base/java.util.ArrayList.sort(ArrayList.java:1750) > at java.base/java.util.Collections.sort(Collections.java:179) > at > org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.lambda$createSecondaryNodeSorter$0(DatanodeManager.java:654) > at > org.apache.hadoop.net.NetworkTopology.sortByDistance(NetworkTopology.java:983) > at > org.apache.hadoop.net.NetworkTopology.sortByDistanceUsingNetworkLocation(NetworkTopology.java:946) > at > org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.sortLocatedBlock(DatanodeManager.java:637) > at > org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.sortLocatedBlocks(DatanodeManager.java:554) > at > org.apache.hadoop.hdfs.server.blockmanagement.TestSortLocatedBlock.testAviodStaleAndSlowDatanodes(TestSortLocatedBlock.java:144){noformat} > For an easy reproduction, run the reproduce.sh in the attachment. We are > happy to provide a patch if this issue is confirmed. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org