sv2000 commented on a change in pull request #3065:
URL: https://github.com/apache/incubator-gobblin/pull/3065#discussion_r458310351



##########
File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/mapreduce/MRJobLauncher.java
##########
@@ -771,6 +780,20 @@ protected void setup(Context context) {
         gobblinJobState.setProp(entry.getKey(), 
entry.getValue().unwrapped().toString());
       }
 
+      // add some more MR task related configs
+
+      String[] tokens = taskAttemptId.toString().split("_");
+      TaskType taskType = taskAttemptId.getTaskType();
+      gobblinJobState.setProp(MR_TYPE_KEY, taskType.name());
+
+      if (taskType.equals(TaskType.MAP)) {
+        gobblinJobState.setProp(MAPPER_TASK_NUM_KEY, tokens[4]);

Review comment:
       Add a check for the length of the "tokens" array or an assertion that 
tokens should be of length 6. Further, you may want to access the map/reduce 
task num as tokens[tokens.length - 1].  




----------------------------------------------------------------
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


Reply via email to