MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / removeRpc

Method removeRpc

src/RegionClient.java:2039–2053  ·  view source on GitHub ↗

Package private method to allow the timeout timer or other methods to remove an RPCfrom the inflight map. Note that the RPC ID has to be set in the RPC for this to work. And if, somehow, we pop a different RPC from the map then we'll make sure to callback the popped RPC @param rpc The RPC to remove

(final HBaseRpc rpc, final boolean timedout)

Source from the content-addressed store, hash-verified

2037 * @return The RPC that was removed
2038 */
2039 HBaseRpc removeRpc(final HBaseRpc rpc, final boolean timedout) {
2040 final HBaseRpc old_rpc = rpcs_inflight.remove(rpc.rpc_id);
2041 if (old_rpc != rpc) {
2042 LOG.error("Removed the wrong RPC " + old_rpc +
2043 " when we meant to remove " + rpc);
2044 if (old_rpc != null) {
2045 old_rpc.callback(new NonRecoverableException(
2046 "Removed the wrong RPC from client " + this));
2047 }
2048 }
2049 if (timedout) {
2050 rpcs_timedout.incrementAndGet();
2051 }
2052 return old_rpc;
2053 }
2054
2055 /** @return Package private method to fetch the associated HBase client */
2056 HBaseClient getHBaseClient() {

Callers 10

sendRpcMethod · 0.95
decodeMethod · 0.95
enqueueTimeoutMethod · 0.80
timeoutMethod · 0.80
runMethod · 0.80

Calls 2

callbackMethod · 0.95
removeMethod · 0.45

Tested by 7

enqueueTimeoutMethod · 0.64
timeoutMethod · 0.64