sv2000 commented on a change in pull request #2729: GOBBLIN-875: Emit container 
health metrics when running in cluster mode
URL: https://github.com/apache/incubator-gobblin/pull/2729#discussion_r322504103
 
 

 ##########
 File path: 
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnHelixUtils.java
 ##########
 @@ -133,4 +131,8 @@ public static void addFileAsLocalResource(FileSystem fs, 
Path destFilePath, Loca
 
     return environmentVariableMap;
   }
+
+  public static String getContainerNum(String containerId) {
+    return "container-" + containerId.substring(containerId.lastIndexOf("_") + 
1);
 
 Review comment:
   We want the substring starting from the char immediately following the last 
"_". e.g. if containerId = "container_e94_1567552810874_2132400_01_000001", we 
want to return 
   "container-000001". Added javadoc to make the behavior clear.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to