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) {
|
if (errMsg != null) {
|
||||||
err.println(errMsg);
|
err.println(errMsg);
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
|
||||||
out.print(outMsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status != null) {
|
if (status != null) {
|
||||||
if (!status.hasTask()) {
|
if (!status.hasTask()) {
|
||||||
out.println("no task was found.");
|
out.println(outMsg + "no task was found.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
out.print("started at " + new Date(status.getStartTime()));
|
String startMsg = outMsg + "started at " + new Date(status.getStartTime());
|
||||||
if (!status.stopped()) {
|
if (!status.stopped()) {
|
||||||
out.println(" and is still running.");
|
out.println(startMsg + " and is still running.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
out.println(" and finished at "
|
out.println(startMsg + " and finished at "
|
||||||
+ new Date(status.getEndTime()).toString() + ".");
|
+ new Date(status.getEndTime()).toString() + ".");
|
||||||
if (status.getStatus() == null) {
|
if (status.getStatus() == null) {
|
||||||
// Nothing to report.
|
// Nothing to report.
|
||||||
@ -2133,6 +2131,7 @@ int getReconfigurationStatus(final String nodeType, final String address, final
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
out.println(outMsg);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user