[
https://issues.apache.org/jira/browse/HDFS-6427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14000963#comment-14000963
]
Yongjun Zhang commented on HDFS-6427:
-------------------------------------
HI Uma,
I found the same problem, and saw your patch. Thanks for the good work!
I looked at the your patch, one small comment here, what about creating a
method in the base class and call it from setupCluster in both classes:
{code}
protected Configuration setupCommonCfg() throws Exception {
tmpOivImgDir = Files.createTempDir();
Configuration conf = new Configuration();
conf.setInt(DFSConfigKeys.DFS_NAMENODE_CHECKPOINT_CHECK_PERIOD_KEY, 1);
conf.setInt(DFSConfigKeys.DFS_NAMENODE_CHECKPOINT_TXNS_KEY, 5);
conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 1);
conf.set(DFSConfigKeys.DFS_NAMENODE_LEGACY_OIV_IMAGE_DIR_KEY,
tmpOivImgDir.getAbsolutePath());
return conf;
}
{code}
Thanks.
> TestStandbyCheckpoints#testSBNCheckpoints throwing NPE when running
> TestBookKeeperHACheckpoints
> -----------------------------------------------------------------------------------------------
>
> Key: HDFS-6427
> URL: https://issues.apache.org/jira/browse/HDFS-6427
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: test
> Reporter: Uma Maheswara Rao G
> Assignee: Uma Maheswara Rao G
> Attachments: HDFS-6427.patch
>
>
> HDFS-6293 added tmpOivImgDir and asserting in some tests. The initialization
> of tmpOivImgDir happend in setUpCluster, but that method overridden by
> TestBookKeeperHACheckpoints. So, while in asserting it can throw NPE.
--
This message was sent by Atlassian JIRA
(v6.2#6252)