You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2019/11/09 02:25:43 UTC

[GitHub] [incubator-gobblin] autumnust commented on a change in pull request #2803: [GOBBLIN-954] Added support to swap different HiveRegistrationPublishers

autumnust commented on a change in pull request #2803: [GOBBLIN-954] Added support to swap different HiveRegistrationPublishers
URL: https://github.com/apache/incubator-gobblin/pull/2803#discussion_r344424511
 
 

 ##########
 File path: gobblin-runtime/src/main/java/org/apache/gobblin/runtime/HiveRegTaskStateCollectorServiceHandlerImpl.java
 ##########
 @@ -39,16 +41,25 @@
   private HiveRegistrationPublisher hiveRegHandler;
 
   public HiveRegTaskStateCollectorServiceHandlerImpl(JobState jobState) {
-    hiveRegHandler = new HiveRegistrationPublisher(jobState);
+    String className = jobState
+        .getProp(ConfigurationKeys.HIVE_REG_PUBLISHER_CLASS, ConfigurationKeys.DEFAULT_HIVE_REG_PUBLISHER_CLASS);
+    try {
+      hiveRegHandler =
+          (HiveRegistrationPublisher) Class.forName(className).getConstructor(State.class).newInstance(jobState);
 
 Review comment:
   use `GobblinConstructorUtils` instead.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services