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 EB2D0200B50 for ; Thu, 14 Jul 2016 21:05:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E862E160A89; Thu, 14 Jul 2016 19:05:04 +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 3CE16160A63 for ; Thu, 14 Jul 2016 21:05:04 +0200 (CEST) Received: (qmail 17669 invoked by uid 500); 14 Jul 2016 19:05:03 -0000 Mailing-List: contact commits-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list commits@impala.incubator.apache.org Received: (qmail 17659 invoked by uid 99); 14 Jul 2016 19:05:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jul 2016 19:05:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 028D41A0199 for ; Thu, 14 Jul 2016 19:05:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id GF7wlrhupxQT for ; Thu, 14 Jul 2016 19:05:01 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id 1C93260D0A for ; Thu, 14 Jul 2016 19:04:59 +0000 (UTC) Received: (qmail 17611 invoked by uid 99); 14 Jul 2016 19:04:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jul 2016 19:04:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 35AEDE383A; Thu, 14 Jul 2016 19:04:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tarasbob@apache.org To: commits@impala.incubator.apache.org Date: Thu, 14 Jul 2016 19:05:14 -0000 Message-Id: <8b55a1748e694c4b8b26c51752a28a17@git.apache.org> In-Reply-To: <69efdcca9a144dc6b40a2c0ab084e271@git.apache.org> References: <69efdcca9a144dc6b40a2c0ab084e271@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [17/18] incubator-impala git commit: IMPALA-3715: Include total usage of JVM memory archived-at: Thu, 14 Jul 2016 19:05:05 -0000 IMPALA-3715: Include total usage of JVM memory Get jvm metrics by global handler ExecEnv and filter out items with "total" Testing: Ran locally and looked at memz page Change-Id: Ib44c25eb5a5d70f10a6a120501eec2d50fad5ce9 Reviewed-on: http://gerrit.cloudera.org:8080/3625 Reviewed-by: Henry Robinson Tested-by: Internal Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/74410326 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/74410326 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/74410326 Branch: refs/heads/master Commit: 744103264546e5fd695c0d4661a804da247e86c4 Parents: f129dfd Author: kathy.sun Authored: Tue Jul 12 14:53:36 2016 -0700 Committer: Taras Bobrovytsky Committed: Thu Jul 14 19:04:45 2016 +0000 ---------------------------------------------------------------------- be/src/util/default-path-handlers.cc | 11 +++++++++++ www/memz.tmpl | 31 ++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/74410326/be/src/util/default-path-handlers.cc ---------------------------------------------------------------------- diff --git a/be/src/util/default-path-handlers.cc b/be/src/util/default-path-handlers.cc index 8954fcc..740077b 100644 --- a/be/src/util/default-path-handlers.cc +++ b/be/src/util/default-path-handlers.cc @@ -23,6 +23,7 @@ #include #include "common/logging.h" +#include "runtime/exec-env.h" #include "runtime/mem-tracker.h" #include "util/debug-util.h" #include "util/pprof-path-handlers.h" @@ -105,6 +106,16 @@ void MemUsageHandler(MemTracker* mem_tracker, const Webserver::ArgumentMap& args Value detailed(mem_tracker->LogUsage().c_str(), document->GetAllocator()); document->AddMember("detailed", detailed, document->GetAllocator()); + Value jvm(kObjectType); + ExecEnv::GetInstance()->metrics()->GetChildGroup("jvm")->ToJson(false, document, &jvm); + + Value total(kArrayType); + for(SizeType i = 0; i < jvm["metrics"].Size(); ++i){ + if (strstr(jvm["metrics"][i]["name"].GetString(), "total") != nullptr){ + total.PushBack(jvm["metrics"][i], document->GetAllocator()); + } + } + document->AddMember("jvm", total, document->GetAllocator()); } void impala::AddDefaultUrlCallbacks( http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/74410326/www/memz.tmpl ---------------------------------------------------------------------- diff --git a/www/memz.tmpl b/www/memz.tmpl index 5b4636f..5709a89 100644 --- a/www/memz.tmpl +++ b/www/memz.tmpl @@ -19,10 +19,39 @@ limitations under the License. Memory consumption / limit: {{consumption}} / {{mem_limit}} -

tcmalloc

+

tcmalloc

{{overview}}

Breakdown

{{detailed}}
+

JVM memory total usage

+ + + + + + + + {{#jvm}} + + + {{! Is this a stats metric? }} + {{?mean}} + + {{/mean}} + {{^mean}} + + {{/mean}} + + + {{/jvm}} +
NameValueDescription
{{name}} + Last (of {{count}}): {{last}}. + Min: {{min}}, max: {{max}}, avg: {{mean}} + {{human_readable}} + + {{description}} +
+ {{> www/common-footer.tmpl }}