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 d927056  [GOBBLIN-1522] Use FlowConfigsV2ResourceHandler when 
forwarding specs to master instances (#3373)
d927056 is described below

commit d9270564a5a3fb098505358d343c279e38c9e257
Author: Arjun Singh Bora <[email protected]>
AuthorDate: Mon Aug 23 14:22:11 2021 -0700

    [GOBBLIN-1522] Use FlowConfigsV2ResourceHandler when forwarding specs to 
master instances (#3373)
    
    We should avoid the use of FlowConfigResourceLocalHandler because it is 
deprecated in favor of FlowConfigV2ResourceLocalHandler.
    GobblinServiceManager currently uses FlowConfigResourceLocalHandler to 
create ControllerUserDefinedMessageHandlerFactory. The result of this is that 
when a helix message sent by a slave instance of the master instance is 
received it is handled by a V1 local handler, which we want to avoid.
---
 .../apache/gobblin/service/modules/core/GobblinServiceManager.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceManager.java
 
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceManager.java
index 9bd6cd8..e0b4d4d 100644
--- 
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceManager.java
+++ 
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceManager.java
@@ -394,7 +394,7 @@ public class GobblinServiceManager implements 
ApplicationLauncher, StandardMetri
   }
 
   private void ensureInjected() {
-    if (resourceHandler == null) {
+    if (v2ResourceHandler == null) {
       throw new IllegalStateException("GobblinServiceManager should be 
constructed through Guice dependency injection "
           + "or through a static factory method");
     }
@@ -514,7 +514,7 @@ public class GobblinServiceManager implements 
ApplicationLauncher, StandardMetri
         this.helixManager.get()
             .getMessagingService()
             
.registerMessageHandlerFactory(Message.MessageType.USER_DEFINE_MSG.toString(),
-                new 
ControllerUserDefinedMessageHandlerFactory(flowCatalogLocalCommit, scheduler, 
resourceHandler,
+                new 
ControllerUserDefinedMessageHandlerFactory(flowCatalogLocalCommit, scheduler, 
v2ResourceHandler,
                     configuration.getServiceName()));
       }
     } catch (Exception e) {

Reply via email to