hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject hbase git commit: HBASE-18814 Make ScanMetrics enabled and add counter <HBase Counters, ROWS_SCANNED> into the MapReduce Job over snapshot
Date Tue, 03 Oct 2017 01:31:29 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 61173522d -> 1c7321f9d


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>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1c7321f9
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1c7321f9
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1c7321f9

Branch: refs/heads/branch-1
Commit: 1c7321f9d5e639a27564863463e91ae4f5b5b0d8
Parents: 6117352
Author: libisthanks <libisthanks@corp.netease.com>
Authored: Thu Sep 14 09:58:34 2017 +0800
Committer: Ashu Pachauri <ashu@apache.org>
Committed: Mon Oct 2 18:25:52 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/client/ClientSideRegionScanner.java     | 1 +
 .../apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1c7321f9/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
index 4fab6a2..df118fa 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
@@ -86,6 +86,7 @@ public class ClientSideRegionScanner extends AbstractClientScanner {
         resultSize += CellUtil.estimatedSerializedSizeOf(cell);
       }
       this.scanMetrics.countOfBytesInResults.addAndGet(resultSize);
+      this.scanMetrics.countOfRowsScanned.incrementAndGet();
     }
 
     return result;

http://git-wip-us.apache.org/repos/asf/hbase/blob/1c7321f9/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
index a8d387a..dab56c4 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
@@ -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);


Mime
View raw message