You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2018/03/27 03:49:00 UTC

[jira] [Comment Edited] (HBASE-19035) Miss metrics when coprocessor use region scanner to read data

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

stack edited comment on HBASE-19035 at 3/27/18 3:48 AM:
--------------------------------------------------------

Late to the game, but confirming that the changes where we moved the scan count from RSRpcServices into the HRegion scan seem to be doing the right thing.... I'm looking for where we changed our calc of read request count and suspected this patch but it looks good. Just saying. And to say, this is a nice patch; nice cleanup (saved on a counter, moved counting to a single place rather than having it distributed and local to the item counted... Nice).


was (Author: stack):
Late to the game, but confirming that the changes where we moved the scan count from RSRpcServices into the HRegion scan seem to be doing the right thing.... I'm looking for where we changed our calc of read request count and suspected this patch but it looks good. Just saying.

> Miss metrics when coprocessor use region scanner to read data
> -------------------------------------------------------------
>
>                 Key: HBASE-19035
>                 URL: https://issues.apache.org/jira/browse/HBASE-19035
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>            Priority: Major
>             Fix For: 1.4.0, 2.0.0-beta-1, 2.0.0
>
>         Attachments: HBASE-19035.branch-1.001.patch, HBASE-19035.branch-1.2.001.patch, HBASE-19035.branch-1.patch, HBASE-19035.branch-1.patch, HBASE-19035.branch-1.patch, HBASE-19035.branch-1.patch, HBASE-19035.master.001.patch, HBASE-19035.master.002.patch, HBASE-19035.master.003.patch, HBASE-19035.master.003.patch
>
>
> Region interface is exposed to coprocessor. So coprocessor use getScanner to get a region scanner to read data. But the scan metrics was only updated in region server level. So we will miss some scan metrics for the read from coprocessor.
> || Region Operation || When to update requests metric ||
> | get | update read metric in nextRaw() |
> | put | update write metric in batchMutate() |
> | delete | update write metric in batchMutate() |
> | increment | update read metric by get() and  update write metric in doDelta() |
> | append | update read metric by get() and  update write metric in doDelta() |
> | mutateRow | update write metric in processRowsWithLocks() |
> | mutateRowsWithLocks | update write metric in processRowsWithLocks() |
> | batchMutate | update write metric in batchMutate() |
> | checkAndMutate | update read metric by get() and  update write metric by mutateRow() |
> | checkAndRowMutate | update read metric by get() and  update write metric by doBatchMutate() |
> | processRowsWithLocks | update write metric in processRowsWithLocks() |
> 1. Move read requests to region level. Because RegionScanner exposed to CP.
> 2. Update write requests count in processRowsWithLocks. This was missed in previous implemenation, too.
> 3. Remove requestRowActionCount in RSRpcServices. This metric can be computed by region's readRequestsCount and writeRequestsCount.
> Upload to review board: https://reviews.apache.org/r/63579/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)