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
61173522db
commit
1c7321f9d5
|
@ -86,6 +86,7 @@ public class ClientSideRegionScanner extends AbstractClientScanner {
|
|||
resultSize += CellUtil.estimatedSerializedSizeOf(cell);
|
||||
}
|
||||
this.scanMetrics.countOfBytesInResults.addAndGet(resultSize);
|
||||
this.scanMetrics.countOfRowsScanned.incrementAndGet();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -205,6 +205,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);
|
||||
|
|
Loading…
Reference in New Issue