Skip to content
Merged
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 @@ -77,6 +77,10 @@ public class TableRecordReaderImpl {
* @throws IOException When restarting fails.
*/
public void restart(byte[] firstRow) throws IOException {
// Update counter metrics based on current scan before reinitializing it
if (currentScan != null) {
updateCounters();
}
currentScan = new Scan(scan);
currentScan.withStartRow(firstRow);
currentScan.setScanMetricsEnabled(true);
Expand Down Expand Up @@ -219,6 +223,7 @@ public boolean nextKeyValue() throws IOException, InterruptedException {
} catch (IOException e) {
// do not retry if the exception tells us not to do so
if (e instanceof DoNotRetryIOException) {
updateCounters();
throw e;
}
// try to handle all other IOExceptions by restarting
Expand Down Expand Up @@ -257,6 +262,7 @@ public boolean nextKeyValue() throws IOException, InterruptedException {
updateCounters();
return false;
} catch (IOException ioe) {
updateCounters();
if (logScannerActivity) {
long now = System.currentTimeMillis();
LOG.info("Mapper took " + (now-timestamp)
Expand Down