Skip to content

Commit

Permalink
HDFS-17520. [BugFix] TestDFSAdmin.testAllDatanodesReconfig and TestDF…
Browse files Browse the repository at this point in the history
…SAdmin.testDecommissionDataNodesReconfig failed (#6812)  Contributed by Zengqiang Xu.

Reviewed-by: Vinayakumar B <[email protected]>
Signed-off-by: Shilun Fan <[email protected]>
  • Loading branch information
ZanderXu authored May 14, 2024
1 parent 2e77b7b commit cab0f4c
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -2133,6 +2131,7 @@ int getReconfigurationStatus(final String nodeType, final String address, final
}
}
} else {
out.println(outMsg);
return 1;
}

Expand Down

0 comments on commit cab0f4c

Please sign in to comment.