You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gobblin.apache.org by ap...@apache.org on 2021/08/26 00:02:58 UTC

[gobblin] branch master updated: [GOBBLIN-1526] Fix bug with binding local commit property (#3377)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4e22647  [GOBBLIN-1526] Fix bug with binding local commit property (#3377)
4e22647 is described below

commit 4e226475fd93a4e3adfa9cc625d7ca15b36873d4
Author: Jack Moseley <jm...@linkedin.com>
AuthorDate: Wed Aug 25 17:02:53 2021 -0700

    [GOBBLIN-1526] Fix bug with binding local commit property (#3377)
    
    Local commit property was bound to the wrong thing, which would cause it to always be false because java conversion from string to boolean will always be false unless the string value is "true".
---
 .../apache/gobblin/service/modules/core/GobblinServiceGuiceModule.java  | 2 +-
 .../org/apache/gobblin/service/modules/core/GobblinServiceHATest.java   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceGuiceModule.java b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceGuiceModule.java
index 41e0174..1a1bce8 100644
--- a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceGuiceModule.java
+++ b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceGuiceModule.java
@@ -133,7 +133,7 @@ public class GobblinServiceGuiceModule implements Module {
 
     binder.bindConstant()
         .annotatedWith(Names.named(InjectionNames.FLOW_CATALOG_LOCAL_COMMIT))
-        .to(serviceConfig.getServiceName());
+        .to(serviceConfig.isFlowCatalogLocalCommit());
 
     binder.bind(FlowConfigsResourceHandler.class).to(GobblinServiceFlowConfigResourceHandler.class);
     binder.bind(FlowConfigsV2ResourceHandler.class).to(GobblinServiceFlowConfigV2ResourceHandler.class);
diff --git a/gobblin-service/src/test/java/org/apache/gobblin/service/modules/core/GobblinServiceHATest.java b/gobblin-service/src/test/java/org/apache/gobblin/service/modules/core/GobblinServiceHATest.java
index 3a03be7..29782af 100644
--- a/gobblin-service/src/test/java/org/apache/gobblin/service/modules/core/GobblinServiceHATest.java
+++ b/gobblin-service/src/test/java/org/apache/gobblin/service/modules/core/GobblinServiceHATest.java
@@ -154,6 +154,7 @@ public class GobblinServiceHATest {
     commonServiceCoreProperties.put(ConfigurationKeys.STATE_STORE_FACTORY_CLASS_KEY, MysqlJobStatusStateStoreFactory.class.getName());
     commonServiceCoreProperties.put(ServiceConfigKeys.GOBBLIN_SERVICE_JOB_STATUS_MONITOR_ENABLED_KEY, false);
     commonServiceCoreProperties.put(ServiceConfigKeys.GOBBLIN_SERVICE_GIT_CONFIG_MONITOR_ENABLED_KEY, false);
+    commonServiceCoreProperties.put(ServiceConfigKeys.GOBBLIN_SERVICE_FLOW_CATALOG_LOCAL_COMMIT, false);
 
     Properties node1ServiceCoreProperties = new Properties();
     node1ServiceCoreProperties.putAll(commonServiceCoreProperties);