use of org.goldenorb.zookeeper.OrbFastBarrier in project goldenorb by jzachr.
the class OrbPartition method enterInitializationBarrier.
/**
*
* @param String
* barrierName
*
*/
private void enterInitializationBarrier(String barrierName, int countToWaitFor) {
LOG.debug("p{} creating barrier {}", getPartitionID(), barrierName);
LOG.debug("{} will wait for {} partitions to join", barrierName, countToWaitFor);
Barrier barrier = new OrbFastBarrier(getOrbConf(), jobInProgressPath + "/" + barrierName, countToWaitFor, Integer.toString(getPartitionID()), zk);
try {
barrier.enter();
LOG.debug("p{} entered {}", getPartitionID(), barrierName);
} catch (OrbZKFailure e) {
LOG.error("p{} failed to complete barrier {}: " + e.getMessage(), getPartitionID(), barrierName);
e.printStackTrace();
}
}
use of org.goldenorb.zookeeper.OrbFastBarrier in project goldenorb by jzachr.
the class OrbPartition method enterBarrier.
/**
*
* @param String
* barrierName
*/
private void enterBarrier(String barrierName) {
LOG.debug("p{} creating barrier {}", getPartitionID(), barrierName);
Barrier barrier = null;
synchronized (leaderGroupMembers) {
LOG.debug("{} will wait for {} partitions", barrierName, leaderGroupMembers.size());
barrier = new OrbFastBarrier(getOrbConf(), jobInProgressPath + "/" + barrierName, leaderGroupMembers.size(), Integer.toString(getPartitionID()), zk);
}
try {
barrier.enter();
LOG.debug("p{} entered {}", getPartitionID(), barrierName);
} catch (OrbZKFailure e) {
LOG.error("p{} failed to complete barrier {}: " + e.getMessage(), getPartitionID(), barrierName);
e.printStackTrace();
}
}
Aggregations