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 xi...@apache.org on 2018/01/29 06:12:08 UTC
hadoop git commit: HDFS-13065.
TestErasureCodingMultipleRacks#testSkewedRack3 is failing. Contributed by
Gabor Bota.
Repository: hadoop
Updated Branches:
refs/heads/trunk 443523f9c -> 6bc2f7f4b
HDFS-13065. TestErasureCodingMultipleRacks#testSkewedRack3 is failing. Contributed by Gabor Bota.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6bc2f7f4
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6bc2f7f4
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6bc2f7f4
Branch: refs/heads/trunk
Commit: 6bc2f7f4b4b8d4c36e92764d4c975c17f9fdd63b
Parents: 443523f
Author: Xiao Chen <xi...@apache.org>
Authored: Sun Jan 28 22:11:08 2018 -0800
Committer: Xiao Chen <xi...@apache.org>
Committed: Sun Jan 28 22:12:05 2018 -0800
----------------------------------------------------------------------
.../apache/hadoop/hdfs/TestErasureCodingMultipleRacks.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/6bc2f7f4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingMultipleRacks.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingMultipleRacks.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingMultipleRacks.java
index 0689665d..3e87253 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingMultipleRacks.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingMultipleRacks.java
@@ -21,6 +21,7 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.BlockLocation;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy;
+import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
import org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy;
import org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicyDefault;
import org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicyRackFaultTolerant;
@@ -163,7 +164,8 @@ public class TestErasureCodingMultipleRacks {
// Create enough extra DNs on the 2 racks to test even placement.
// Desired placement is parityUnits replicas on the 2 racks, and 1 replica
// on the rest of the racks (which only have 1 DN)
- setupCluster(dataUnits + parityUnits * 4, dataUnits - parityUnits + 2,
+ int numRacks = dataUnits - parityUnits + 2;
+ setupCluster(dataUnits + parityUnits * 4, numRacks,
dataUnits - parityUnits);
final int filesize = ecPolicy.getNumDataUnits() * ecPolicy.getCellSize();
@@ -173,6 +175,10 @@ public class TestErasureCodingMultipleRacks {
final Path path = new Path("/testfile" + i);
LOG.info("Writing file " + path);
DFSTestUtil.writeFile(dfs, path, contents);
+ ExtendedBlock extendedBlock = DFSTestUtil.getFirstBlock(dfs, path);
+ // Wait for replication to finish before testing
+ DFSTestUtil.waitForReplication(cluster, extendedBlock, numRacks,
+ ecPolicy.getNumDataUnits() + ecPolicy.getNumParityUnits(), 0);
BlockLocation[] blocks =
dfs.getFileBlockLocations(path, 0, Long.MAX_VALUE);
assertEquals(ecPolicy.getNumDataUnits() + ecPolicy.getNumParityUnits(),
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org