This is an automated email from the ASF dual-hosted git repository.
lesun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git
The following commit(s) were added to refs/heads/master by this push:
new 93584ea [GOBBLIN-1249] More failure info when MRTask wrapped up
93584ea is described below
commit 93584ea5ca02252146190b96032e696d9badbe99
Author: Lei Sun <[email protected]>
AuthorDate: Fri Aug 28 15:31:29 2020 -0700
[GOBBLIN-1249] More failure info when MRTask wrapped up
More failure info when MRTask wrapped up
Address comments
Closes #3089 from autumnust/failureInfoMR
---
.../src/main/java/org/apache/gobblin/runtime/mapreduce/MRTask.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/mapreduce/MRTask.java
b/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/mapreduce/MRTask.java
index 439b805..ab9341a 100644
---
a/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/mapreduce/MRTask.java
+++
b/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/mapreduce/MRTask.java
@@ -29,6 +29,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.mapreduce.Job;
+import org.apache.hadoop.mapreduce.JobStatus;
/**
@@ -115,8 +116,11 @@ public class MRTask extends BaseAbstractTask {
this.onMRTaskComplete(true, null);
} else {
this.eventSubmitter.submit(Events.MR_JOB_FAILED, Events.JOB_URL,
job.getTrackingURL());
+ JobStatus jobStatus = job.getStatus();
this.onMRTaskComplete (false,
- new IOException(String.format("MR Job:%s is not successful",
job.getTrackingURL())));
+ new IOException(String.format("MR Job:%s is not successful,
failure info: %s",
+ job.getTrackingURL(), jobStatus == null ? "Job status not
available to inspect for this failing instance."
+ : job.getStatus().getFailureInfo())));
}
} catch (Throwable t) {
log.error("Failed to run MR job.", t);