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 br...@apache.org on 2016/12/28 05:17:39 UTC
[1/3] hadoop git commit: HDFS-11252.
TestFileTruncate#testTruncateWithDataNodesRestartImmediately can fail with
BindException. Contributed by Yiqun Lin.
Repository: hadoop
Updated Branches:
refs/heads/branch-2 88597991b -> 5d46d5d4c
refs/heads/branch-2.8 9a976f385 -> 218ed0a96
refs/heads/trunk 9262797e8 -> 0ddb8defa
HDFS-11252. TestFileTruncate#testTruncateWithDataNodesRestartImmediately can fail with BindException. Contributed by Yiqun Lin.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/0ddb8def
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/0ddb8def
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/0ddb8def
Branch: refs/heads/trunk
Commit: 0ddb8defad6a7fd5eb69847d1789ba51952c0cf0
Parents: 9262797
Author: Brahma Reddy Battula <br...@apache.org>
Authored: Wed Dec 28 10:34:33 2016 +0530
Committer: Brahma Reddy Battula <br...@apache.org>
Committed: Wed Dec 28 10:34:33 2016 +0530
----------------------------------------------------------------------
.../hdfs/server/namenode/TestFileTruncate.java | 31 ++++++++++----------
1 file changed, 15 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/0ddb8def/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
index d203413..0ea587c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
@@ -681,13 +681,7 @@ public class TestFileTruncate {
int toTruncateLength = 1;
int newLength = startingFileSize - toTruncateLength;
cluster.getDataNodes().get(dn).shutdown();
- try {
- boolean isReady = fs.truncate(p, newLength);
- assertFalse(isReady);
- } finally {
- cluster.restartDataNode(dn, true, true);
- cluster.waitActive();
- }
+ truncateAndRestartDN(p, dn, newLength);
checkBlockRecovery(p);
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
@@ -740,13 +734,7 @@ public class TestFileTruncate {
int toTruncateLength = 1;
int newLength = startingFileSize - toTruncateLength;
cluster.getDataNodes().get(dn).shutdown();
- try {
- boolean isReady = fs.truncate(p, newLength);
- assertFalse(isReady);
- } finally {
- cluster.restartDataNode(dn, true, true);
- cluster.waitActive();
- }
+ truncateAndRestartDN(p, dn, newLength);
checkBlockRecovery(p);
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
@@ -800,8 +788,8 @@ public class TestFileTruncate {
boolean isReady = fs.truncate(p, newLength);
assertFalse(isReady);
- cluster.restartDataNode(dn0, true, true);
- cluster.restartDataNode(dn1, true, true);
+ cluster.restartDataNode(dn0, false, true);
+ cluster.restartDataNode(dn1, false, true);
cluster.waitActive();
checkBlockRecovery(p);
@@ -1242,4 +1230,15 @@ public class TestFileTruncate {
.build();
fs = cluster.getFileSystem();
}
+
+ private void truncateAndRestartDN(Path p, int dn, int newLength)
+ throws IOException {
+ try {
+ boolean isReady = fs.truncate(p, newLength);
+ assertFalse(isReady);
+ } finally {
+ cluster.restartDataNode(dn, false, true);
+ cluster.waitActive();
+ }
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[3/3] hadoop git commit: HDFS-11252.
TestFileTruncate#testTruncateWithDataNodesRestartImmediately can fail with
BindException. Contributed by Yiqun Lin.
Posted by br...@apache.org.
HDFS-11252. TestFileTruncate#testTruncateWithDataNodesRestartImmediately can fail with BindException. Contributed by Yiqun Lin.
(cherry picked from commit 0ddb8defad6a7fd5eb69847d1789ba51952c0cf0)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/218ed0a9
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/218ed0a9
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/218ed0a9
Branch: refs/heads/branch-2.8
Commit: 218ed0a96b5b9a3130a6dbc6feeccd335126b242
Parents: 9a976f3
Author: Brahma Reddy Battula <br...@apache.org>
Authored: Wed Dec 28 10:34:33 2016 +0530
Committer: Brahma Reddy Battula <br...@apache.org>
Committed: Wed Dec 28 10:43:21 2016 +0530
----------------------------------------------------------------------
.../hdfs/server/namenode/TestFileTruncate.java | 31 ++++++++++----------
1 file changed, 15 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/218ed0a9/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
index c34b4de..b9601f7 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
@@ -680,13 +680,7 @@ public class TestFileTruncate {
int toTruncateLength = 1;
int newLength = startingFileSize - toTruncateLength;
cluster.getDataNodes().get(dn).shutdown();
- try {
- boolean isReady = fs.truncate(p, newLength);
- assertFalse(isReady);
- } finally {
- cluster.restartDataNode(dn, true, true);
- cluster.waitActive();
- }
+ truncateAndRestartDN(p, dn, newLength);
checkBlockRecovery(p);
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
@@ -739,13 +733,7 @@ public class TestFileTruncate {
int toTruncateLength = 1;
int newLength = startingFileSize - toTruncateLength;
cluster.getDataNodes().get(dn).shutdown();
- try {
- boolean isReady = fs.truncate(p, newLength);
- assertFalse(isReady);
- } finally {
- cluster.restartDataNode(dn, true, true);
- cluster.waitActive();
- }
+ truncateAndRestartDN(p, dn, newLength);
checkBlockRecovery(p);
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
@@ -799,8 +787,8 @@ public class TestFileTruncate {
boolean isReady = fs.truncate(p, newLength);
assertFalse(isReady);
- cluster.restartDataNode(dn0, true, true);
- cluster.restartDataNode(dn1, true, true);
+ cluster.restartDataNode(dn0, false, true);
+ cluster.restartDataNode(dn1, false, true);
cluster.waitActive();
checkBlockRecovery(p);
@@ -1240,4 +1228,15 @@ public class TestFileTruncate {
.build();
fs = cluster.getFileSystem();
}
+
+ private void truncateAndRestartDN(Path p, int dn, int newLength)
+ throws IOException {
+ try {
+ boolean isReady = fs.truncate(p, newLength);
+ assertFalse(isReady);
+ } finally {
+ cluster.restartDataNode(dn, false, true);
+ cluster.waitActive();
+ }
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[2/3] hadoop git commit: HDFS-11252.
TestFileTruncate#testTruncateWithDataNodesRestartImmediately can fail with
BindException. Contributed by Yiqun Lin.
Posted by br...@apache.org.
HDFS-11252. TestFileTruncate#testTruncateWithDataNodesRestartImmediately can fail with BindException. Contributed by Yiqun Lin.
(cherry picked from commit 0ddb8defad6a7fd5eb69847d1789ba51952c0cf0)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5d46d5d4
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5d46d5d4
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5d46d5d4
Branch: refs/heads/branch-2
Commit: 5d46d5d4c67ff486c33940bdb9805b093974b0cb
Parents: 8859799
Author: Brahma Reddy Battula <br...@apache.org>
Authored: Wed Dec 28 10:34:33 2016 +0530
Committer: Brahma Reddy Battula <br...@apache.org>
Committed: Wed Dec 28 10:37:21 2016 +0530
----------------------------------------------------------------------
.../hdfs/server/namenode/TestFileTruncate.java | 31 ++++++++++----------
1 file changed, 15 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/5d46d5d4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
index 58d59f1..b4fbd28 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
@@ -680,13 +680,7 @@ public class TestFileTruncate {
int toTruncateLength = 1;
int newLength = startingFileSize - toTruncateLength;
cluster.getDataNodes().get(dn).shutdown();
- try {
- boolean isReady = fs.truncate(p, newLength);
- assertFalse(isReady);
- } finally {
- cluster.restartDataNode(dn, true, true);
- cluster.waitActive();
- }
+ truncateAndRestartDN(p, dn, newLength);
checkBlockRecovery(p);
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
@@ -739,13 +733,7 @@ public class TestFileTruncate {
int toTruncateLength = 1;
int newLength = startingFileSize - toTruncateLength;
cluster.getDataNodes().get(dn).shutdown();
- try {
- boolean isReady = fs.truncate(p, newLength);
- assertFalse(isReady);
- } finally {
- cluster.restartDataNode(dn, true, true);
- cluster.waitActive();
- }
+ truncateAndRestartDN(p, dn, newLength);
checkBlockRecovery(p);
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
@@ -799,8 +787,8 @@ public class TestFileTruncate {
boolean isReady = fs.truncate(p, newLength);
assertFalse(isReady);
- cluster.restartDataNode(dn0, true, true);
- cluster.restartDataNode(dn1, true, true);
+ cluster.restartDataNode(dn0, false, true);
+ cluster.restartDataNode(dn1, false, true);
cluster.waitActive();
checkBlockRecovery(p);
@@ -1240,4 +1228,15 @@ public class TestFileTruncate {
.build();
fs = cluster.getFileSystem();
}
+
+ private void truncateAndRestartDN(Path p, int dn, int newLength)
+ throws IOException {
+ try {
+ boolean isReady = fs.truncate(p, newLength);
+ assertFalse(isReady);
+ } finally {
+ cluster.restartDataNode(dn, false, true);
+ cluster.waitActive();
+ }
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org