Revert "HDFS-13732. ECAdmin should print the policy name when an EC policy is set. Contributed by Zsolt Venczel."
This reverts commit 7dc79a8b5b
.
This commit is contained in:
parent
762a56cc64
commit
9da6054ca4
@ -358,16 +358,16 @@ public int run(Configuration conf, List<String> args) throws IOException {
|
|||||||
final DistributedFileSystem dfs = AdminHelper.getDFS(p.toUri(), conf);
|
final DistributedFileSystem dfs = AdminHelper.getDFS(p.toUri(), conf);
|
||||||
try {
|
try {
|
||||||
dfs.setErasureCodingPolicy(p, ecPolicyName);
|
dfs.setErasureCodingPolicy(p, ecPolicyName);
|
||||||
|
if (ecPolicyName == null){
|
||||||
String actualECPolicyName = dfs.getErasureCodingPolicy(p).getName();
|
ecPolicyName = "default";
|
||||||
|
}
|
||||||
System.out.println("Set " + actualECPolicyName +
|
System.out.println("Set " + ecPolicyName + " erasure coding policy on" +
|
||||||
" erasure coding policy on "+ path);
|
" " + path);
|
||||||
RemoteIterator<FileStatus> dirIt = dfs.listStatusIterator(p);
|
RemoteIterator<FileStatus> dirIt = dfs.listStatusIterator(p);
|
||||||
if (dirIt.hasNext()) {
|
if (dirIt.hasNext()) {
|
||||||
System.out.println("Warning: setting erasure coding policy on a " +
|
System.out.println("Warning: setting erasure coding policy on a " +
|
||||||
"non-empty directory will not automatically convert existing " +
|
"non-empty directory will not automatically convert existing " +
|
||||||
"files to " + actualECPolicyName + " erasure coding policy");
|
"files to " + ecPolicyName + " erasure coding policy");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.err.println(AdminHelper.prettifyException(e));
|
System.err.println(AdminHelper.prettifyException(e));
|
||||||
|
@ -734,7 +734,7 @@
|
|||||||
<comparators>
|
<comparators>
|
||||||
<comparator>
|
<comparator>
|
||||||
<type>SubstringComparator</type>
|
<type>SubstringComparator</type>
|
||||||
<expected-output>Set RS-6-3-1024k erasure coding policy on /ecdir</expected-output>
|
<expected-output>Set default erasure coding policy on /ecdir</expected-output>
|
||||||
</comparator>
|
</comparator>
|
||||||
</comparators>
|
</comparators>
|
||||||
</test>
|
</test>
|
||||||
@ -752,11 +752,11 @@
|
|||||||
<comparators>
|
<comparators>
|
||||||
<comparator>
|
<comparator>
|
||||||
<type>SubstringComparator</type>
|
<type>SubstringComparator</type>
|
||||||
<expected-output>Set RS-6-3-1024k erasure coding policy on /ecdir</expected-output>
|
<expected-output>Set default erasure coding policy on /ecdir</expected-output>
|
||||||
</comparator>
|
</comparator>
|
||||||
<comparator>
|
<comparator>
|
||||||
<type>SubstringComparator</type>
|
<type>SubstringComparator</type>
|
||||||
<expected-output>Warning: setting erasure coding policy on a non-empty directory will not automatically convert existing files to RS-6-3-1024k erasure coding policy</expected-output>
|
<expected-output>Warning: setting erasure coding policy on a non-empty directory will not automatically convert existing files to default erasure coding policy</expected-output>
|
||||||
</comparator>
|
</comparator>
|
||||||
</comparators>
|
</comparators>
|
||||||
</test>
|
</test>
|
||||||
|
Loading…
Reference in New Issue
Block a user