svn merge -c 1503971 merging to branch-2 fix HDFS-4998.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1503972 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ace3a40b23
commit
17e8683dc1
|
@ -3093,6 +3093,8 @@ Release 0.23.10 - UNRELEASED
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
|
HDFS-4998. TestUnderReplicatedBlocks fails intermittently (kihwal)
|
||||||
|
|
||||||
Release 0.23.9 - 2013-07-08
|
Release 0.23.9 - 2013-07-08
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class TestUnderReplicatedBlocks {
|
public class TestUnderReplicatedBlocks {
|
||||||
@Test(timeout=300000) // 5 min timeout
|
@Test(timeout=60000) // 1 min timeout
|
||||||
public void testSetrepIncWithUnderReplicatedBlocks() throws Exception {
|
public void testSetrepIncWithUnderReplicatedBlocks() throws Exception {
|
||||||
Configuration conf = new HdfsConfiguration();
|
Configuration conf = new HdfsConfiguration();
|
||||||
final short REPLICATION_FACTOR = 2;
|
final short REPLICATION_FACTOR = 2;
|
||||||
|
@ -49,6 +49,7 @@ public class TestUnderReplicatedBlocks {
|
||||||
ExtendedBlock b = DFSTestUtil.getFirstBlock(fs, FILE_PATH);
|
ExtendedBlock b = DFSTestUtil.getFirstBlock(fs, FILE_PATH);
|
||||||
DatanodeDescriptor dn = bm.blocksMap.nodeIterator(b.getLocalBlock()).next();
|
DatanodeDescriptor dn = bm.blocksMap.nodeIterator(b.getLocalBlock()).next();
|
||||||
bm.addToInvalidates(b.getLocalBlock(), dn);
|
bm.addToInvalidates(b.getLocalBlock(), dn);
|
||||||
|
Thread.sleep(5000);
|
||||||
bm.blocksMap.removeNode(b.getLocalBlock(), dn);
|
bm.blocksMap.removeNode(b.getLocalBlock(), dn);
|
||||||
|
|
||||||
// increment this file's replication factor
|
// increment this file's replication factor
|
||||||
|
|
Loading…
Reference in New Issue