[
https://issues.apache.org/jira/browse/GOBBLIN-1083?focusedWorklogId=417512&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-417512
]
ASF GitHub Bot logged work on GOBBLIN-1083:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 07/Apr/20 07:51
Start Date: 07/Apr/20 07:51
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_r404606800
##########
File path:
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SleepingTask.java
##########
@@ -20,27 +20,30 @@
import java.io.File;
import java.io.IOException;
+import org.apache.gobblin.runtime.TaskContext;
+import org.apache.gobblin.runtime.task.BaseAbstractTask;
+
import com.google.common.base.Throwables;
import com.google.common.io.Files;
import lombok.extern.slf4j.Slf4j;
-import org.apache.gobblin.runtime.TaskContext;
-import org.apache.gobblin.runtime.TaskState;
-import org.apache.gobblin.runtime.task.BaseAbstractTask;
-
@Slf4j
public class SleepingTask extends BaseAbstractTask {
public static final String TASK_STATE_FILE_KEY = "task.state.file.path";
+ public static final String SLEEPING_TASK_SLEEP_TIME =
"data.publisher.sleep.time.in.seconds";
private final long sleepTime;
private File taskStateFile;
+ private final TaskContext taskContext;
public SleepingTask(TaskContext taskContext) {
super(taskContext);
- TaskState taskState = taskContext.getTaskState();
- sleepTime =
taskState.getPropAsLong("data.publisher.sleep.time.in.seconds", 10L);
- taskStateFile = new File(taskState.getProp(TASK_STATE_FILE_KEY));
+ this.taskContext = taskContext;
+ sleepTime =
taskContext.getTaskState().getPropAsLong(SLEEPING_TASK_SLEEP_TIME, 10L);
Review comment:
why `TaskState taskState = taskContext.getTaskState();` is removed?
----------------------------------------------------------------
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: 417512)
Time Spent: 1h 40m (was: 1.5h)
> 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: 1h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)