brumi1024 commented on code in PR #7013:
URL: https://github.com/apache/hadoop/pull/7013#discussion_r1732826984
##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AMWebServices.java:
##########
@@ -113,9 +113,17 @@ private void init() {
response.setContentType(null);
}
- /**
- * convert a job id string to an actual job and handle all the error
checking.
- */
+ public static Job getJobFromContainerIdString(String cid, AppContext appCtx)
+ throws NotFoundException {
+ //example container_e06_1724414851587_0004_01_000001
+ String[] parts = cid.split("_");
+ return getJobFromJobIdString("job_" + parts[2] + "_" + parts[3], appCtx);
Review Comment:
Nit: the string "job" and the separators could be replaced with the public
static constants from the JobID class:
https://github.com/apache/hadoop/blob/f3c3d9e0c6eae02dd21f875097ef76d85025ffe4/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobID.java#L51
--
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]