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 ta...@apache.org on 2021/05/26 11:12:52 UTC
[hadoop] branch trunk updated: HDFS-16041. TestErasureCodingCLI
fails (#3052)
This is an automated email from the ASF dual-hosted git repository.
tasanuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 98a74e2 HDFS-16041. TestErasureCodingCLI fails (#3052)
98a74e2 is described below
commit 98a74e23514392dc8859f407cd40d9c96d8c5923
Author: Hui Fei <fe...@apache.org>
AuthorDate: Wed May 26 19:12:17 2021 +0800
HDFS-16041. TestErasureCodingCLI fails (#3052)
---
.../src/main/java/org/apache/hadoop/fs/ContentSummary.java | 4 +++-
.../hadoop-hdfs/src/test/resources/testErasureCodingConf.xml | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ContentSummary.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ContentSummary.java
index 80a6c0c..79850e1 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ContentSummary.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ContentSummary.java
@@ -466,7 +466,9 @@ public class ContentSummary extends QuotaUsage implements Writable{
* @return Constant-width String representation of Erasure Coding Policy
*/
public String toErasureCodingPolicy() {
- return String.format(ERASURECODING_POLICY_FORMAT, erasureCodingPolicy);
+ return String.format(ERASURECODING_POLICY_FORMAT,
+ erasureCodingPolicy.equals("Replicated")
+ ? erasureCodingPolicy : "EC:" + erasureCodingPolicy);
}
/**
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml
index f527d35..9c8f7e2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml
@@ -983,7 +983,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>( |\t)*1( |\t)*2( |\t)*0 EC:[A-Za-z0-9-]{1,}( )*/dir1</expected-output>
+ <expected-output>( |\t)*1( |\t)*2( |\t)*0( )*EC:[A-Za-z0-9-]{1,}( )*/dir1</expected-output>
</comparator>
</comparators>
</test>
@@ -1004,7 +1004,7 @@
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>( |\t)*0( |\t)*1( |\t)*0 [A-Za-z0-9-]{1,}( )*/file1</expected-output>
+ <expected-output>( |\t)*0( |\t)*1( |\t)*0( )*[A-Za-z0-9-]{1,}( )*/file1</expected-output>
</comparator>
</comparators>
</test>
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org