arjun4084346 commented on a change in pull request #3277:
URL: https://github.com/apache/gobblin/pull/3277#discussion_r630380253



##########
File path: 
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixJobScheduler.java
##########
@@ -370,9 +372,15 @@ public void 
handleDeleteJobConfigArrival(DeleteJobConfigArrivalEvent deleteJobAr
   }
 
   @Subscribe
-  public void handleCancelJobConfigArrival(CancelJobConfigArrivalEvent 
cancelJobArrival)
+  public void handleJobConfigArrival(JobConfigArrivalEvent jobArrival)
       throws InterruptedException {
-    String jobUri = cancelJobArrival.getJoburi();
+    String jobUri = jobArrival.uri.toString();
+
+    if (jobArrival.verb != SpecExecutor.Verb.CANCEL) {
+      LOGGER.info("Received {} event for job uri {}. Taking no action.", 
jobArrival.verb, jobUri);

Review comment:
       For now, this method `public void 
handleJobConfigArrival(JobConfigArrivalEvent jobArrival)` should be only 
triggered for cancel jobs, because add/update/delete uses their own unique 
`XXXJobConfigArrivalEvent`
   I added this log, so that in future, if someone adds a new verb, or moves 
add/update/delete to use the generic `JobConfigArrivalEvent` he should get a 
log that for now, only CANCEL are being handled.
   It could have been a `warn` message actually.
   Because only cancel requests are calling this method, it should not spam the 
logs. In fact, it should not come here at all




-- 
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]


Reply via email to