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

Method failOrRetryRpcs

src/RegionClient.java:1207–1222  ·  view source on GitHub ↗

Fail all RPCs in a collection or attempt to reschedule them if possible. @param rpcs A possibly empty but non-null collection of RPCs. @param exception The exception with which to fail RPCs that can't be retried.

(final Collection<HBaseRpc> rpcs,
                               final ConnectionResetException exception)

Source from the content-addressed store, hash-verified

1205 * retried.
1206 */
1207 private void failOrRetryRpcs(final Collection<HBaseRpc> rpcs,
1208 final ConnectionResetException exception) {
1209 for (final HBaseRpc rpc : rpcs) {
1210 final RegionInfo region = rpc.getRegion();
1211 if (region == null // Can't retry, dunno where this RPC should go.
1212 || rpc.failfast()) {
1213 rpc.callback(exception);
1214 } else {
1215 final NotServingRegionException nsre =
1216 new NotServingRegionException("Connection reset: "
1217 + exception.getMessage(), rpc);
1218 // Re-schedule the RPC by (ab)using the NSRE handling mechanism.
1219 hbase_client.handleNSRE(rpc, region.name(), nsre);
1220 }
1221 }
1222 }
1223
1224 @Override
1225 public void handleUpstream(final ChannelHandlerContext ctx,

Callers 1

cleanupMethod · 0.95

Calls 6

nameMethod · 0.95
failfastMethod · 0.80
handleNSREMethod · 0.80
getRegionMethod · 0.45
callbackMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected