Class Driver

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  Driver.State  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      clear resource used by this fragment instance
      void failed​(java.lang.Throwable t)
      fail current driver
      FragmentInstanceId getInfo()
      the id information about this IDriver.
      ISinkHandle getSinkHandle()  
      protected abstract boolean init​(com.google.common.util.concurrent.SettableFuture<?> blockedFuture)
      do initialization
      boolean isFinished()
      Used to judge whether this IDriver should be scheduled for execution anymore
      com.google.common.util.concurrent.ListenableFuture<?> processFor​(io.airlift.units.Duration duration)
      run the IDriver for {@param duration} time slice, the time of this run is likely not to be equal to {@param duration}, the actual run time should be calculated by the caller
      protected abstract void releaseResource()
      release resource this driver used
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOGGER

        protected static final org.slf4j.Logger LOGGER
      • driverBlockedFuture

        protected final java.util.concurrent.atomic.AtomicReference<com.google.common.util.concurrent.SettableFuture<?>> driverBlockedFuture
      • state

        protected final java.util.concurrent.atomic.AtomicReference<Driver.State> state
      • exclusiveLock

        protected final org.apache.iotdb.db.mpp.execution.driver.Driver.DriverLock exclusiveLock
    • Method Detail

      • isFinished

        public boolean isFinished()
        Description copied from interface: IDriver
        Used to judge whether this IDriver should be scheduled for execution anymore
        Specified by:
        isFinished in interface IDriver
        Returns:
        true if the IDriver is done or terminated due to failure, otherwise false.
      • init

        protected abstract boolean init​(com.google.common.util.concurrent.SettableFuture<?> blockedFuture)
        do initialization
        Returns:
        true if init succeed, false otherwise
      • releaseResource

        protected abstract void releaseResource()
        release resource this driver used
      • processFor

        public com.google.common.util.concurrent.ListenableFuture<?> processFor​(io.airlift.units.Duration duration)
        Description copied from interface: IDriver
        run the IDriver for {@param duration} time slice, the time of this run is likely not to be equal to {@param duration}, the actual run time should be calculated by the caller
        Specified by:
        processFor in interface IDriver
        Parameters:
        duration - how long should this IDriver run
        Returns:
        the returned ListenableFuture is used to represent status of this processing if isDone() return true, meaning that this IDriver is not blocked and is ready for next processing. Otherwise, meaning that this IDriver is blocked and not ready for next processing.
      • close

        public void close()
        Description copied from interface: IDriver
        clear resource used by this fragment instance
        Specified by:
        close in interface IDriver
      • failed

        public void failed​(java.lang.Throwable t)
        Description copied from interface: IDriver
        fail current driver
        Specified by:
        failed in interface IDriver
        Parameters:
        t - reason cause this failure