[jira] [Updated] (HBASE-17584) Expose ScanMetrics with ResultScanner rather than Scan

2017-09-08 Thread Duo Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-17584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang updated HBASE-17584:
--
Fix Version/s: 1.4.0

> Expose ScanMetrics with ResultScanner rather than Scan
> --
>
> Key: HBASE-17584
> URL: https://issues.apache.org/jira/browse/HBASE-17584
> Project: HBase
>  Issue Type: Sub-task
>  Components: Client, mapreduce, scan
>Affects Versions: 2.0.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.4.0
>
> Attachments: HBASE-17584-branch-1.patch, HBASE-17584.patch, 
> HBASE-17584-v1.patch
>
>
> I think this have been discussed many times... It is a bad practice to 
> directly modify the Scan object passed in when calling getScanner. The reason 
> that we can not use a copy is we need to use the Scan object to expose scan 
> metrics. So we need to find another way to expose the metrics.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-17584) Expose ScanMetrics with ResultScanner rather than Scan

2017-03-20 Thread Duo Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-17584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang updated HBASE-17584:
--
Resolution: Fixed
Status: Resolved  (was: Patch Available)

Pushed to branch-1.

Thanks [~stack] for reviewing.

> Expose ScanMetrics with ResultScanner rather than Scan
> --
>
> Key: HBASE-17584
> URL: https://issues.apache.org/jira/browse/HBASE-17584
> Project: HBase
>  Issue Type: Sub-task
>  Components: Client, mapreduce, scan
>Affects Versions: 2.0.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0
>
> Attachments: HBASE-17584-branch-1.patch, HBASE-17584.patch, 
> HBASE-17584-v1.patch
>
>
> I think this have been discussed many times... It is a bad practice to 
> directly modify the Scan object passed in when calling getScanner. The reason 
> that we can not use a copy is we need to use the Scan object to expose scan 
> metrics. So we need to find another way to expose the metrics.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (HBASE-17584) Expose ScanMetrics with ResultScanner rather than Scan

2017-03-19 Thread Duo Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-17584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang updated HBASE-17584:
--
Hadoop Flags: Incompatible change,Reviewed  (was: Reviewed)
  Status: Patch Available  (was: Reopened)

> Expose ScanMetrics with ResultScanner rather than Scan
> --
>
> Key: HBASE-17584
> URL: https://issues.apache.org/jira/browse/HBASE-17584
> Project: HBase
>  Issue Type: Sub-task
>  Components: Client, mapreduce, scan
>Affects Versions: 2.0.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0
>
> Attachments: HBASE-17584-branch-1.patch, HBASE-17584.patch, 
> HBASE-17584-v1.patch
>
>
> I think this have been discussed many times... It is a bad practice to 
> directly modify the Scan object passed in when calling getScanner. The reason 
> that we can not use a copy is we need to use the Scan object to expose scan 
> metrics. So we need to find another way to expose the metrics.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (HBASE-17584) Expose ScanMetrics with ResultScanner rather than Scan

2017-03-19 Thread Duo Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-17584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang updated HBASE-17584:
--
Attachment: HBASE-17584-branch-1.patch

Patch for branch-1. And also move renewLease from AbstractClientScanner to 
ResultScanner as now we are allowed to add methods to interface at minor 
release.

> Expose ScanMetrics with ResultScanner rather than Scan
> --
>
> Key: HBASE-17584
> URL: https://issues.apache.org/jira/browse/HBASE-17584
> Project: HBase
>  Issue Type: Sub-task
>  Components: Client, mapreduce, scan
>Affects Versions: 2.0.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0
>
> Attachments: HBASE-17584-branch-1.patch, HBASE-17584.patch, 
> HBASE-17584-v1.patch
>
>
> I think this have been discussed many times... It is a bad practice to 
> directly modify the Scan object passed in when calling getScanner. The reason 
> that we can not use a copy is we need to use the Scan object to expose scan 
> metrics. So we need to find another way to expose the metrics.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (HBASE-17584) Expose ScanMetrics with ResultScanner rather than Scan

2017-03-15 Thread Duo Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-17584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang updated HBASE-17584:
--
  Resolution: Fixed
Hadoop Flags: Reviewed
Release Note: Now you can use ResultScanner.getScanMetrics to get the scan 
metrics at any time during the scan operation. The old Scan.getScanMetrics is 
deprecated and still work, but if you use ResultScanner.getScanMetrics to get 
the scan metrics and reset it, then the metrics published to the Scan instaince 
will be messed up.
  Status: Resolved  (was: Patch Available)

Pushed to master.

Thanks all for reviewing.

