public class ZKBarrierHandler extends java.lang.Object implements BarrierResponder
Constructor and Description |
---|
ZKBarrierHandler(BarrierMonitor barrierMonitor,
Config config,
java.lang.String jobID,
int numberOfWorkers) |
Modifier and Type | Method and Description |
---|---|
void |
allArrived(JobMasterAPI.BarrierType barrierType)
publish all arrived event
|
void |
barrierFailed(JobMasterAPI.BarrierType barrierType,
JobMasterAPI.BarrierResult result)
this method is called when the barrier failed
all waiting workers shall be released with a failure message
|
void |
close()
close all local entities.
|
void |
initialize(JobMasterAPI.JobMasterState initialState)
initialize ZKBarrierHandler,
create znode children caches for job master to watch barrier events
|
void |
publishBarrierDone(JobMasterAPI.BarrierType barrierType,
JobMasterAPI.BarrierResult barrierResult)
publish BarrierDone event
|
public ZKBarrierHandler(BarrierMonitor barrierMonitor, Config config, java.lang.String jobID, int numberOfWorkers)
public void initialize(JobMasterAPI.JobMasterState initialState) throws Twister2Exception
Twister2Exception
public void allArrived(JobMasterAPI.BarrierType barrierType)
allArrived
in interface BarrierResponder
public void barrierFailed(JobMasterAPI.BarrierType barrierType, JobMasterAPI.BarrierResult result)
BarrierResponder
barrierFailed
in interface BarrierResponder
public void publishBarrierDone(JobMasterAPI.BarrierType barrierType, JobMasterAPI.BarrierResult barrierResult)
public void close()