hadoop git commit: HDFS-13662. TestBlockReaderLocal#testStatisticsForErasureCodingRead is flaky
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 Authored: Tue Oct 16 19:32:12 2018 -0700 Committer: Xiao Chen 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
hadoop git commit: HDFS-13662. TestBlockReaderLocal#testStatisticsForErasureCodingRead is flaky
Repository: hadoop Updated Branches: refs/heads/branch-3.2 83769b63d -> 08b415d17 HDFS-13662. TestBlockReaderLocal#testStatisticsForErasureCodingRead is flaky (cherry picked from commit 533138718cc05b78e0afe583d7a9bd30e8a48fdc) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/08b415d1 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/08b415d1 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/08b415d1 Branch: refs/heads/branch-3.2 Commit: 08b415d17028dc7c8e4784dd84ef6326c91c2fcf Parents: 83769b6 Author: Xiao Chen Authored: Tue Oct 16 19:32:12 2018 -0700 Committer: Xiao Chen Committed: Tue Oct 16 19:34:41 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/08b415d1/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-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
[21/50] [abbrv] hadoop git commit: HDFS-13662. TestBlockReaderLocal#testStatisticsForErasureCodingRead is flaky
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/HDDS-4 Commit: 533138718cc05b78e0afe583d7a9bd30e8a48fdc Parents: e3342a1 Author: Xiao Chen Authored: Tue Oct 16 19:32:12 2018 -0700 Committer: Xiao Chen 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org