[
https://issues.apache.org/jira/browse/GOBBLIN-744?focusedWorklogId=231461&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-231461
]
ASF GitHub Bot logged work on GOBBLIN-744:
------------------------------------------
Author: ASF GitHub Bot
Created on: 23/Apr/19 15:31
Start Date: 23/Apr/19 15:31
Worklog Time Spent: 10m
Work Description: shirshanka commented on pull request #2609:
GOBBLIN-744: Support cancellation of a Helix workflow via a DELETE Spec.
URL: https://github.com/apache/incubator-gobblin/pull/2609#discussion_r277739662
##########
File path:
gobblin-cluster/src/test/java/org/apache/gobblin/cluster/ClusterIntegrationTest.java
##########
@@ -51,28 +68,30 @@ public void testJobShouldComplete()
runAndVerify();
}
- @Test void testJobShouldGetCancelled() throws Exception {
- this.suite =new IntegrationJobCancelSuite();
+ private HelixManager getHelixManager() {
Config helixConfig = this.suite.getManagerConfig();
String clusterName =
helixConfig.getString(GobblinClusterConfigurationKeys.HELIX_CLUSTER_NAME_KEY);
String instanceName = ConfigUtils.getString(helixConfig,
GobblinClusterConfigurationKeys.HELIX_INSTANCE_NAME_KEY,
GobblinClusterManager.class.getSimpleName());
- String zkConnectString =
helixConfig.getString(GobblinClusterConfigurationKeys.ZK_CONNECTION_STRING_KEY);
+ this.zkConnectString =
helixConfig.getString(GobblinClusterConfigurationKeys.ZK_CONNECTION_STRING_KEY);
HelixManager helixManager =
HelixManagerFactory.getZKHelixManager(clusterName, instanceName,
InstanceType.CONTROLLER, zkConnectString);
+ return helixManager;
+ }
+ @Test void testJobShouldGetCancelled() throws Exception {
+ this.suite =new IntegrationJobCancelSuite();
+ HelixManager helixManager = getHelixManager();
suite.startCluster();
-
helixManager.connect();
TaskDriver taskDriver = new TaskDriver(helixManager);
- while (TaskDriver.getWorkflowContext(helixManager,
IntegrationJobCancelSuite.JOB_ID) == null) {
- log.warn("Waiting for the job to start...");
- Thread.sleep(1000L);
- }
+ AssertWithBackoff asserter1 =
AssertWithBackoff.create().maxSleepMs(1000).backoffFactor(1);
+ asserter1.assertTrue(isTaskStarted(helixManager,
IntegrationJobCancelSuite.JOB_ID),
Review comment:
you could chain the entire call without needing the local variable asserter1
----------------------------------------------------------------
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: 231461)
Time Spent: 5.5h (was: 5h 20m)
> Support cancellation of a Helix workflow via a DELETE Spec
> ----------------------------------------------------------
>
> Key: GOBBLIN-744
> URL: https://issues.apache.org/jira/browse/GOBBLIN-744
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-cluster
> Affects Versions: 0.15.0
> Reporter: Sudarshan Vasudevan
> Assignee: Hung Tran
> Priority: Major
> Fix For: 0.15.0
>
> Time Spent: 5.5h
> Remaining Estimate: 0h
>
> This task supports the ability to interrupt and cancel a running job on a
> Gobblin Helix cluster via a DELETE Spec submitted to the
> JobConfigurationManager. The DELETE Spec should have
> "gobblin.cluster.shouldCancelRunningJobOnDelete" set to true for cancelling a
> running job. The default behavior is to simply delete the corresponding
> JobSpec from the JobCatalog.
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)