|
@@ -25,7 +25,7 @@ import java.util.ListIterator;
|
|
|
import org.apache.commons.cli.CommandLine;
|
|
|
import org.apache.commons.cli.HelpFormatter;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.commons.lang3.text.StrBuilder;
|
|
|
+import org.apache.commons.text.TextStringBuilder;
|
|
|
import org.apache.hadoop.conf.Configuration;
|
|
|
import org.apache.hadoop.hdfs.server.diskbalancer.DiskBalancerException;
|
|
|
import org.apache.hadoop.hdfs.server.diskbalancer.datamodel.DiskBalancerDataNode;
|
|
@@ -67,7 +67,7 @@ public class ReportCommand extends Command {
|
|
|
|
|
|
@Override
|
|
|
public void execute(CommandLine cmd) throws Exception {
|
|
|
- StrBuilder result = new StrBuilder();
|
|
|
+ TextStringBuilder result = new TextStringBuilder();
|
|
|
String outputLine = "Processing report command";
|
|
|
recordOutput(result, outputLine);
|
|
|
|
|
@@ -99,7 +99,7 @@ public class ReportCommand extends Command {
|
|
|
getPrintStream().println(result.toString());
|
|
|
}
|
|
|
|
|
|
- private void handleTopReport(final CommandLine cmd, final StrBuilder result,
|
|
|
+ private void handleTopReport(final CommandLine cmd, final TextStringBuilder result,
|
|
|
final String nodeFormat) throws IllegalArgumentException {
|
|
|
Collections.sort(getCluster().getNodes(), Collections.reverseOrder());
|
|
|
|
|
@@ -131,7 +131,7 @@ public class ReportCommand extends Command {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void handleNodeReport(final CommandLine cmd, StrBuilder result,
|
|
|
+ private void handleNodeReport(final CommandLine cmd, TextStringBuilder result,
|
|
|
final String nodeFormat, final String volumeFormat) throws Exception {
|
|
|
String outputLine = "";
|
|
|
/*
|
|
@@ -175,7 +175,7 @@ public class ReportCommand extends Command {
|
|
|
/**
|
|
|
* Put node report lines to string buffer.
|
|
|
*/
|
|
|
- private void recordNodeReport(StrBuilder result, DiskBalancerDataNode dbdn,
|
|
|
+ private void recordNodeReport(TextStringBuilder result, DiskBalancerDataNode dbdn,
|
|
|
final String nodeFormat, final String volumeFormat) throws Exception {
|
|
|
final String trueStr = "True";
|
|
|
final String falseStr = "False";
|