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 vi...@apache.org on 2018/09/10 03:56:24 UTC
[1/2] hadoop git commit: HDFS-13895. EC: Fix Intermittent Failure in
TestDFSStripedOutputStreamWithFailureWithRandomECPolicy. Contributed by Ayush
Saxena.
Repository: hadoop
Updated Branches:
refs/heads/branch-3.1 cbcdaefa3 -> b8eaeca7e
refs/heads/trunk 30eceec34 -> eef3bafae
HDFS-13895. EC: Fix Intermittent Failure in TestDFSStripedOutputStreamWithFailureWithRandomECPolicy. Contributed by Ayush Saxena.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/eef3bafa
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/eef3bafa
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/eef3bafa
Branch: refs/heads/trunk
Commit: eef3bafae8bc0fd31506637cd131599ec97f362f
Parents: 30eceec
Author: Vinayakumar B <vi...@apache.org>
Authored: Mon Sep 10 09:22:59 2018 +0530
Committer: Vinayakumar B <vi...@apache.org>
Committed: Mon Sep 10 09:22:59 2018 +0530
----------------------------------------------------------------------
.../TestDFSStripedOutputStreamWithFailure.java | 41 +++++++++++---------
1 file changed, 22 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/eef3bafa/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java
index 800fac1..ff52146 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java
@@ -244,26 +244,29 @@ public class TestDFSStripedOutputStreamWithFailure extends
// Full stripe and a partial on non-cell boundary
(cellSize * dataBlocks) + 123,
};
- try {
- for (int length: fileLengths) {
- // select the two DNs with partial block to kill
- final int[] dnIndex = {dataBlocks - 2, dataBlocks - 1};
- final int[] killPos = getKillPositions(length, dnIndex.length);
- try {
- LOG.info("runTestWithMultipleFailure2: length==" + length
- + ", killPos=" + Arrays.toString(killPos)
- + ", dnIndex=" + Arrays.toString(dnIndex));
- setup(conf);
- runTest(length, killPos, dnIndex, false);
- } catch (Throwable e) {
- final String err = "failed, killPos=" + Arrays.toString(killPos)
- + ", dnIndex=" + Arrays.toString(dnIndex) + ", length=" + length;
- LOG.error(err);
- throw e;
- }
+ // select the two DNs with partial block to kill
+ int[] dnIndex = null;
+ if (parityBlocks > 1) {
+ dnIndex = new int[] {dataBlocks - 2, dataBlocks - 1};
+ } else {
+ dnIndex = new int[] {dataBlocks - 1};
+ }
+ for (int length : fileLengths) {
+ final int[] killPos = getKillPositions(length, dnIndex.length);
+ try {
+ LOG.info("runTestWithMultipleFailure2: length==" + length + ", killPos="
+ + Arrays.toString(killPos) + ", dnIndex="
+ + Arrays.toString(dnIndex));
+ setup(conf);
+ runTest(length, killPos, dnIndex, false);
+ } catch (Throwable e) {
+ final String err = "failed, killPos=" + Arrays.toString(killPos)
+ + ", dnIndex=" + Arrays.toString(dnIndex) + ", length=" + length;
+ LOG.error(err);
+ throw e;
+ } finally {
+ tearDown();
}
- } finally {
- tearDown();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[2/2] hadoop git commit: HDFS-13895. EC: Fix Intermittent Failure in
TestDFSStripedOutputStreamWithFailureWithRandomECPolicy. Contributed by Ayush
Saxena.
Posted by vi...@apache.org.
HDFS-13895. EC: Fix Intermittent Failure in TestDFSStripedOutputStreamWithFailureWithRandomECPolicy. Contributed by Ayush Saxena.
(cherry picked from commit eef3bafae8bc0fd31506637cd131599ec97f362f)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b8eaeca7
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b8eaeca7
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b8eaeca7
Branch: refs/heads/branch-3.1
Commit: b8eaeca7e6afc312c59d71e6de4049bb5bb7444d
Parents: cbcdaef
Author: Vinayakumar B <vi...@apache.org>
Authored: Mon Sep 10 09:22:59 2018 +0530
Committer: Vinayakumar B <vi...@apache.org>
Committed: Mon Sep 10 09:24:08 2018 +0530
----------------------------------------------------------------------
.../TestDFSStripedOutputStreamWithFailure.java | 41 +++++++++++---------
1 file changed, 22 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/b8eaeca7/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java
index 800fac1..ff52146 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamWithFailure.java
@@ -244,26 +244,29 @@ public class TestDFSStripedOutputStreamWithFailure extends
// Full stripe and a partial on non-cell boundary
(cellSize * dataBlocks) + 123,
};
- try {
- for (int length: fileLengths) {
- // select the two DNs with partial block to kill
- final int[] dnIndex = {dataBlocks - 2, dataBlocks - 1};
- final int[] killPos = getKillPositions(length, dnIndex.length);
- try {
- LOG.info("runTestWithMultipleFailure2: length==" + length
- + ", killPos=" + Arrays.toString(killPos)
- + ", dnIndex=" + Arrays.toString(dnIndex));
- setup(conf);
- runTest(length, killPos, dnIndex, false);
- } catch (Throwable e) {
- final String err = "failed, killPos=" + Arrays.toString(killPos)
- + ", dnIndex=" + Arrays.toString(dnIndex) + ", length=" + length;
- LOG.error(err);
- throw e;
- }
+ // select the two DNs with partial block to kill
+ int[] dnIndex = null;
+ if (parityBlocks > 1) {
+ dnIndex = new int[] {dataBlocks - 2, dataBlocks - 1};
+ } else {
+ dnIndex = new int[] {dataBlocks - 1};
+ }
+ for (int length : fileLengths) {
+ final int[] killPos = getKillPositions(length, dnIndex.length);
+ try {
+ LOG.info("runTestWithMultipleFailure2: length==" + length + ", killPos="
+ + Arrays.toString(killPos) + ", dnIndex="
+ + Arrays.toString(dnIndex));
+ setup(conf);
+ runTest(length, killPos, dnIndex, false);
+ } catch (Throwable e) {
+ final String err = "failed, killPos=" + Arrays.toString(killPos)
+ + ", dnIndex=" + Arrays.toString(dnIndex) + ", length=" + length;
+ LOG.error(err);
+ throw e;
+ } finally {
+ tearDown();
}
- } finally {
- tearDown();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org