[ https://issues.apache.org/jira/browse/HBASE-21177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613964#comment-16613964 ]
Andrew Purtell edited comment on HBASE-21177 at 9/13/18 7:37 PM: ----------------------------------------------------------------- This doesn't seem quite right: {code} this.hashCode = this.tableName.hashCode(); + getHis = registry.newHistogram("Namespace_default_table_" + tblName + "_metric_" + GET_REQUEST_TIME, + GET_REQUEST_TIME_DESC); + putHis = registry.newHistogram("Namespace_default_table_" + tblName + "_metric_" + PUT_REQUEST_TIME, + PUT_REQUEST_TIME_DESC); + scanHis = registry.newHistogram("Namespace_default_table_" + tblName + "_metric_" + SCAN_REQUEST_TIME, + SCAN_REQUEST_TIME_DESC); {code} Shouldn't this code register the metrics using {{tableNamePrefix}} instead of {{"Namespace_default_table_"}}? Also, use EnvironmentEdge#getCurrentTime instead of System#currentTimeMillis was (Author: apurtell): This doesn't seem quite right: {code} this.hashCode = this.tableName.hashCode(); + getHis = registry.newHistogram("Namespace_default_table_" + tblName + "_metric_" + GET_REQUEST_TIME, + GET_REQUEST_TIME_DESC); + putHis = registry.newHistogram("Namespace_default_table_" + tblName + "_metric_" + PUT_REQUEST_TIME, + PUT_REQUEST_TIME_DESC); + scanHis = registry.newHistogram("Namespace_default_table_" + tblName + "_metric_" + SCAN_REQUEST_TIME, + SCAN_REQUEST_TIME_DESC); {code} Shouldn't this code register the metrics using {{tableNamePrefix}} instead of {{"Namespace_default_table_"}}? > Add per-table metrics on getTime,putTime and scanTime > ----------------------------------------------------- > > Key: HBASE-21177 > URL: https://issues.apache.org/jira/browse/HBASE-21177 > Project: HBase > Issue Type: Task > Components: metrics > Affects Versions: 2.0.2 > Reporter: xijiawen > Priority: Major > Fix For: HBASE-14850 > > Attachments: HBASE-21177.patch > > > Adds getTime,putTime,scanTime to the per-table mertrics. -- This message was sent by Atlassian JIRA (v7.6.3#76005)