HDFS-17520. [BugFix] TestDFSAdmin.testAllDatanodesReconfig and TestDFSAdmin.testDecommissionDataNodesReconfig failed (#6812) Contributed by Zengqiang Xu.
Reviewed-by: Vinayakumar B <vinayakumarb@apache.org> Signed-off-by: Shilun Fan <slfan1989@apache.org>
This commit is contained in:
parent
2e77b7b02c
commit
cab0f4c9ec
@ -2095,22 +2095,20 @@ int getReconfigurationStatus(final String nodeType, final String address, final
|
||||
if (errMsg != null) {
|
||||
err.println(errMsg);
|
||||
return 1;
|
||||
} else {
|
||||
out.print(outMsg);
|
||||
}
|
||||
|
||||
if (status != null) {
|
||||
if (!status.hasTask()) {
|
||||
out.println("no task was found.");
|
||||
out.println(outMsg + "no task was found.");
|
||||
return 0;
|
||||
}
|
||||
out.print("started at " + new Date(status.getStartTime()));
|
||||
String startMsg = outMsg + "started at " + new Date(status.getStartTime());
|
||||
if (!status.stopped()) {
|
||||
out.println(" and is still running.");
|
||||
out.println(startMsg + " and is still running.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
out.println(" and finished at "
|
||||
out.println(startMsg + " and finished at "
|
||||
+ new Date(status.getEndTime()).toString() + ".");
|
||||
if (status.getStatus() == null) {
|
||||
// Nothing to report.
|
||||
@ -2133,6 +2131,7 @@ int getReconfigurationStatus(final String nodeType, final String address, final
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.println(outMsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user