Schedule a timer to retry #getRootRegion after some time.
()
| 4300 | |
| 4301 | /** Schedule a timer to retry {@link #getRootRegion} after some time. */ |
| 4302 | private void retryGetRootRegionLater() { |
| 4303 | newTimeout(new TimerTask() { |
| 4304 | public void run(final Timeout timeout) { |
| 4305 | if (!getRootRegion()) { // Try to read the znodes |
| 4306 | connectZK(); // unless we need to connect first. |
| 4307 | } |
| 4308 | } |
| 4309 | }, config.getInt("hbase.zookeeper.getroot.retry_delay") |
| 4310 | /* milliseconds */); |
| 4311 | } |
| 4312 | |
| 4313 | /** |
| 4314 | * Puts a watch in ZooKeeper to monitor the file of the -ROOT- region. |
no test coverage detected