HDFS-11899. ASF License warnings generated intermittently in trunk. Contributed by Yiqun Lin.
This commit is contained in:
parent
882891a643
commit
fe76c59954
|
@ -1022,14 +1022,14 @@ public class TestBalancer {
|
||||||
if (!p.getExcludedNodes().isEmpty()) {
|
if (!p.getExcludedNodes().isEmpty()) {
|
||||||
args.add("-exclude");
|
args.add("-exclude");
|
||||||
if (useFile) {
|
if (useFile) {
|
||||||
excludeHostsFile = new File ("exclude-hosts-file");
|
excludeHostsFile = GenericTestUtils.getTestDir("exclude-hosts-file");
|
||||||
PrintWriter pw = new PrintWriter(excludeHostsFile);
|
PrintWriter pw = new PrintWriter(excludeHostsFile);
|
||||||
for (String host : p.getExcludedNodes()) {
|
for (String host : p.getExcludedNodes()) {
|
||||||
pw.write( host + "\n");
|
pw.write( host + "\n");
|
||||||
}
|
}
|
||||||
pw.close();
|
pw.close();
|
||||||
args.add("-f");
|
args.add("-f");
|
||||||
args.add("exclude-hosts-file");
|
args.add(excludeHostsFile.getAbsolutePath());
|
||||||
} else {
|
} else {
|
||||||
args.add(StringUtils.join(p.getExcludedNodes(), ','));
|
args.add(StringUtils.join(p.getExcludedNodes(), ','));
|
||||||
}
|
}
|
||||||
|
@ -1039,14 +1039,14 @@ public class TestBalancer {
|
||||||
if (!p.getIncludedNodes().isEmpty()) {
|
if (!p.getIncludedNodes().isEmpty()) {
|
||||||
args.add("-include");
|
args.add("-include");
|
||||||
if (useFile) {
|
if (useFile) {
|
||||||
includeHostsFile = new File ("include-hosts-file");
|
includeHostsFile = GenericTestUtils.getTestDir("include-hosts-file");
|
||||||
PrintWriter pw = new PrintWriter(includeHostsFile);
|
PrintWriter pw = new PrintWriter(includeHostsFile);
|
||||||
for (String host : p.getIncludedNodes()) {
|
for (String host : p.getIncludedNodes()) {
|
||||||
pw.write( host + "\n");
|
pw.write( host + "\n");
|
||||||
}
|
}
|
||||||
pw.close();
|
pw.close();
|
||||||
args.add("-f");
|
args.add("-f");
|
||||||
args.add("include-hosts-file");
|
args.add(includeHostsFile.getAbsolutePath());
|
||||||
} else {
|
} else {
|
||||||
args.add(StringUtils.join(p.getIncludedNodes(), ','));
|
args.add(StringUtils.join(p.getIncludedNodes(), ','));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue