gobblin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hut...@apache.org
Subject incubator-gobblin git commit: [GOBBLIN-191] Make sure cron scheduler works and tune schedule period
Date Wed, 09 Aug 2017 01:04:35 GMT
Repository: incubator-gobblin
Updated Branches:
  refs/heads/master 6c14efe76 -> a28ff2185


[GOBBLIN-191] Make sure cron scheduler works and tune schedule period

Closes #2042 from abti/service


Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/a28ff218
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/a28ff218
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/a28ff218

Branch: refs/heads/master
Commit: a28ff21852db0c231297ad75dd66027432a6537b
Parents: 6c14efe
Author: Abhishek Tiwari <abhishektiwari.btech@gmail.com>
Authored: Tue Aug 8 18:04:17 2017 -0700
Committer: Hung Tran <hutran@linkedin.com>
Committed: Tue Aug 8 18:04:17 2017 -0700

----------------------------------------------------------------------
 .../service/modules/scheduler/GobblinServiceJobScheduler.java  | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/a28ff218/gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java
----------------------------------------------------------------------
diff --git a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java
index f6f101b..5bd71c3 100644
--- a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java
+++ b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java
@@ -25,6 +25,7 @@ import java.util.Properties;
 import java.util.UUID;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
 import org.apache.helix.HelixManager;
 import org.apache.helix.InstanceType;
 import org.quartz.DisallowConcurrentExecution;
@@ -173,8 +174,13 @@ public class GobblinServiceJobScheduler extends JobScheduler implements
SpecCata
 
       try {
         Properties jobConfig = new Properties();
+        Properties flowSpecProperties = ((FlowSpec) addedSpec).getConfigAsProperties();
         jobConfig.putAll(this.properties);
         jobConfig.setProperty(ConfigurationKeys.JOB_NAME_KEY, addedSpec.getUri().toString());
+        if (flowSpecProperties.containsKey(ConfigurationKeys.JOB_SCHEDULE_KEY)
+            && StringUtils.isNotBlank(flowSpecProperties.getProperty(ConfigurationKeys.JOB_SCHEDULE_KEY)))
{
+          jobConfig.setProperty(ConfigurationKeys.JOB_SCHEDULE_KEY, flowSpecProperties.getProperty(ConfigurationKeys.JOB_SCHEDULE_KEY));
+        }
 
         this.scheduledFlowSpecs.put(addedSpec.getUri().toString(), addedSpec);
 


Mime
View raw message