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

 ##########
 File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobState.java
 ##########
 @@ -326,6 +326,23 @@ public void setTaskCount(int taskCount) {
     this.taskCount = taskCount;
   }
 
+  /**
+   * If not already present, set the {@link 
ConfigurationKeys#JOB_FAILURE_EXCEPTION_KEY} to a {@link String}
+   * representation of the given {@link Throwable}.
+   */
+  public void setJobFailureException(Throwable jobFailureException) {
+    if (!this.contains(ConfigurationKeys.JOB_FAILURE_EXCEPTION_KEY)) {
+      this.setProp(ConfigurationKeys.JOB_FAILURE_EXCEPTION_KEY,
+          Throwables.getStackTraceAsString(jobFailureException));
+    }
+  }
+
+  public void setJobFailureException(String jobFailureException) {
+    if (!this.contains(ConfigurationKeys.JOB_FAILURE_EXCEPTION_KEY)) {
 
 Review comment:
   Same thing. Append would be better.

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