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