umustafi opened a new pull request, #3743:
URL: https://github.com/apache/gobblin/pull/3743

   Dear Gobblin maintainers,
   
   Please accept this PR. I understand that it will not be reviewed until I 
have checked off all the steps below!
   
   
   ### JIRA
   - [X] My PR addresses the following [Gobblin 
JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references 
them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
       - https://issues.apache.org/jira/browse/GOBBLIN-1881 
   
   
   ### Description
   - [X] Here are some details about my PR, including screenshots (if 
applicable):
   The following error is thrown when attempting to schedule reminder events. 
   ```
   {{The job ... referenced by the trigger does not exist.","stackTrace":[
   
{"index":0,"call":"storeTrigger","columnNumber":null,"fileName":"RAMJobStore.java","lineNumber":422,"nativeMethod":"0","source":"org.quartz.simpl.RAMJobStore"}
   ,
   
{"index":1,"call":"scheduleJob","columnNumber":null,"fileName":"QuartzScheduler.java","lineNumber":932,"nativeMethod":"0","source":"org.quartz.core.QuartzScheduler"}
   ,
   
{"index":2,"call":"scheduleJob","columnNumber":null,"fileName":"StdScheduler.java","lineNumber":258,"nativeMethod":"0","source":"org.quartz.impl.StdScheduler"}
   ,
   
{"index":3,"call":"scheduleReminderForEvent","columnNumber":null,"fileName":"FlowTriggerHandler.java","lineNumber":187,"nativeMethod":"0","source":"org.apache.gobblin.service.modules.orchestration.FlowTriggerHandler"}
   ,
   
{"index":4,"call":"handleTriggerEvent","columnNumber":null,"fileName":"FlowTriggerHandler.java","lineNumber":124,"nativeMethod":"0","source":"org.apache.gobblin.service.modules.orchestration.FlowTriggerHandler"}
   ,
   
{"index":5,"call":"orchestrate","columnNumber":null,"fileName":"Orchestrator.java","lineNumber":267,"nativeMethod":"0","source":"org.apache.gobblin.service.modules.orchestration.Orchestrator"}
   
,{"index":6,"call":"runJob","columnNumber":null,"fileName":"GobblinServiceJobScheduler.java","lineNumber":47}}
   ```
    
   The issue above from FlowTriggerHandler reveals two problems
   
   - The job referenced is not found by scheduler -> We add a check for if this 
happens by searching for the jobKey within the scheduler and emit a metric. The 
job key is constructed with flow name/group instead of job name/group, this 
could be an issue for multi-hop jobs but in general should not be. Adding logs 
to reveal more information. 
   - Upon looking closely at the code, we also need to update the job props of 
the job in the scheduler to keep track of the event to set reminder for. The 
job props we set 
[here](https://jarvis.corp.linkedin.com/codesearch/result/?name=FlowTriggerHandler.java&path=gobblin-elr%2Fgobblin-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgobblin%2Fservice%2Fmodules%2Forchestration&reponame=linkedin%2Fgobblin-elr#176)
 are never used in 
[createTriggerForJob](https://jarvis.corp.linkedin.com/codesearch/result/?name=JobScheduler.java&path=gobblin-elr%2Fgobblin-runtime%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgobblin%2Fscheduler&reponame=linkedin%2Fgobblin-elr#588)
 We want to use `StdScheduler.scheduleJob(JobDetail jobDetail, Set<? extends 
Trigger> triggersForJob, boolean replace)` to replace the `jobDetail` we 
construct when making a reminder event.
   
   ### Tests
   - [X] My PR adds the following unit tests __OR__ does not need testing for 
this extremely good reason:
   
   
   ### Commits
   - [X] My commits all reference JIRA issues in their subject lines, and I 
have squashed multiple commits if they address the same issue. In addition, my 
commits follow the guidelines from "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)":
       1. Subject is separated from body by a blank line
       2. Subject is limited to 50 characters
       3. Subject does not end with a period
       4. Subject uses the imperative mood ("add", not "adding")
       5. Body wraps at 72 characters
       6. Body explains "what" and "why", not "how"
   
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to