本文整理了Java中org.apache.hadoop.hbase.HBaseTestingUtility.waitForHostPort()
方法的一些代码示例,展示了HBaseTestingUtility.waitForHostPort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HBaseTestingUtility.waitForHostPort()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.HBaseTestingUtility
类名称:HBaseTestingUtility
方法名:waitForHostPort
暂无
代码示例来源:origin: apache/hbase
HBaseTestingUtility.waitForHostPort(HConstants.LOCALHOST, port);
代码示例来源:origin: apache/hbase
public void startHBase() throws IOException {
startDaemonLogTailer();
cleanupOldState();
// start ZK
LOG.info("Starting ZooKeeper on port " + zkClientPort);
startZK();
HBaseTestingUtility.waitForHostPort(HConstants.LOCALHOST, zkClientPort);
for (int masterPort : masterPorts) {
startMaster(masterPort);
}
ZKUtil.waitForBaseZNode(conf);
for (int rsPort : rsPorts) {
startRegionServer(rsPort);
}
LOG.info("Waiting for HBase startup by scanning META");
int attemptsLeft = 10;
while (attemptsLeft-- > 0) {
try {
testUtil.getConnection().getTable(TableName.META_TABLE_NAME);
} catch (Exception e) {
LOG.info("Waiting for HBase to startup. Retries left: " + attemptsLeft,
e);
Threads.sleep(1000);
}
}
LOG.info("Process-based HBase Cluster with " + numRegionServers +
" region servers up and running... \n\n");
}
代码示例来源:origin: org.apache.hbase/hbase-thrift
HBaseTestingUtility.waitForHostPort(HConstants.LOCALHOST, port);
代码示例来源:origin: org.apache.hbase/hbase-server
public void startHBase() throws IOException {
startDaemonLogTailer();
cleanupOldState();
// start ZK
LOG.info("Starting ZooKeeper on port " + zkClientPort);
startZK();
HBaseTestingUtility.waitForHostPort(HConstants.LOCALHOST, zkClientPort);
for (int masterPort : masterPorts) {
startMaster(masterPort);
}
ZKUtil.waitForBaseZNode(conf);
for (int rsPort : rsPorts) {
startRegionServer(rsPort);
}
LOG.info("Waiting for HBase startup by scanning META");
int attemptsLeft = 10;
while (attemptsLeft-- > 0) {
try {
testUtil.getConnection().getTable(TableName.META_TABLE_NAME);
} catch (Exception e) {
LOG.info("Waiting for HBase to startup. Retries left: " + attemptsLeft,
e);
Threads.sleep(1000);
}
}
LOG.info("Process-based HBase Cluster with " + numRegionServers +
" region servers up and running... \n\n");
}
内容来源于网络,如有侵权,请联系作者删除!