[ 
https://issues.apache.org/jira/browse/GOBBLIN-1068?focusedWorklogId=397975&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-397975
 ]

ASF GitHub Bot logged work on GOBBLIN-1068:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Mar/20 23:31
            Start Date: 04/Mar/20 23:31
    Worklog Time Spent: 10m 
      Work Description: sv2000 commented on pull request #2907: 
[GOBBLIN-1068]Clean up cyclic logic in task cancellation
URL: https://github.com/apache/incubator-gobblin/pull/2907#discussion_r387987780
 
 

 ##########
 File path: 
gobblin-cluster/src/test/java/org/apache/gobblin/cluster/suite/IntegrationJobCancelSuite.java
 ##########
 @@ -40,15 +42,23 @@
         ConfigurationKeys.SOURCE_CLASS_KEY, 
"org.apache.gobblin.cluster.SleepingCustomTaskSource",
         ConfigurationKeys.JOB_ID_KEY, JOB_ID,
         GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_ENABLED_KEY, 
Boolean.TRUE,
-        GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_SECONDS, 10L, 
SleepingTask.TASK_STATE_FILE_KEY, TASK_STATE_FILE))
-        .withFallback(rawJobConfig);
+        GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_SECONDS, 10L,
+
+        // Put SleepingTask in infinite sleep so that cancellation thereby 
ensuring cancellation to happen.
+        SleepingTask.TASK_STATE_FILE_KEY, TASK_STATE_FILE))
+        .withFallback(rawJobConfig.withValue(SLEEPING_TASK_SLEEP_TIME, 
ConfigValueFactory.fromAnyRef(-1)));
     return ImmutableMap.of(JOB_NAME, newConfig);
   }
 
+  /**
+   * Note This verification now ties to {@link SleepingTask} which is not 
ideal.
+   */
   @Override
   public void waitForAndVerifyOutputFiles() throws Exception {
+    // Sleeing task is in infinite sleeping, so unless an cancelling is 
hitting task execution, this line won't be printed.
 
 Review comment:
   Change comment to: "SleepingTask is in an infinite sleep. The log line is 
printed only when a cancellation in invoked."
 
----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 397975)
    Time Spent: 1h 20m  (was: 1h 10m)

> Clean cyclic logic in task cancellation in Gobblin Task
> -------------------------------------------------------
>
>                 Key: GOBBLIN-1068
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1068
>             Project: Apache Gobblin
>          Issue Type: Bug
>            Reporter: Lei Sun
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to