HDFS-11396. TestNameNodeMetadataConsistency#testGenerationStampInFuture timed out. Contributed by Ayush Saxena.

This commit is contained in:
Inigo Goiri 2018-10-09 17:03:21 -07:00
parent 614d6cf99c
commit bc400c8a33
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ import org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties;
import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
import org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo; import org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo;
import org.apache.hadoop.hdfs.server.blockmanagement.BlockManagerTestUtil; import org.apache.hadoop.hdfs.server.blockmanagement.BlockManagerTestUtil;
import org.apache.hadoop.hdfs.server.datanode.DataNodeTestUtils;
import org.apache.hadoop.test.GenericTestUtils; import org.apache.hadoop.test.GenericTestUtils;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
@ -88,6 +89,7 @@ public class TestNameNodeMetadataConsistency {
final long genStamp = block.getGenerationStamp(); final long genStamp = block.getGenerationStamp();
final int datanodeIndex = 0; final int datanodeIndex = 0;
cluster.changeGenStampOfBlock(datanodeIndex, block, genStamp + 1); cluster.changeGenStampOfBlock(datanodeIndex, block, genStamp + 1);
DataNodeTestUtils.runDirectoryScanner(cluster.getDataNodes().get(0));
// stop the data node so that it won't remove block // stop the data node so that it won't remove block
final DataNodeProperties dnProps = cluster.stopDataNode(datanodeIndex); final DataNodeProperties dnProps = cluster.stopDataNode(datanodeIndex);