[ 
https://issues.apache.org/jira/browse/HBASE-16678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15511782#comment-15511782
 ] 

Enis Soztutar commented on HBASE-16678:
---------------------------------------

Patch is pretty simple: 
{code}
diff --git 
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java
 
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java
index 4349537..748d2be 100644
--- 
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java
+++ 
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java
@@ -268,8 +268,9 @@ public class TableRecordReaderImpl {
    * @throws IOException
    */
   private void updateCounters() throws IOException {
-    ScanMetrics scanMetrics = this.scan.getScanMetrics();
+    ScanMetrics scanMetrics = currentScan.getScanMetrics();
{code} 

Let me see whether we need a unit test. 

> MapReduce jobs do not update counters from ScanMetrics
> ------------------------------------------------------
>
>                 Key: HBASE-16678
>                 URL: https://issues.apache.org/jira/browse/HBASE-16678
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Enis Soztutar
>            Assignee: Enis Soztutar
>             Fix For: 2.0.0, 1.3.0, 1.4.0, 1.1.7, 1.2.4
>
>
> Was inspecting a perf issue, where we needed the scanner metrics as counters 
> for a MR job. Turns out that the HBase scan counters are no longer working in 
> 1.0+. I think it got broken via HBASE-13030. 
> These are the counters:
> {code}
>       HBase Counters
>               BYTES_IN_REMOTE_RESULTS=0
>               BYTES_IN_RESULTS=280
>               MILLIS_BETWEEN_NEXTS=11
>               NOT_SERVING_REGION_EXCEPTION=0
>               NUM_SCANNER_RESTARTS=0
>               NUM_SCAN_RESULTS_STALE=0
>               REGIONS_SCANNED=1
>               REMOTE_RPC_CALLS=0
>               REMOTE_RPC_RETRIES=0
>               RPC_CALLS=3
>               RPC_RETRIES=0
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to