HBASE-18814 Make ScanMetrics enabled and add counter <HBase Counters, ROWS_SCANNED> into the MapReduce Job over snapshot
Signed-off-by: Ashu Pachauri <ashu@apache.org>
This commit is contained in:
parent
176d8bd2c7
commit
0db82daa91
|
@ -216,6 +216,7 @@ public class TableSnapshotInputFormatImpl {
|
|||
scan.setIsolationLevel(IsolationLevel.READ_UNCOMMITTED);
|
||||
// disable caching of data blocks
|
||||
scan.setCacheBlocks(false);
|
||||
scan.setScanMetricsEnabled(true);
|
||||
|
||||
scanner =
|
||||
new ClientSideRegionScanner(conf, fs, new Path(split.restoreDir), htd, hri, scan, null);
|
||||
|
|
|
@ -86,6 +86,7 @@ public class ClientSideRegionScanner extends AbstractClientScanner {
|
|||
resultSize += CellUtil.estimatedSerializedSizeOf(cell);
|
||||
}
|
||||
this.scanMetrics.countOfBytesInResults.addAndGet(resultSize);
|
||||
this.scanMetrics.countOfRowsScanned.incrementAndGet();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue