devmadhuu commented on code in PR #6376:
URL: https://github.com/apache/ozone/pull/6376#discussion_r1550931056
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NodeEndpoint.java:
##########
@@ -171,4 +187,75 @@ private DatanodeStorageReport
getStorageReport(DatanodeDetails datanode) {
long committed = nodeStat.getCommitted().get();
return new DatanodeStorageReport(capacity, used, remaining, committed);
}
+
+ /**
+ * This GET API provides the information of all datanodes for which
decommissioning is initiated.
+ * @return the wrapped Response output
+ */
+ @GET
+ @Path("/decommission/info")
+ public Response getDatanodesDecommissionInfo() {
+ // Command to execute
+ List<String> commandArgs = Arrays.asList("ozone", "admin", "datanode",
"status", "decommission", "--json");
+
+ return getDecommissionStatusResponse(commandArgs);
Review Comment:
Since `src/shell/ozone/ozone` is being distributed as part of ozone
binaries, this should allow user to set explicitly if path is not set
correctly. If it’s installed from Apache opensource on-prem, we have to put the
ozone script in PATH manually, the classpath construction will be handled by
the ozone script and It should work automatically if Java Home is set.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]