Class Subprocedure.SubprocedureImpl

java.lang.Object
org.apache.hadoop.hbase.procedure.Subprocedure
org.apache.hadoop.hbase.procedure.Subprocedure.SubprocedureImpl
All Implemented Interfaces:
Callable<Void>
Enclosing class:
Subprocedure

public static class Subprocedure.SubprocedureImpl extends Subprocedure
Empty Subprocedure for testing. Must be public for stubbing used in testing to work.
  • Constructor Details

  • Method Details

    • acquireBarrier

      public void acquireBarrier() throws ForeignException
      Description copied from class: Subprocedure
      The implementation of this method should gather and hold required resources (locks, disk space, etc) to satisfy the Procedures barrier condition. For example, this would be where to make all the regions on a RS on the quiescent for an procedure that required all regions to be globally quiesed. Users should override this method. If a quiescent is not required, this is overkill but can still be used to execute a procedure on all members and to propagate any exceptions.
      Specified by:
      acquireBarrier in class Subprocedure
      Throws:
      ForeignException
    • insideBarrier

      public byte[] insideBarrier() throws ForeignException
      Description copied from class: Subprocedure
      The implementation of this method should act with the assumption that the barrier condition has been satisfied. Continuing the previous example, a condition could be that all RS's globally have been quiesced, and procedures that require this precondition could be implemented here. The implementation should also collect the result of the subprocedure as data to be returned to the coordinator upon successful completion. Users should override this method.
      Specified by:
      insideBarrier in class Subprocedure
      Returns:
      the data the subprocedure wants to return to coordinator side.
      Throws:
      ForeignException
    • cleanup

      public void cleanup(Exception e)
      Description copied from class: Subprocedure
      Users should override this method. This implementation of this method should rollback and cleanup any temporary or partially completed state that the Subprocedure.acquireBarrier() may have created.
      Specified by:
      cleanup in class Subprocedure