Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EEB8E200C55 for ; Thu, 13 Apr 2017 23:43:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ED421160B98; Thu, 13 Apr 2017 21:43:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 198CB160B89 for ; Thu, 13 Apr 2017 23:43:46 +0200 (CEST) Received: (qmail 79427 invoked by uid 500); 13 Apr 2017 21:43:46 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 79411 invoked by uid 99); 13 Apr 2017 21:43:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Apr 2017 21:43:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id C4A0FC075B for ; Thu, 13 Apr 2017 21:43:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dY3fu6Cr-upw for ; Thu, 13 Apr 2017 21:43:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A5BC75FBA1 for ; Thu, 13 Apr 2017 21:43:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EBF98E0D20 for ; Thu, 13 Apr 2017 21:43:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A07F324069 for ; Thu, 13 Apr 2017 21:43:41 +0000 (UTC) Date: Thu, 13 Apr 2017 21:43:41 +0000 (UTC) From: "Umesh Agashe (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HBASE-17888) Add generic methods for updating metrics on start and end of a procedure execution MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 13 Apr 2017 21:43:48 -0000 [ https://issues.apache.org/jira/browse/HBASE-17888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15968252#comment-15968252 ] Umesh Agashe edited comment on HBASE-17888 at 4/13/17 9:42 PM: --------------------------------------------------------------- [~appy], thank you for writing down the summary of the feature in your comments on review board and posting it here. I think, it correctly captures the idea behind the feature. When I started working on HBASE-16549, I started looking into how we can effectively collect metrics for assignment manager and found that there is a generic way we can collect metrics for all procedures. Here are my thoughts: #1 I agree with most what you say here. The approach that I took here is to do whats necessary to complete HBASE-16549 and later revisit ProcV2 refactoring to work on broader feature. If later gets delayed or didn't get done for some reason then I share your concern about updateMetricsOn will be at multiple random points. That will not be good. #2 Having updateMetricsOn method for every state; for it work we need to consider following: * What internal and external states are of interest to collect metrics (both core metric and feature metric as you have mentioned in #3) * Currently as procedure is waiting_in_queue is not exposed outside, I think hooks for updateMetricsOnSubmit() and updateMetricsOnFinish() are of more interest for collecting feature metric. #3 Regarding core metric: * I also think collecting the metric on the time procedure spends waiting in queue is worth collecting. One way to implement it is through adding one more state to track it. Collecting metric about other waiting states (WAITING and WAITING_TIMEOUT) can be considered later (based on need). I understand the general concern here that current code changes doesn't reflect this. The narrower feature HBASE-16549 needs broader feature which is not implemented yet and will be implemented later. Current patch only has partial changes required for HBASE-16549. I am working on the patch based on the latest review comments. I will submit it when its ready. Let me know your thoughts. Thanks, Umesh was (Author: uagashe): [~appy], thank you for writing down the summary of the feature in your comments on review board and posting it here. I think, it correctly captures the idea behind the feature. When I started working on HBASE-16549, I started looking into how we can effectively collect metrics for assignment manager and found that there is a generic way we can collect metrics for all procedures. Here are my thoughts: #1 I agree with most what you say here. The approach that I took here is to do whats necessary to complete HBASE-16549 and later revisit ProcV2 refactoring to work on broader feature. If later gets delayed or didn't get done for some reason then I share your concern about updateMetricsOn will be at multiple random points. That will not be good. #2 Having updateMetricsOn method for every state; for it work we need to consider following: * What internal and external states are of interest to collect metrics (both core metric and feature metric as you have mentioned in #3) * Currently as procedure is waiting_in_queue is not exposed outside, I think hooks for updateMetricsOnSubmit() and updateMetricsOnFinish() are of more interest for collecting feature metric. #3 * I also think collecting the metric on the time procedure spends waiting in queue is worth collecting. One way to implement it is through adding one more state to track it. Collecting metric about other waiting states (WAITING and WAITING_TIMEOUT) can be considered later (based on need). I understand the general concern here that current code changes doesn't reflect this. The narrower feature HBASE-16549 needs broader feature which is not implemented yet and will be implemented later. Current patch only has partial changes required for HBASE-16549. I am working on the patch based on the latest review comments. I will submit it when its ready. Let me know your thoughts. Thanks, Umesh > Add generic methods for updating metrics on start and end of a procedure execution > ---------------------------------------------------------------------------------- > > Key: HBASE-17888 > URL: https://issues.apache.org/jira/browse/HBASE-17888 > Project: HBase > Issue Type: Improvement > Components: proc-v2 > Reporter: Umesh Agashe > Assignee: Umesh Agashe > Attachments: HBASE-17888.v1.patch, HBASE-17888.v2.patch > > > For all procedures in Procv2 framework, Procedure class can have generic methods to update metrics on start and end of a procedure execution. Specific procedure can override these and implement/ update respective metrics. Default implementation needs to be provided so override and implementation is optional. -- This message was sent by Atlassian JIRA (v6.3.15#6346)