本文整理汇总了Java中org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.blockUntilAvailable方法的典型用法代码示例。如果您正苦于以下问题:Java ZooKeeperNodeTracker.blockUntilAvailable方法的具体用法?Java ZooKeeperNodeTracker.blockUntilAvailable怎么用?Java ZooKeeperNodeTracker.blockUntilAvailable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker
的用法示例。
在下文中一共展示了ZooKeeperNodeTracker.blockUntilAvailable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: blockAndCheckIfStopped
import org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker; //导入方法依赖的package包/类
/**
* Utilty method to wait indefinitely on a znode availability while checking
* if the region server is shut down
*
* @param tracker znode tracker to use
* @throws IOException any IO exception, plus if the RS is stopped
* @throws InterruptedException
*/
private void blockAndCheckIfStopped(ZooKeeperNodeTracker tracker)
throws IOException, InterruptedException {
while (tracker.blockUntilAvailable(this.msgInterval, false) == null) {
if (this.stopped) {
throw new IOException("Received the shutdown message while waiting.");
}
}
}
示例2: blockAndCheckIfStopped
import org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker; //导入方法依赖的package包/类
/**
* Utilty method to wait indefinitely on a znode availability while checking if the region server
* is shut down
* @param tracker znode tracker to use
* @throws IOException any IO exception, plus if the RS is stopped
* @throws InterruptedException
*/
private void blockAndCheckIfStopped(ZooKeeperNodeTracker tracker) throws IOException,
InterruptedException {
while (tracker.blockUntilAvailable(this.msgInterval, false) == null) {
if (this.stopped) {
throw new IOException("Received the shutdown message while waiting.");
}
}
}
示例3: blockAndCheckIfStopped
import org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker; //导入方法依赖的package包/类
/**
* Utilty method to wait indefinitely on a znode availability while checking
* if the region server is shut down
*
* @param tracker znode tracker to use
* @throws IOException any IO exception, plus if the RS is stopped
* @throws InterruptedException
*/
private void blockAndCheckIfStopped(ZooKeeperNodeTracker tracker)
throws IOException, InterruptedException {
while (tracker.blockUntilAvailable(this.msgInterval, false) == null) {
if (this.stopped) {
throw new IOException("Received the shutdown message while waiting.");
}
}
}
示例4: blockAndCheckIfStopped
import org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker; //导入方法依赖的package包/类
/**
* Utilty method to wait indefinitely on a znode availability while checking
* if the region server is shut down
* @param tracker znode tracker to use
* @throws IOException any IO exception, plus if the RS is stopped
* @throws InterruptedException
*/
private void blockAndCheckIfStopped(ZooKeeperNodeTracker tracker)
throws IOException, InterruptedException {
while (tracker.blockUntilAvailable(this.msgInterval, false) == null) {
if (this.stopped) {
throw new IOException("Received the shutdown message while waiting.");
}
}
}
示例5: blockAndCheckIfStopped
import org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker; //导入方法依赖的package包/类
/**
* Utilty method to wait indefinitely on a znode availability while checking
* if the region server is shut down
* @param tracker znode tracker to use
* @throws IOException any IO exception, plus if the RS is stopped
* @throws InterruptedException
*/
private void blockAndCheckIfStopped(ZooKeeperNodeTracker tracker)
throws IOException, InterruptedException {
if (false == tracker.checkIfBaseNodeAvailable()) {
String errorMsg = "Check the value configured in 'zookeeper.znode.parent'. "
+ "There could be a mismatch with the one configured in the master.";
LOG.error(errorMsg);
abort(errorMsg);
}
while (tracker.blockUntilAvailable(this.msgInterval, false) == null) {
if (this.stopped) {
throw new IOException("Received the shutdown message while waiting.");
}
}
}