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

Method scanNextRows

src/HBaseClient.java:1590–1608  ·  view source on GitHub ↗

Package-private access point for Scanners to scan more rows. @param scanner The scanner to use. @return A deferred row.

(final Scanner scanner)

Source from the content-addressed store, hash-verified

1588 * @return A deferred row.
1589 */
1590 Deferred<Object> scanNextRows(final Scanner scanner) {
1591 final RegionInfo region = scanner.currentRegion();
1592 final RegionClient client = clientFor(region);
1593 if (client == null) {
1594 // Oops, we no longer know anything about this client or region. Our
1595 // cache was probably invalidated while the client was scanning. This
1596 // means that we lost the connection to that RegionServer, so we have to
1597 // re-open this scanner if we wanna keep scanning.
1598 scanner.invalidate(); // Invalidate the scanner so that ...
1599 @SuppressWarnings("unchecked")
1600 final Deferred<Object> d = (Deferred) scanner.nextRows();
1601 return d; // ... this will re-open it ______.^
1602 }
1603 num_scans.increment();
1604 final HBaseRpc next_request = scanner.getNextRowsRequest();
1605 final Deferred<Object> d = next_request.getDeferred();
1606 client.sendRpc(next_request);
1607 return d;
1608 }
1609
1610 /**
1611 * Package-private access point for {@link Scanner}s to close themselves.

Callers 1

nextRowsMethod · 0.80

Calls 8

clientForMethod · 0.95
getDeferredMethod · 0.95
sendRpcMethod · 0.95
currentRegionMethod · 0.80
invalidateMethod · 0.80
nextRowsMethod · 0.80
incrementMethod · 0.80
getNextRowsRequestMethod · 0.80

Tested by

no test coverage detected