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

Chen Liang commented on HDFS-11005:
-----------------------------------

I did some investigation, I haven't found the root cause but it looks like 
problem is that in {{testFederationRefresh}} ns1 and ns2 got flipped somehow. 
This being said, if changing
{{conf.set(DFSConfigKeys.DFS_NAMESERVICES, "ns2");}} to
{{conf.set(DFSConfigKeys.DFS_NAMESERVICES, "ns1");}}
the test will pass.

However in fact, it should be indeed "ns2" here, see HDFS-4669. I compared the 
log output of this test in this branch and trunk, and saw below:

in this branch, I got:
{{INFO  datanode.DataNode (BlockPoolManager.java:doRefreshNamenodes(248)) - 
Stopping BPOfferServices for nameservices: ns1}}
{{INFO  datanode.TestBlockPoolManager (TestBlockPoolManager.java:doLog(94)) - 
stop #2}}
{{INFO  datanode.DataNode (BlockPoolManager.java:remove(103)) - Removed Mock 
BPOS #2}}
{{INFO  datanode.DataNode (BlockPoolManager.java:doRefreshNamenodes(261)) - 
Refreshing list of NNs for nameservices: ns2}}
{{INFO  datanode.TestBlockPoolManager (TestBlockPoolManager.java:doLog(94)) - 
refresh #1}}
note that BlockPoolManager tries to stop ns1 and refresh ns2 but somehow it got 
changed to stop ns2 and refresh ns1

In trunk, I got:
{{INFO  datanode.DataNode (BlockPoolManager.java:doRefreshNamenodes(226)) - 
Stopping BPOfferServices for nameservices: ns1}}
{{INFO  datanode.TestBlockPoolManager (TestBlockPoolManager.java:doLog(92)) - 
stop #1}}
{{INFO  datanode.DataNode (BlockPoolManager.java:remove(102)) - Removed Mock 
BPOS #1}}
{{INFO  datanode.DataNode (BlockPoolManager.java:doRefreshNamenodes(239)) - 
Refreshing list of NNs for nameservices: ns2}}
{{INFO  datanode.TestBlockPoolManager (TestBlockPoolManager.java:doLog(92)) - 
refresh #2}}
which is correct.

> Ozone: TestBlockPoolManager fails in ozone branch.
> --------------------------------------------------
>
>                 Key: HDFS-11005
>                 URL: https://issues.apache.org/jira/browse/HDFS-11005
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Anu Engineer
>
> TestBlockPoolManager.testFederationRefresh  fails in the ozone branch with 
> the following error message.
> {noformat}
> Running org.apache.hadoop.hdfs.server.datanode.TestBlockPoolManager
> Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.231 sec <<< 
> FAILURE! - in org.apache.hadoop.hdfs.server.datanode.TestBlockPoolManager
> testFederationRefresh(org.apache.hadoop.hdfs.server.datanode.TestBlockPoolManager)
>   Time elapsed: 0.043 sec  <<< FAILURE!
> org.junit.ComparisonFailure: expected:<stop #[1
> refresh #2]
> > but was:<stop #[2
> refresh #1]
> >
>       at org.junit.Assert.assertEquals(Assert.java:115)
>       at org.junit.Assert.assertEquals(Assert.java:144)
>       at 
> org.apache.hadoop.hdfs.server.datanode.TestBlockPoolManager.testFederationRefresh(TestBlockPoolManager.java:123)
> Results :
> Failed tests:
>   TestBlockPoolManager.testFederationRefresh:123 expected:<stop #[1
> refresh #2]
> > but was:<stop #[2
> refresh #1]
> >
> {noformat}



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

---------------------------------------------------------------------
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