hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject hadoop git commit: HDFS-13662. TestBlockReaderLocal#testStatisticsForErasureCodingRead is flaky
Date Wed, 17 Oct 2018 02:33:57 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk e3342a1ab -> 533138718


HDFS-13662. TestBlockReaderLocal#testStatisticsForErasureCodingRead is flaky


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/53313871
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/53313871
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/53313871

Branch: refs/heads/trunk
Commit: 533138718cc05b78e0afe583d7a9bd30e8a48fdc
Parents: e3342a1
Author: Xiao Chen <xiao@apache.org>
Authored: Tue Oct 16 19:32:12 2018 -0700
Committer: Xiao Chen <xiao@apache.org>
Committed: Tue Oct 16 19:33:55 2018 -0700

----------------------------------------------------------------------
 .../hadoop/hdfs/client/impl/TestBlockReaderLocal.java     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/53313871/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/client/impl/TestBlockReaderLocal.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/client/impl/TestBlockReaderLocal.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/client/impl/TestBlockReaderLocal.java
index ace21c0..95fb67a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/client/impl/TestBlockReaderLocal.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/client/impl/TestBlockReaderLocal.java
@@ -28,6 +28,7 @@ import java.nio.ByteBuffer;
 import java.util.UUID;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.hadoop.fs.BlockLocation;
 import org.apache.hadoop.fs.ChecksumException;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileSystem;
@@ -827,9 +828,12 @@ public class TestBlockReaderLocal {
 
       Path ecFile = new Path(ecDir, "file2");
       DFSTestUtil.createFile(fs, ecFile, length, repl, randomSeed);
-      // Shutdown one DataNode so that erasure coding decoding process can kick
-      // in.
-      cluster.shutdownDataNode(0);
+
+      // Shutdown a DataNode that holds a data block, to trigger EC decoding.
+      final BlockLocation[] locs = fs.getFileBlockLocations(ecFile, 0, length);
+      final String[] nodes = locs[0].getNames();
+      cluster.stopDataNode(nodes[0]);
+
       try (HdfsDataInputStream in = (HdfsDataInputStream) fs.open(ecFile)) {
         IOUtils.readFully(in, buf, 0, length);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message