> Expose ScanMetrics with ResultScanner rather than Scan
> --
>
> Key: HBASE-17584
> URL: https://issues.apache.org/jira/browse/HBASE-17584
> Project: HBase
>  Issue Type: Sub-task
>  Components: Client, mapreduce, scan
>Affects Versions: 2.0.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0
>
> Attachments: HBASE-17584.patch, HBASE-17584-v1.patch
>
>
> I think this have been discussed many times... It is a bad practice to 
> directly modify the Scan object passed in when calling getScanner. The reason 
> that we can not use a copy is we need to use the Scan object to expose scan 
> metrics. So we need to find another way to expose the metrics.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (HBASE-17584) Expose ScanMetrics with ResultScanner rather than Scan

2017-03-15 Thread Duo Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-17584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang updated HBASE-17584:
--
Affects Version/s: (was: 1.4.0)
Fix Version/s: (was: 1.4.0)

> Expose ScanMetrics with ResultScanner rather than Scan
> --
>
> Key: HBASE-17584
> URL: https://issues.apache.org/jira/browse/HBASE-17584
> Project: HBase
>  Issue Type: Sub-task
>  Components: Client, mapreduce, scan
>Affects Versions: 2.0.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0
>
> Attachments: HBASE-17584.patch, HBASE-17584-v1.patch
>
>
> I think this have been discussed many times... It is a bad practice to 
> directly modify the Scan object passed in when calling getScanner. The reason 
> that we can not use a copy is we need to use the Scan object to expose scan 
> metrics. So we need to find another way to expose the metrics.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (HBASE-17584) Expose ScanMetrics with ResultScanner rather than Scan

2017-03-07 Thread Duo Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-17584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang updated HBASE-17584:
--
Attachment: HBASE-17584-v1.patch

Rebase.

> Expose ScanMetrics with ResultScanner rather than Scan
> --
>
> Key: HBASE-17584
> URL: https://issues.apache.org/jira/browse/HBASE-17584
> Project: HBase
>  Issue Type: Sub-task
>  Components: Client, mapreduce, scan
>Affects Versions: 2.0.0, 1.4.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.4.0
>
> Attachments: HBASE-17584.patch, HBASE-17584-v1.patch
>
>
> I think this have been discussed many times... It is a bad practice to 
> directly modify the Scan object passed in when calling getScanner. The reason 
> that we can not use a copy is we need to use the Scan object to expose scan 
> metrics. So we need to find another way to expose the metrics.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (HBASE-17584) Expose ScanMetrics with ResultScanner rather than Scan

2017-02-23 Thread Duo Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-17584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang updated HBASE-17584:
--
Status: Patch Available  (was: Open)

> Expose ScanMetrics with ResultScanner rather than Scan
> --
>
> Key: HBASE-17584
> URL: https://issues.apache.org/jira/browse/HBASE-17584
> Project: HBase
>  Issue Type: Sub-task
>  Components: Client, mapreduce, scan
>Affects Versions: 2.0.0, 1.4.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.4.0
>
> Attachments: HBASE-17584.patch
>
>
> I think this have been discussed many times... It is a bad practice to 
> directly modify the Scan object passed in when calling getScanner. The reason 
> that we can not use a copy is we need to use the Scan object to expose scan 
> metrics. So we need to find another way to expose the metrics.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (HBASE-17584) Expose ScanMetrics with ResultScanner rather than Scan

2017-02-23 Thread Duo Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-17584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang updated HBASE-17584:
--
Attachment: HBASE-17584.patch

Add a reset flag for ScanMetrics.getScanMetrics. Do not reset ScanMetrics when 
publish it to the Scan object. So you can still Scan.getScanMetrics to get the 
metrics. But if you use ResultScanner.getScanMetrics and reset the counters, 
the metrics published to Scan object will be messed up. But I think this is 
acceptable? If you use ResultScanner.getScanMetrics get the metrics, then you 
do not need to use Scan.getScanMetrics anymore.

> Expose ScanMetrics with ResultScanner rather than Scan
> --
>
> Key: HBASE-17584
> URL: https://issues.apache.org/jira/browse/HBASE-17584
> Project: HBase
>  Issue Type: Sub-task
>  Components: Client, mapreduce, scan
>Affects Versions: 2.0.0, 1.4.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.4.0
>
> Attachments: HBASE-17584.patch
>
>
> I think this have been discussed many times... It is a bad practice to 
> directly modify the Scan object passed in when calling getScanner. The reason 
> that we can not use a copy is we need to use the Scan object to expose scan 
> metrics. So we need to find another way to expose the metrics.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)