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 in...@apache.org on 2018/05/16 17:11:42 UTC
[1/5] hadoop git commit:
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows.
Contributed by Anbang Hu.
Repository: hadoop
Updated Branches:
refs/heads/branch-2 d163f7231 -> 9c9682209
refs/heads/branch-2.9 56a8ee6b2 -> 4658af7ec
refs/heads/branch-3.0 0a2cdd273 -> 16e89a277
refs/heads/branch-3.1 2c3f30046 -> e12ddd939
refs/heads/trunk 91357c22e -> 55d554908
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows. Contributed by Anbang Hu.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/55d55490
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/55d55490
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/55d55490
Branch: refs/heads/trunk
Commit: 55d5549087183cb9c8d805e33267acabe9537667
Parents: 91357c2
Author: Inigo Goiri <in...@apache.org>
Authored: Wed May 16 10:08:49 2018 -0700
Committer: Inigo Goiri <in...@apache.org>
Committed: Wed May 16 10:08:49 2018 -0700
----------------------------------------------------------------------
.../apache/hadoop/hdfs/tools/DebugAdmin.java | 30 +++++++++++++-------
.../hadoop/hdfs/tools/TestDebugAdmin.java | 2 +-
2 files changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/55d55490/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
index e2a6b3e..2c327f4 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
@@ -97,15 +97,17 @@ public class DebugAdmin extends Configured implements Tool {
VerifyMetaCommand() {
super("verifyMeta",
"verifyMeta -meta <metadata-file> [-block <block-file>]",
-" Verify HDFS metadata and block files. If a block file is specified, we\n" +
-" will verify that the checksums in the metadata file match the block\n" +
+" Verify HDFS metadata and block files. If a block file is specified, we" +
+ System.lineSeparator() +
+" will verify that the checksums in the metadata file match the block" +
+ System.lineSeparator() +
" file.");
}
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String blockFile = StringUtils.popOptionWithArgument("-block", args);
@@ -212,10 +214,15 @@ public class DebugAdmin extends Configured implements Tool {
super("computeMeta",
"computeMeta -block <block-file> -out <output-metadata-file>",
" Compute HDFS metadata from the specified block file, and save it"
- + " to\n the specified output metadata file.\n\n"
- + "**NOTE: Use at your own risk!\n If the block file is corrupt"
- + " and you overwrite it's meta file, \n it will show up"
- + " as good in HDFS, but you can't read the data.\n"
+ + " to" + System.lineSeparator()
+ + " the specified output metadata file."
+ + System.lineSeparator() + System.lineSeparator()
+ + "**NOTE: Use at your own risk!" + System.lineSeparator()
+ + " If the block file is corrupt"
+ + " and you overwrite it's meta file, " + System.lineSeparator()
+ + " it will show up"
+ + " as good in HDFS, but you can't read the data."
+ + System.lineSeparator()
+ " Only use as a last measure, and when you are 100% certain"
+ " the block file is good.");
}
@@ -234,7 +241,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
final String name = StringUtils.popOptionWithArgument("-block", args);
@@ -291,7 +298,8 @@ public class DebugAdmin extends Configured implements Tool {
RecoverLeaseCommand() {
super("recoverLease",
"recoverLease -path <path> [-retries <num-retries>]",
-" Recover the lease on the specified path. The path must reside on an\n" +
+" Recover the lease on the specified path. The path must reside on an" +
+ System.lineSeparator() +
" HDFS filesystem. The default number of retries is 1.");
}
@@ -300,7 +308,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String pathStr = StringUtils.popOptionWithArgument("-path", args);
@@ -395,7 +403,7 @@ public class DebugAdmin extends Configured implements Tool {
return 0;
}
System.out.println(command.usageText);
- System.out.println(command.helpText + "\n");
+ System.out.println(command.helpText + System.lineSeparator());
return 0;
}
}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/55d55490/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
index e8ee9e1..5c890a5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
@@ -87,7 +87,7 @@ public class TestDebugAdmin {
IOUtils.closeStream(out);
}
return "ret: " + ret + ", " +
- bytes.toString().replaceAll(System.getProperty("line.separator"), "");
+ bytes.toString().replaceAll(System.lineSeparator(), "");
}
@Test(timeout = 60000)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[2/5] hadoop git commit:
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows.
Contributed by Anbang Hu.
Posted by in...@apache.org.
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows. Contributed by Anbang Hu.
(cherry picked from commit 55d5549087183cb9c8d805e33267acabe9537667)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e12ddd93
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e12ddd93
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e12ddd93
Branch: refs/heads/branch-3.1
Commit: e12ddd9394c6a051b6987ea7759b8843a6edd8c5
Parents: 2c3f300
Author: Inigo Goiri <in...@apache.org>
Authored: Wed May 16 10:08:49 2018 -0700
Committer: Inigo Goiri <in...@apache.org>
Committed: Wed May 16 10:09:18 2018 -0700
----------------------------------------------------------------------
.../apache/hadoop/hdfs/tools/DebugAdmin.java | 30 +++++++++++++-------
.../hadoop/hdfs/tools/TestDebugAdmin.java | 2 +-
2 files changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e12ddd93/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
index e2a6b3e..2c327f4 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
@@ -97,15 +97,17 @@ public class DebugAdmin extends Configured implements Tool {
VerifyMetaCommand() {
super("verifyMeta",
"verifyMeta -meta <metadata-file> [-block <block-file>]",
-" Verify HDFS metadata and block files. If a block file is specified, we\n" +
-" will verify that the checksums in the metadata file match the block\n" +
+" Verify HDFS metadata and block files. If a block file is specified, we" +
+ System.lineSeparator() +
+" will verify that the checksums in the metadata file match the block" +
+ System.lineSeparator() +
" file.");
}
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String blockFile = StringUtils.popOptionWithArgument("-block", args);
@@ -212,10 +214,15 @@ public class DebugAdmin extends Configured implements Tool {
super("computeMeta",
"computeMeta -block <block-file> -out <output-metadata-file>",
" Compute HDFS metadata from the specified block file, and save it"
- + " to\n the specified output metadata file.\n\n"
- + "**NOTE: Use at your own risk!\n If the block file is corrupt"
- + " and you overwrite it's meta file, \n it will show up"
- + " as good in HDFS, but you can't read the data.\n"
+ + " to" + System.lineSeparator()
+ + " the specified output metadata file."
+ + System.lineSeparator() + System.lineSeparator()
+ + "**NOTE: Use at your own risk!" + System.lineSeparator()
+ + " If the block file is corrupt"
+ + " and you overwrite it's meta file, " + System.lineSeparator()
+ + " it will show up"
+ + " as good in HDFS, but you can't read the data."
+ + System.lineSeparator()
+ " Only use as a last measure, and when you are 100% certain"
+ " the block file is good.");
}
@@ -234,7 +241,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
final String name = StringUtils.popOptionWithArgument("-block", args);
@@ -291,7 +298,8 @@ public class DebugAdmin extends Configured implements Tool {
RecoverLeaseCommand() {
super("recoverLease",
"recoverLease -path <path> [-retries <num-retries>]",
-" Recover the lease on the specified path. The path must reside on an\n" +
+" Recover the lease on the specified path. The path must reside on an" +
+ System.lineSeparator() +
" HDFS filesystem. The default number of retries is 1.");
}
@@ -300,7 +308,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String pathStr = StringUtils.popOptionWithArgument("-path", args);
@@ -395,7 +403,7 @@ public class DebugAdmin extends Configured implements Tool {
return 0;
}
System.out.println(command.usageText);
- System.out.println(command.helpText + "\n");
+ System.out.println(command.helpText + System.lineSeparator());
return 0;
}
}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e12ddd93/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
index e8ee9e1..5c890a5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
@@ -87,7 +87,7 @@ public class TestDebugAdmin {
IOUtils.closeStream(out);
}
return "ret: " + ret + ", " +
- bytes.toString().replaceAll(System.getProperty("line.separator"), "");
+ bytes.toString().replaceAll(System.lineSeparator(), "");
}
@Test(timeout = 60000)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[5/5] hadoop git commit:
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows.
Contributed by Anbang Hu.
Posted by in...@apache.org.
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows. Contributed by Anbang Hu.
(cherry picked from commit 55d5549087183cb9c8d805e33267acabe9537667)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4658af7e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4658af7e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4658af7e
Branch: refs/heads/branch-2.9
Commit: 4658af7eca1e37d461d6bc0efab0a1fdec5aa819
Parents: 56a8ee6
Author: Inigo Goiri <in...@apache.org>
Authored: Wed May 16 10:08:49 2018 -0700
Committer: Inigo Goiri <in...@apache.org>
Committed: Wed May 16 10:10:52 2018 -0700
----------------------------------------------------------------------
.../apache/hadoop/hdfs/tools/DebugAdmin.java | 30 +++++++++++++-------
.../hadoop/hdfs/tools/TestDebugAdmin.java | 2 +-
2 files changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/4658af7e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
index e2a6b3e..2c327f4 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
@@ -97,15 +97,17 @@ public class DebugAdmin extends Configured implements Tool {
VerifyMetaCommand() {
super("verifyMeta",
"verifyMeta -meta <metadata-file> [-block <block-file>]",
-" Verify HDFS metadata and block files. If a block file is specified, we\n" +
-" will verify that the checksums in the metadata file match the block\n" +
+" Verify HDFS metadata and block files. If a block file is specified, we" +
+ System.lineSeparator() +
+" will verify that the checksums in the metadata file match the block" +
+ System.lineSeparator() +
" file.");
}
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String blockFile = StringUtils.popOptionWithArgument("-block", args);
@@ -212,10 +214,15 @@ public class DebugAdmin extends Configured implements Tool {
super("computeMeta",
"computeMeta -block <block-file> -out <output-metadata-file>",
" Compute HDFS metadata from the specified block file, and save it"
- + " to\n the specified output metadata file.\n\n"
- + "**NOTE: Use at your own risk!\n If the block file is corrupt"
- + " and you overwrite it's meta file, \n it will show up"
- + " as good in HDFS, but you can't read the data.\n"
+ + " to" + System.lineSeparator()
+ + " the specified output metadata file."
+ + System.lineSeparator() + System.lineSeparator()
+ + "**NOTE: Use at your own risk!" + System.lineSeparator()
+ + " If the block file is corrupt"
+ + " and you overwrite it's meta file, " + System.lineSeparator()
+ + " it will show up"
+ + " as good in HDFS, but you can't read the data."
+ + System.lineSeparator()
+ " Only use as a last measure, and when you are 100% certain"
+ " the block file is good.");
}
@@ -234,7 +241,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
final String name = StringUtils.popOptionWithArgument("-block", args);
@@ -291,7 +298,8 @@ public class DebugAdmin extends Configured implements Tool {
RecoverLeaseCommand() {
super("recoverLease",
"recoverLease -path <path> [-retries <num-retries>]",
-" Recover the lease on the specified path. The path must reside on an\n" +
+" Recover the lease on the specified path. The path must reside on an" +
+ System.lineSeparator() +
" HDFS filesystem. The default number of retries is 1.");
}
@@ -300,7 +308,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String pathStr = StringUtils.popOptionWithArgument("-path", args);
@@ -395,7 +403,7 @@ public class DebugAdmin extends Configured implements Tool {
return 0;
}
System.out.println(command.usageText);
- System.out.println(command.helpText + "\n");
+ System.out.println(command.helpText + System.lineSeparator());
return 0;
}
}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/4658af7e/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
index e8ee9e1..5c890a5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
@@ -87,7 +87,7 @@ public class TestDebugAdmin {
IOUtils.closeStream(out);
}
return "ret: " + ret + ", " +
- bytes.toString().replaceAll(System.getProperty("line.separator"), "");
+ bytes.toString().replaceAll(System.lineSeparator(), "");
}
@Test(timeout = 60000)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[4/5] hadoop git commit:
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows.
Contributed by Anbang Hu.
Posted by in...@apache.org.
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows. Contributed by Anbang Hu.
(cherry picked from commit 55d5549087183cb9c8d805e33267acabe9537667)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/9c968220
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/9c968220
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/9c968220
Branch: refs/heads/branch-2
Commit: 9c96822096f726c9be663b324b93c2a55ae66ab1
Parents: d163f72
Author: Inigo Goiri <in...@apache.org>
Authored: Wed May 16 10:08:49 2018 -0700
Committer: Inigo Goiri <in...@apache.org>
Committed: Wed May 16 10:10:37 2018 -0700
----------------------------------------------------------------------
.../apache/hadoop/hdfs/tools/DebugAdmin.java | 30 +++++++++++++-------
.../hadoop/hdfs/tools/TestDebugAdmin.java | 2 +-
2 files changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/9c968220/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
index e2a6b3e..2c327f4 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
@@ -97,15 +97,17 @@ public class DebugAdmin extends Configured implements Tool {
VerifyMetaCommand() {
super("verifyMeta",
"verifyMeta -meta <metadata-file> [-block <block-file>]",
-" Verify HDFS metadata and block files. If a block file is specified, we\n" +
-" will verify that the checksums in the metadata file match the block\n" +
+" Verify HDFS metadata and block files. If a block file is specified, we" +
+ System.lineSeparator() +
+" will verify that the checksums in the metadata file match the block" +
+ System.lineSeparator() +
" file.");
}
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String blockFile = StringUtils.popOptionWithArgument("-block", args);
@@ -212,10 +214,15 @@ public class DebugAdmin extends Configured implements Tool {
super("computeMeta",
"computeMeta -block <block-file> -out <output-metadata-file>",
" Compute HDFS metadata from the specified block file, and save it"
- + " to\n the specified output metadata file.\n\n"
- + "**NOTE: Use at your own risk!\n If the block file is corrupt"
- + " and you overwrite it's meta file, \n it will show up"
- + " as good in HDFS, but you can't read the data.\n"
+ + " to" + System.lineSeparator()
+ + " the specified output metadata file."
+ + System.lineSeparator() + System.lineSeparator()
+ + "**NOTE: Use at your own risk!" + System.lineSeparator()
+ + " If the block file is corrupt"
+ + " and you overwrite it's meta file, " + System.lineSeparator()
+ + " it will show up"
+ + " as good in HDFS, but you can't read the data."
+ + System.lineSeparator()
+ " Only use as a last measure, and when you are 100% certain"
+ " the block file is good.");
}
@@ -234,7 +241,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
final String name = StringUtils.popOptionWithArgument("-block", args);
@@ -291,7 +298,8 @@ public class DebugAdmin extends Configured implements Tool {
RecoverLeaseCommand() {
super("recoverLease",
"recoverLease -path <path> [-retries <num-retries>]",
-" Recover the lease on the specified path. The path must reside on an\n" +
+" Recover the lease on the specified path. The path must reside on an" +
+ System.lineSeparator() +
" HDFS filesystem. The default number of retries is 1.");
}
@@ -300,7 +308,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String pathStr = StringUtils.popOptionWithArgument("-path", args);
@@ -395,7 +403,7 @@ public class DebugAdmin extends Configured implements Tool {
return 0;
}
System.out.println(command.usageText);
- System.out.println(command.helpText + "\n");
+ System.out.println(command.helpText + System.lineSeparator());
return 0;
}
}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/9c968220/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
index e8ee9e1..5c890a5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
@@ -87,7 +87,7 @@ public class TestDebugAdmin {
IOUtils.closeStream(out);
}
return "ret: " + ret + ", " +
- bytes.toString().replaceAll(System.getProperty("line.separator"), "");
+ bytes.toString().replaceAll(System.lineSeparator(), "");
}
@Test(timeout = 60000)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[3/5] hadoop git commit:
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows.
Contributed by Anbang Hu.
Posted by in...@apache.org.
HDFS-13550.TestDebugAdmin#testComputeMetaCommand fails on Windows. Contributed by Anbang Hu.
(cherry picked from commit 55d5549087183cb9c8d805e33267acabe9537667)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/16e89a27
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/16e89a27
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/16e89a27
Branch: refs/heads/branch-3.0
Commit: 16e89a2771716971965bf0e1855b1dbb89549d59
Parents: 0a2cdd2
Author: Inigo Goiri <in...@apache.org>
Authored: Wed May 16 10:08:49 2018 -0700
Committer: Inigo Goiri <in...@apache.org>
Committed: Wed May 16 10:10:08 2018 -0700
----------------------------------------------------------------------
.../apache/hadoop/hdfs/tools/DebugAdmin.java | 30 +++++++++++++-------
.../hadoop/hdfs/tools/TestDebugAdmin.java | 2 +-
2 files changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/16e89a27/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
index e2a6b3e..2c327f4 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java
@@ -97,15 +97,17 @@ public class DebugAdmin extends Configured implements Tool {
VerifyMetaCommand() {
super("verifyMeta",
"verifyMeta -meta <metadata-file> [-block <block-file>]",
-" Verify HDFS metadata and block files. If a block file is specified, we\n" +
-" will verify that the checksums in the metadata file match the block\n" +
+" Verify HDFS metadata and block files. If a block file is specified, we" +
+ System.lineSeparator() +
+" will verify that the checksums in the metadata file match the block" +
+ System.lineSeparator() +
" file.");
}
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String blockFile = StringUtils.popOptionWithArgument("-block", args);
@@ -212,10 +214,15 @@ public class DebugAdmin extends Configured implements Tool {
super("computeMeta",
"computeMeta -block <block-file> -out <output-metadata-file>",
" Compute HDFS metadata from the specified block file, and save it"
- + " to\n the specified output metadata file.\n\n"
- + "**NOTE: Use at your own risk!\n If the block file is corrupt"
- + " and you overwrite it's meta file, \n it will show up"
- + " as good in HDFS, but you can't read the data.\n"
+ + " to" + System.lineSeparator()
+ + " the specified output metadata file."
+ + System.lineSeparator() + System.lineSeparator()
+ + "**NOTE: Use at your own risk!" + System.lineSeparator()
+ + " If the block file is corrupt"
+ + " and you overwrite it's meta file, " + System.lineSeparator()
+ + " it will show up"
+ + " as good in HDFS, but you can't read the data."
+ + System.lineSeparator()
+ " Only use as a last measure, and when you are 100% certain"
+ " the block file is good.");
}
@@ -234,7 +241,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
final String name = StringUtils.popOptionWithArgument("-block", args);
@@ -291,7 +298,8 @@ public class DebugAdmin extends Configured implements Tool {
RecoverLeaseCommand() {
super("recoverLease",
"recoverLease -path <path> [-retries <num-retries>]",
-" Recover the lease on the specified path. The path must reside on an\n" +
+" Recover the lease on the specified path. The path must reside on an" +
+ System.lineSeparator() +
" HDFS filesystem. The default number of retries is 1.");
}
@@ -300,7 +308,7 @@ public class DebugAdmin extends Configured implements Tool {
int run(List<String> args) throws IOException {
if (args.size() == 0) {
System.out.println(usageText);
- System.out.println(helpText + "\n");
+ System.out.println(helpText + System.lineSeparator());
return 1;
}
String pathStr = StringUtils.popOptionWithArgument("-path", args);
@@ -395,7 +403,7 @@ public class DebugAdmin extends Configured implements Tool {
return 0;
}
System.out.println(command.usageText);
- System.out.println(command.helpText + "\n");
+ System.out.println(command.helpText + System.lineSeparator());
return 0;
}
}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/16e89a27/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
index e8ee9e1..5c890a5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDebugAdmin.java
@@ -87,7 +87,7 @@ public class TestDebugAdmin {
IOUtils.closeStream(out);
}
return "ret: " + ret + ", " +
- bytes.toString().replaceAll(System.getProperty("line.separator"), "");
+ bytes.toString().replaceAll(System.lineSeparator(), "");
}
@Test(timeout = 60000)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org