hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brahma Reddy Battula (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HDFS-11135) The tests in TestBalancer run fails due to NPE
Date Mon, 14 Nov 2016 12:39:58 GMT

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

Brahma Reddy Battula edited comment on HDFS-11135 at 11/14/16 12:39 PM:

[~linyiqun] Nice Catch, it was introduced by HDFS-11042. 
Remaining test classes should be ok(which are updated from HDFS-11042) and can you also confirm
Patch LGTM, +1.Pending for jenkins. 

was (Author: brahmareddy):
[~linyiqun] Nice Catch, +1, Pending for jenkins.

> The tests in TestBalancer run fails due to NPE
> ----------------------------------------------
>                 Key: HDFS-11135
>                 URL: https://issues.apache.org/jira/browse/HDFS-11135
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: HDFS-11135.001.patch
> I am making test for HDFS-11051, I found a serious issue: All the tests in {{TestBalancer}}
fails except {{TestBalancer#testBalancerWithKeytabs}}. I saw there was NPE threw in the method
{{TestBalancer#destroy}}. The stack infos:
> {code}
> java.lang.NullPointerException
> 	at org.apache.hadoop.fs.FileUtil.fullyDeleteContents(FileUtil.java:242)
> 	at org.apache.hadoop.fs.FileUtil.fullyDelete(FileUtil.java:164)
> 	at org.apache.hadoop.fs.FileUtil.fullyDelete(FileUtil.java:135)
> 	at org.apache.hadoop.hdfs.server.balancer.TestBalancer.destroy(TestBalancer.java:274)
> {code}
> The related codes:
> {code}
>   @AfterClass
>   public static void destroy() throws Exception {
>     if (kdc != null) {
>       kdc.stop();
>     }
>     FileUtil.fullyDelete(baseDir);
>       KeyStoreTestUtil.cleanupSSLConfig(keystoresDir, sslConfDir);
>   }
> {code}
> It seems that the deleted dir {{baseDir}} is only used in {{TestBalancer#testBalancerWithKeytabs}},
but here we don't do a check and then it throws the NPE. Finally cause the other tests fails.
Since it will run the test {{TestBalancer#testBalancerWithKeytabs}} and initialize the dir
if we do the whole test {{TesrBalancer}}, and it will runs good. However, it will fails if
we want to run a single test in {{TestBalancer}}.

This message was sent by Atlassian JIRA

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

View raw message