[ https://issues.apache.org/jira/browse/HDFS-17133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765312#comment-17765312 ]
ASF GitHub Bot commented on HDFS-17133: --------------------------------------- teamconfx opened a new pull request, #6079: URL: https://github.com/apache/hadoop/pull/6079 ### Description of PR https://issues.apache.org/jira/browse/HDFS-17133 This PR adds a check that `cluster` is not `null` before cleaning up and shutting down the cluster. ### How was this patch tested? 1. set dfs.namenode.quota.init-threads=1468568631 2. run org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl#testMoveBlockFailure The test fails with the `IllegalArgumentException` rather than the `NullPointerException`. ### For code changes: - [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? - [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? > TestFsDatasetImpl missing null check when cleaning up > ----------------------------------------------------- > > Key: HDFS-17133 > URL: https://issues.apache.org/jira/browse/HDFS-17133 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: ConfX > Priority: Critical > Attachments: reproduce.sh > > > h2. What happened > I turned on {{dfs.namenode.quota.init-threads=1468568631}} and then the test > {{{}org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl#testMoveBlockFailure{}}}fails > with null pointer. > h2. Where's the problem > In the clean up part of the test: > {noformat} > } finally { > if (cluster.isClusterUp()) { > cluster.shutdown(); > } > }{noformat} > if cluster is null, the test would directly fail with a null pointer > exception and hiding potentially the actual failure. > h2. How to reproduce > # set {{{}dfs.namenode.quota.init-threads{}}}={{{}1468568631 {}}} > # run > {{org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl#testMoveBlockFailure}} > you should observe > {noformat} > java.lang.NullPointerException > at > org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl.testMoveBlockFailure(TestFsDatasetImpl.java:1005){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