Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ protected ScanReservation reserveFiles(Map<KeyExtent,List<TRange>> extents)
return new ScanReservation(tabletsMetadata, myReservationId, failures);
}

private ScanReservation reserveFilesInstrumented(long scanId) throws NoSuchScanIDException {
@VisibleForTesting
ScanReservation reserveFilesInstrumented(long scanId) throws NoSuchScanIDException {
long start = System.nanoTime();
try {
return reserveFiles(scanId);
Expand Down Expand Up @@ -934,7 +935,7 @@ public ScanResult continueScan(TInfo tinfo, long scanID, long busyTimeout)
TSampleNotPresentException, TException {
LOG.trace("continue scan: {}", scanID);

try (ScanReservation reservation = reserveFiles(scanID)) {
try (ScanReservation reservation = reserveFilesInstrumented(scanID)) {
Preconditions.checkState(reservation.getFailures().isEmpty());
return delegate.continueScan(tinfo, scanID, busyTimeout);
} catch (ScanServerBusyException be) {
Expand Down Expand Up @@ -1002,7 +1003,7 @@ public MultiScanResult continueMultiScan(TInfo tinfo, long scanID, long busyTime
throws NoSuchScanIDException, TSampleNotPresentException, TException {
LOG.trace("continue multi scan: {}", scanID);

try (ScanReservation reservation = reserveFiles(scanID)) {
try (ScanReservation reservation = reserveFilesInstrumented(scanID)) {
Preconditions.checkState(reservation.getFailures().isEmpty());
return delegate.continueMultiScan(tinfo, scanID, busyTimeout);
} catch (ScanServerBusyException be) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ protected ScanReservation reserveFiles(long scanId) throws NoSuchScanIDException
ScanReservation reserveFilesInstrumented(Map<KeyExtent,List<TRange>> extents) {
return reservation;
}

@Override
ScanReservation reserveFilesInstrumented(long scanId) {
return reservation;
}
}

private ThriftScanClientHandler handler;
Expand Down