org.apache.hadoop.hbase.procedure
Interface ProcedureCoordinatorRpcs

All Superinterfaces:
Closeable
All Known Implementing Classes:
ZKProcedureCoordinatorRpcs

@InterfaceAudience.Private
public interface ProcedureCoordinatorRpcs
extends Closeable

RPCs for the coordinator to run a barriered procedure with subprocedures executed at distributed members.

See Also:
ProcedureCoordinator

Method Summary
 void resetMembers(Procedure procName)
          Notify Members to reset the distributed state for procedure
 void sendAbortToMembers(Procedure procName, ForeignException cause)
          Notify the members that the coordinator has aborted the procedure and that it should release barrier resources.
 void sendGlobalBarrierAcquire(Procedure procName, byte[] info, List<String> members)
          Notify the members to acquire barrier for the procedure
 void sendGlobalBarrierReached(Procedure procName, List<String> members)
          Notify members that all members have acquired their parts of the barrier and that they can now execute under the global barrier.
 boolean start(ProcedureCoordinator listener)
          Initialize and start threads necessary to connect an implementation's rpc mechanisms.
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

start

boolean start(ProcedureCoordinator listener)
Initialize and start threads necessary to connect an implementation's rpc mechanisms.

Parameters:
listener -
Returns:
true if succeed, false if encountered initialization errors.

sendAbortToMembers

void sendAbortToMembers(Procedure procName,
                        ForeignException cause)
                        throws IOException
Notify the members that the coordinator has aborted the procedure and that it should release barrier resources.

Parameters:
procName - name of the procedure that was aborted
cause - the reason why the procedure needs to be aborted
Throws:
IOException - if the rpcs can't reach the other members of the procedure (and can't recover).

sendGlobalBarrierAcquire

void sendGlobalBarrierAcquire(Procedure procName,
                              byte[] info,
                              List<String> members)
                              throws IOException,
                                     IllegalArgumentException
Notify the members to acquire barrier for the procedure

Parameters:
procName - name of the procedure to start
info - information that should be passed to all members
members - names of the members requested to reach the acquired phase
Throws:
IllegalArgumentException - if the procedure was already marked as failed
IOException - if we can't reach the remote notification mechanism

sendGlobalBarrierReached

void sendGlobalBarrierReached(Procedure procName,
                              List<String> members)
                              throws IOException
Notify members that all members have acquired their parts of the barrier and that they can now execute under the global barrier. Must come after calling sendGlobalBarrierAcquire(Procedure, byte[], List)

Parameters:
procName - name of the procedure to start
members - members to tell we have reached in-barrier phase
Throws:
IOException - if we can't reach the remote notification mechanism

resetMembers

void resetMembers(Procedure procName)
                  throws IOException
Notify Members to reset the distributed state for procedure

Parameters:
procName - name of the procedure to reset
Throws:
IOException - if the remote notification mechanism cannot be reached


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.