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:32:39 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 c3697bd27 -> 5c1f2d668


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/5c1f2d66
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5c1f2d66
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5c1f2d66

Branch: refs/heads/branch-1.4
Commit: 5c1f2d668213c57ff474ea37cafe322c98f79756
Parents: c3697bd
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:29:25 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/5c1f2d66/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/5c1f2d66/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