public boolean maybeRegisterForFinishedStateNotifications(
        boolean currentFinishableState) {
      if (!registeredForNotifications.getAndSet(true)) {
        return taskRunnerCallable.getFragmentInfo()
            .registerForFinishableStateUpdates(this, currentFinishableState);
      } else {
        // State has not changed / already registered for notifications.
        return true;
      }
    }
@param currentFinishableState
@return true if the state has not changed from currentFinishableState, false otherwise
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskExecutorService.java