autumnust commented on a change in pull request #2719: [GOBBLIN-863]Handle race 
condition issue for hive registration
URL: https://github.com/apache/incubator-gobblin/pull/2719#discussion_r318241484
 
 

 ##########
 File path: 
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegister.java
 ##########
 @@ -94,29 +94,32 @@ protected HiveRegister(State state) {
 
       @Override
       public Void call() throws Exception {
+        try {
+          if (spec instanceof HiveSpecWithPredicates && 
!evaluatePredicates((HiveSpecWithPredicates) spec)) {
+            log.info("Skipping " + spec + " since predicates return false");
+            return null;
+          }
 
-        if (spec instanceof HiveSpecWithPredicates && 
!evaluatePredicates((HiveSpecWithPredicates) spec)) {
-          log.info("Skipping " + spec + " since predicates return false");
-          return null;
-        }
-
-        if (spec instanceof HiveSpecWithPreActivities) {
-          for (Activity activity : ((HiveSpecWithPreActivities) 
spec).getPreActivities()) {
-            activity.execute(HiveRegister.this);
+          if (spec instanceof HiveSpecWithPreActivities) {
+            for (Activity activity : ((HiveSpecWithPreActivities) 
spec).getPreActivities()) {
+              activity.execute(HiveRegister.this);
+            }
           }
-        }
 
-        registerPath(spec);
+          registerPath(spec);
 
 Review comment:
   remove this space

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to