[
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14329683#comment-14329683
]
Konstantin Shvachko commented on HDFS-7740:
-------------------------------------------
This actually worked pretty good.
Only one test is running too long:
{{testTruncateWithDataNodesShutdownImmediately()}} adds 30 secs to the running
time because you check {{isUnderConstruction()}} for the block 300 times with
interval 100 msec. I'd suggest waiting for DNs being down, and then checking
the block being still under construction.
{code}
cluster.shutdownDataNodes();
try {
for(int i = 0; i < SUCCESS_ATTEMPTS && cluster.isDataNodeUp(); i++) {
Thread.sleep(SLEEP);
}
assertFalse("All DataNodes should be down.", cluster.isDataNodeUp());
LocatedBlocks blocks = getLocatedBlocks(p);
assertTrue(blocks.isUnderConstruction());
} finally {
cluster.startDataNodes(conf, DATANODE_NUM, true,
StartupOption.REGULAR, null);
cluster.waitActive();
}
{code}
I am +1 on the rest.
Yi, if you cannot update the patch I can make just this change to the latest
and commit.
> Test truncate with DataNodes restarting
> ---------------------------------------
>
> Key: HDFS-7740
> URL: https://issues.apache.org/jira/browse/HDFS-7740
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: test
> Affects Versions: 2.7.0
> Reporter: Konstantin Shvachko
> Assignee: Yi Liu
> Fix For: 2.7.0
>
> Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch
>
>
> Add a test case, which ensures replica consistency when DNs are failing and
> restarting.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)