[
https://issues.apache.org/jira/browse/GOBBLIN-1083?focusedWorklogId=417536&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-417536
]
ASF GitHub Bot logged work on GOBBLIN-1083:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 07/Apr/20 08:16
Start Date: 07/Apr/20 08:16
Worklog Time Spent: 10m
Work Description: arjun4084346 commented on pull request #2923:
[GOBBLIN-1083] Unit test improving & return failed when helix task cancelled
URL: https://github.com/apache/incubator-gobblin/pull/2923#discussion_r404622306
##########
File path:
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/task/BaseAbstractTask.java
##########
@@ -91,4 +94,13 @@ public String getProgress() {
public boolean isSpeculativeExecutionSafe() {
return false;
}
+
+ /**
+ * Similar to org.apache.gobblin.runtime.Task#failTask(java.lang.Throwable),
we need to propagate exception thrown
+ * in workunit level by setting {@link
ConfigurationKeys#TASK_FAILURE_EXCEPTION_KEY}
+ */
+ protected void failTask(Throwable t, TaskContext taskContext) {
+
taskContext.getTaskState().setWorkingState(WorkUnitState.WorkingState.FAILED);
+
taskContext.getTaskState().setProp(ConfigurationKeys.TASK_FAILURE_EXCEPTION_KEY,
Throwables.getStackTraceAsString(t));
+ }
Review comment:
No failureEvent here?
Is there a reasonable way to not have duplicate code?
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 417536)
Time Spent: 2h 20m (was: 2h 10m)
> Maximize helix retry by returning failure when cancel
> -----------------------------------------------------
>
> Key: GOBBLIN-1083
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1083
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Lei Sun
> Priority: Major
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)