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

Cosmin Lehene commented on HBASE-6277:
--------------------------------------

[[email protected]], [~enis] looking at a todo in 
AbstractClientScanner.getScanMetrics it seems ScanMetrrics is not part of the 
public API.
The behavior doesn't seem to have changed in the meantime so this issue may 
still be valid. Thoughts?

> Metrics for scan object are overwritten when restart() is called
> ----------------------------------------------------------------
>
>                 Key: HBASE-6277
>                 URL: https://issues.apache.org/jira/browse/HBASE-6277
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>
> From HBASE-4145:
> There's an issue in {{TableRecordReaderImpl}}. Calling restart() does this:
> {code}
> public void restart(byte[] firstRow) throws IOException {
>   currentScan = new Scan(scan);
> {code}
> Which by itself is fine since the metrics will be copied from *scan* to 
> *currentScan*, except that it's *currentScan* that has the updated metrics 
> not *scan*.
> In other words, *currentScan* is the object that is used for scanning so it 
> contains the metrics. If restart() is called, that object is overwritten by 
> the original definition of the {{Scan}}. I think to fix this we could grab 
> the metrics from *currentScan* first then set them back on the new object.



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

Reply via email to