[ https://issues.apache.org/jira/browse/HDFS-17443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dinesh Chitlangia resolved HDFS-17443. -------------------------------------- Fix Version/s: 3.5.0 Assignee: ConfX Resolution: Fixed Thanks [~FuzzingTeam] for the contribution. > TestNameEditsConfigs does not check null before closing fileSys and cluster > --------------------------------------------------------------------------- > > Key: HDFS-17443 > URL: https://issues.apache.org/jira/browse/HDFS-17443 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: ConfX > Assignee: ConfX > Priority: Major > Labels: pull-request-available > Fix For: 3.5.0 > > > h2. What happened: > Got NullPointerException when trying to run TestNameEditsConfigs with > misconfiguration rather than the actual exception. > h2. Buggy code: > {code:java} > @Test > public void testNameEditsConfigsFailure() throws IOException { > ... > } finally { > fileSys.close(); // here fileSys might be null > cluster.shutdown(); > }{code} > h2. StackTrace: > {code:java} > java.lang.NullPointerException: Cannot invoke > "org.apache.hadoop.fs.FileSystem.close()" because "fileSys" is null > at > org.apache.hadoop.hdfs.server.namenode.TestNameEditsConfigs.testNameEditsConfigsFailure(TestNameEditsConfigs.java:450){code} > h2. How to reproduce: > (1) Set {{dfs.namenode.edits.dir.minimum}} to {{251625215}} > (2) Run test: > {{org.apache.hadoop.hdfs.server.namenode.TestNameEditsConfigs#testNameEditsConfigsFailure}} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org