Interface FragmentContext.ExecutorState

Enclosing interface:
FragmentContext

public static interface FragmentContext.ExecutorState
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Check if an operation should continue.
    void
    Inform the executor if a exception occurs and fragment should be failed.
    Deprecated.
    boolean
    Deprecated.
    boolean
    Tells individual operations whether they should continue.
  • Method Details

    • shouldContinue

      boolean shouldContinue()
      Tells individual operations whether they should continue. In some cases, an external event (typically cancellation) will mean that the fragment should prematurely exit execution. Long running operations should check this every so often so that Drill is responsive to cancellation operations.
      Returns:
      False if the action should terminate immediately, true if everything is okay.
    • checkContinue

      void checkContinue()
      Check if an operation should continue. In some cases, an external event (typically cancellation) will mean that the fragment should prematurely exit execution. Long running operations should check this every so often so that Drill is responsive to cancellation operations.

      Throws QueryCancelledException if the query (fragment) should stop. The fragment executor interprets this as an exception it, itself, requested, and will call the operator's close() method to release resources. Operators should not catch and handle this exception, and should only call this method when the operator holds no transient resources (such as local variables.)

      Throws:
      QueryCancelledException - if the query (fragment) should stop.
    • fail

      void fail(Throwable t)
      Inform the executor if a exception occurs and fragment should be failed.
      Parameters:
      t - The exception that occurred.
    • isFailed

      @Deprecated boolean isFailed()
      Deprecated.
    • getFailureCause

      @Deprecated Throwable getFailureCause()
      Deprecated.