This is an automated email from the ASF dual-hosted git repository.

suvasude pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git


The following commit(s) were added to refs/heads/master by this push:
     new 80071e3  [GOBBLIN-1219] do not schedule flow spec from slave instance 
of GobblinServiceJobScheduler
80071e3 is described below

commit 80071e3d84b96a9a82baa9387f27e811b61a9032
Author: Arjun <[email protected]>
AuthorDate: Tue Jul 21 16:14:52 2020 -0700

    [GOBBLIN-1219] do not schedule flow spec from slave instance of 
GobblinServiceJobScheduler
    
    Closes #3067 from arjun4084346/addDagOnSlaveNode
---
 .../modules/restli/GobblinServiceFlowConfigResourceHandler.java      | 2 +-
 .../service/modules/scheduler/GobblinServiceJobScheduler.java        | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/restli/GobblinServiceFlowConfigResourceHandler.java
 
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/restli/GobblinServiceFlowConfigResourceHandler.java
index 567ab70..0d862d1 100644
--- 
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/restli/GobblinServiceFlowConfigResourceHandler.java
+++ 
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/restli/GobblinServiceFlowConfigResourceHandler.java
@@ -122,7 +122,7 @@ public class GobblinServiceFlowConfigResourceHandler 
implements FlowConfigsResou
         CreateResponse response = null;
         if (this.flowCatalogLocalCommit) {
           // We will handle FS I/O locally for load balance before forwarding 
to remote node.
-          response = this.localHandler.createFlowConfig(flowConfig, false);
+          response = this.localHandler.createFlowConfig(flowConfig, true);
         }
 
         if (!flowConfig.hasExplain() || !flowConfig.isExplain()) {
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 5c70807..fb17a87 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
@@ -290,10 +290,11 @@ public class GobblinServiceJobScheduler extends 
JobScheduler implements SpecCata
 
     boolean compileSuccess = FlowCatalog.isCompileSuccessful(response);
 
-    if (isExplain || !compileSuccess) {
+    if (isExplain || !compileSuccess || !this.isActive) {
       // todo: in case of a scheudled job, we should also check if the job 
schedule is a valid cron schedule
       //  so it can be scheduled
-      _log.info("Ignoring the spec {}. isExplain: {}, compileSuccess: {}", 
addedSpec, isExplain, compileSuccess);
+      _log.info("Ignoring the spec {}. isExplain: {}, compileSuccess: {}, 
master: {}",
+          addedSpec, isExplain, compileSuccess, this.isActive);
       return new AddSpecResponse<>(response);
     }
 

Reply via email to