@RestrictedApi(explanation = "Should only be called in ScheduledChore", link = "",
      allowedOnPath = ".*/org/apache/hadoop/hbase/(ScheduledChore|ChoreService).java")
  synchronized void cancelChore(ScheduledChore chore, boolean mayInterruptIfRunning) {
    if (scheduledChores.containsKey(chore)) {
      ScheduledFuture<?> future = scheduledChores.get(chore);
      future.cancel(mayInterruptIfRunning);
      scheduledChores.remove(chore);

      // Removing a chore that was missing its start time means it may be possible
      // to reduce the number of threads
      if (choresMissingStartTime.containsKey(chore)) {
        choresMissingStartTime.remove(chore);
        requestCorePoolDecrease();
      }
    }
  }
Cancel any ongoing schedules that this chore has with the implementer of this interface.
<p/>
Call {@link ScheduledChore#cancel(boolean)} to cancel a {@link ScheduledChore}, in
{@link ScheduledChore#cancel(boolean)} method we will call this method to remove the
{@link ScheduledChore} from this {@link ChoreService}.
hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java