}
}
private void checkStatus(String htable) throws IOException {
if (!admin.isMasterRunning()) {
throw new WormholeException("hbase master is not running",
JobStatus.PRE_CHECK_FAILED.getStatus());
}
if (!admin.isTableAvailable(htable)) {
throw new WormholeException(String.format(
"htable %s is not available", htable),
JobStatus.PRE_CHECK_FAILED.getStatus());
}
if (!admin.tableExists(htable)) {
throw new WormholeException(String.format(
"htable %s doesn't exist", htable),
JobStatus.PRE_CHECK_FAILED.getStatus());
}
if (!admin.isTableEnabled(htable)) {
throw new WormholeException(String.format("htable %s is disabled",
htable), JobStatus.PRE_CHECK_FAILED.getStatus());
}
}