You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by wa...@apache.org on 2017/04/19 20:50:02 UTC
hadoop git commit: HDFS-11671.
TestReconstructStripedBlocks#test2RecoveryTasksForSameBlockGroup fails.
Repository: hadoop
Updated Branches:
refs/heads/trunk 46940d92e -> c1549352c
HDFS-11671. TestReconstructStripedBlocks#test2RecoveryTasksForSameBlockGroup fails.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c1549352
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c1549352
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c1549352
Branch: refs/heads/trunk
Commit: c1549352cf1d1b1b45d7b613f993d45649b8efcf
Parents: 46940d9
Author: Andrew Wang <wa...@apache.org>
Authored: Wed Apr 19 13:49:56 2017 -0700
Committer: Andrew Wang <wa...@apache.org>
Committed: Wed Apr 19 13:49:56 2017 -0700
----------------------------------------------------------------------
.../src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java | 6 +++++-
.../hdfs/server/namenode/TestReconstructStripedBlocks.java | 2 ++
2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/c1549352/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
index 9dccad5..74cdeae 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
@@ -1872,7 +1872,11 @@ public class DFSTestUtil {
*/
public static void setDatanodeDead(DatanodeInfo dn) {
dn.setLastUpdate(0);
- dn.setLastUpdateMonotonic(0);
+ // Set this to a large negative value.
+ // On short-lived VMs, the monotonic time can be less than the heartbeat
+ // expiry time. Setting this to 0 will fail to immediately mark the DN as
+ // dead.
+ dn.setLastUpdateMonotonic(Long.MIN_VALUE/2);
}
/**
http://git-wip-us.apache.org/repos/asf/hadoop/blob/c1549352/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestReconstructStripedBlocks.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestReconstructStripedBlocks.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestReconstructStripedBlocks.java
index e9ff2e3..34fec5b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestReconstructStripedBlocks.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestReconstructStripedBlocks.java
@@ -211,12 +211,14 @@ public class TestReconstructStripedBlocks {
Path p = new Path("/test2RecoveryTasksForSameBlockGroup");
final byte[] data = new byte[fileLen];
DFSTestUtil.writeFile(fs, p, data);
+ DFSTestUtil.waitForReplication(fs, p, groupSize, 5000);
LocatedStripedBlock lb = (LocatedStripedBlock)fs.getClient()
.getLocatedBlocks(p.toString(), 0).get(0);
LocatedBlock[] lbs = StripedBlockUtil.parseStripedBlockGroup(lb,
cellSize, dataBlocks, parityBlocks);
+ BlockManagerTestUtil.getComputedDatanodeWork(bm);
assertEquals(0, getNumberOfBlocksToBeErasureCoded(cluster));
assertEquals(0, bm.getPendingReconstructionBlocksCount());
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org