You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Yiqun Lin (JIRA)" <ji...@apache.org> on 2016/11/14 12:10:58 UTC

[jira] [Created] (HDFS-11135) The tests in TestBalancer run fails due to NPE

Yiqun Lin created HDFS-11135:
--------------------------------

             Summary: 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
            Reporter: Yiqun Lin
            Assignee: Yiqun Lin


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}
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. Otherwise, it will fails if we want to run a single test.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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