[ 
https://issues.apache.org/jira/browse/HDFS-17443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17831861#comment-17831861
 ] 

ASF GitHub Bot commented on HDFS-17443:
---------------------------------------

dineshchitlangia merged PR #6683:
URL: https://github.com/apache/hadoop/pull/6683




> 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
>            Priority: Major
>              Labels: pull-request-available
>
> 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-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to