[ 
https://issues.apache.org/jira/browse/GOBBLIN-2129?focusedWorklogId=929721&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-929721
 ]

ASF GitHub Bot logged work on GOBBLIN-2129:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Aug/24 02:58
            Start Date: 12/Aug/24 02:58
    Worklog Time Spent: 10m 
      Work Description: arjun4084346 commented on code in PR #4023:
URL: https://github.com/apache/gobblin/pull/4023#discussion_r1713129157


##########
gobblin-runtime/src/main/java/org/apache/gobblin/scheduler/JobScheduler.java:
##########
@@ -412,20 +411,19 @@ protected void logNewlyScheduledJob(JobDetail job, 
Trigger trigger) {
 
   /**
    * Unschedule and delete a job.
+   * Returns true is job was scheduled and is successfully unscheduled, false 
otherwise
    *
    * @param jobName Job name
    * @throws JobException when there is anything wrong unschedule the job
    */
-  public void unscheduleJob(String jobName)
+  public boolean unscheduleJob(String jobName)

Review Comment:
   yes, RC is that it throws exception in GobblinServiceJobScheduler when the 
job does not exist in the map.
   If we ignore when the scheduledJobs does not contain the key and return 
normally (return void, instead of throwing exception like it is doing now), 
then the next line `this.orchestrator.remove(deletedSpec, headers)` will get 
executed, which I want to avoid.
   Basically, right now we are throwing exceptions to avoid running 
`this.orchestrator.remove(deletedSpec, headers)`, the only other way to tell 
the caller not to run further statements is return a flag.
   





Issue Time Tracking
-------------------

    Worklog Id:     (was: 929721)
    Time Spent: 20m  (was: 10m)

> do not throw log polluting exceptions in GobblinServiceJobScheduler
> -------------------------------------------------------------------
>
>                 Key: GOBBLIN-2129
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2129
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to