MCPcopy Index your code
hub / github.com/OpenTSDB/asynchbase / getDeferredRoot

Method getDeferredRoot

src/HBaseClient.java:4152–4171  ·  view source on GitHub ↗

Returns a deferred that will be called back once we found -ROOT-. @return A deferred which will be invoked with an unspecified argument once we know where -ROOT- is. Note that by the time you get called back, we may have lost the connection to the -ROOT- region again.

()

Source from the content-addressed store, hash-verified

4150 * back, we may have lost the connection to the -ROOT- region again.
4151 */
4152 public Deferred<Object> getDeferredRoot() {
4153 final Deferred<Object> d = new Deferred<Object>();
4154 synchronized (this) {
4155 try {
4156 connectZK(); // Kick off a connection if needed.
4157 if (deferred_rootregion == null) {
4158 LOG.info("Need to find the "
4159 + (has_root ? (split_meta ? new String(HBASE98_ROOT_REGION) : new String(ROOT)) :
4160 (split_meta ? new String(HBASE96_META) : new String(META)))
4161 + " region");
4162 deferred_rootregion = new ArrayList<Deferred<Object>>();
4163 }
4164 deferred_rootregion.add(d);
4165 } catch (NonRecoverableException e) {
4166 LOG.error(e.getMessage(), e.getCause());
4167 d.callback(e);
4168 }
4169 }
4170 return d;
4171 }
4172
4173 /**
4174 * Like {@link getDeferredRoot} but returns null if we're not already

Callers 1

locateRegionMethod · 0.45

Calls 4

connectZKMethod · 0.95
addMethod · 0.45
getMessageMethod · 0.45
callbackMethod · 0.45

Tested by

no test coverage detected