arjun4084346 commented on a change in pull request #2720: [GOBBLIN-864] add job 
error message in job state
URL: https://github.com/apache/incubator-gobblin/pull/2720#discussion_r317878723
 
 

 ##########
 File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/EventMetadataUtils.java
 ##########
 @@ -42,6 +43,26 @@ public static long getProcessedCount(List<TaskState> 
taskStates) {
     return value;
   }
 
+  /**
+   * Get failure messages
+   * @return The failure messages from the job state
+   */
+  public static String getJobFailureExceptions(JobState jobState) {
+    StringBuffer sb = new StringBuffer();
+
+    if (jobState.contains(JOB_FAILURE_MESSAGE_KEY)) {
+      sb.append(jobState.getProp(JOB_FAILURE_MESSAGE_KEY));
+    }
+    if (jobState.contains(ConfigurationKeys.JOB_FAILURE_EXCEPTION_KEY)) {
+      if (sb.length() != 0) {
+        sb.append(",");
 
 Review comment:
   Joiner does not work on null parameters

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