protected void onNewState(OperationState state, OperationState prevState) {
    switch(state) {
      case RUNNING:
        markOperationStartTime();
        break;
      case ERROR:
      case FINISHED:
      case CANCELED:
        markOperationCompletedTime();
        break;
    }

    if (state.isTerminal()) {
      // Unlock the execution thread as operation is already terminated.
      opTerminateMonitorLatch.countDown();
    }
  }
Verify if the given fetch orientation is part of the supported orientation types.
@param orientation
@param supportedOrientations
@throws HiveSQLException
service/src/java/org/apache/hive/service/cli/operation/Operation.java