From user-return-14357-archive-asf-public=cust-asf.ponee.io@storm.apache.org Thu Apr 4 06:59:20 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6FA8F18064C for ; Thu, 4 Apr 2019 08:59:18 +0200 (CEST) Received: (qmail 81723 invoked by uid 500); 4 Apr 2019 06:59:16 -0000 Mailing-List: contact user-help@storm.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@storm.apache.org Delivered-To: mailing list user@storm.apache.org Received: (qmail 81713 invoked by uid 99); 4 Apr 2019 06:59:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2019 06:59:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B109CC9709 for ; Thu, 4 Apr 2019 06:59:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.798 X-Spam-Level: * X-Spam-Status: No, score=1.798 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 2bM7Tl1aQ59f for ; Thu, 4 Apr 2019 06:59:13 +0000 (UTC) Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 366FA5F36D for ; Thu, 4 Apr 2019 06:59:13 +0000 (UTC) Received: by mail-oi1-f178.google.com with SMTP id l203so1027680oia.3 for ; Wed, 03 Apr 2019 23:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=2a9eotFQMAi1lZE1H0i3/e7SmRNNlsjvZkqblLJprNQ=; b=k6t6QAegz3Lu8TK1dDYOJP1i3CoKLlifrehN/r72RmeecqFijxNKPxpAbC78Jo67rG ++Y8M3h29rzTcfhD4UbQ/BGO0FeEyJfPvydPVMXzMgL4GZGnON7JZDMH2agmTuG0xQW6 pv3D0BeVf4DIRJ60K/KH+ovBrScEN7obixt5TX7x6nuByFzrnxJaBOJkyg1ksDemglep yByyxq6e5WTsq4DVtaEyMgEULlapL2SqOO0fmg1xRzxdmWe15wWBrHvDpjF+JlsNplmI rWQ9HLagIHcOgCCPQ/oHm7FUUIy1vrvuJfkRThegNR0kbbaqUO4PPt3YG8Bg6m0ialAz jnpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=2a9eotFQMAi1lZE1H0i3/e7SmRNNlsjvZkqblLJprNQ=; b=eWfLeh3sePI2gM6zoBZ61eabKaRtWBfCJKZZGet4ovkL24xiF2JVAsS0l8BnFGsDFR Qna5c5DqjuKIWzRMZHXNvlgaXyied2c10d0pzIC0GnDXdgWy9cg4y795vHcvaVrm0ahD NuPEyaYXAF9DlQX5cmBZA46gfQpUladiv3qh89dec/IE7tp0ZBXMDvYYP+6i/kD0KaNo 2XwhhfvJu1ciMJIt05+FThX4ktnCjAFjEr02xDn/UFVujxjPolvETFeqSY8deJdaSvVw gOB0sWTc+JHXPofGix1i93k2cMwZIcbea7DWYiCudqyOvPl77G/c6Fbvk0lenzLWz/xF iwYg== X-Gm-Message-State: APjAAAX0/UGNuRBsT8VzwF3t48kYosLJ9w6tEX2QWQq2ta6b2ABE1ppD 5gTfGfXNnPb49+QdOTqFog9BwsC+pDfnYPDNZJHhdemY X-Google-Smtp-Source: APXvYqzGEfQkpTwSpy8ldVtdObYi08g3D0wh4P9sO9lR9pbHQBgr+uTpaoHBrnJYFdnSSNM7SExEnssRokSpMW9zQ8Q= X-Received: by 2002:aca:43d5:: with SMTP id q204mr2419967oia.100.1554361145813; Wed, 03 Apr 2019 23:59:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Stig_Rohde_D=C3=B8ssing?= Date: Thu, 4 Apr 2019 08:58:54 +0200 Message-ID: Subject: Re: Need help with custom Storm Trident Metrics To: user@storm.apache.org Content-Type: multipart/alternative; boundary="000000000000f2efdf0585aee70f" --000000000000f2efdf0585aee70f Content-Type: text/plain; charset="UTF-8" As far as I can tell, the JMX reporting is only hooked up to the metrics v2 API. You're using metrics v1. Could you try to register your metric with the new metrics system? You can find documentation at https://storm.apache.org/releases/2.0.0-SNAPSHOT/metrics_v2.html. Den ons. 3. apr. 2019 kl. 15.41 skrev Niraj Gupta : > *Storm version*: 1.0.3 I'm registering custom metric in the makeState of > the StateFactory implementation. > > @Overridepublic State makeState(final Map conf, final IMetricsContext metricsContext, final int partitionIndex, final int numPartitions) { > ReducedMetric reducedMetric = new ReducedMetric(new MeanReducer()); > metricsContext.registerMetric("custom-metric-1", reducedMetric, 1); > reducedMetric.update(100);} > > I have added the following jmx config in the storm.yml > > -Dcom.sun.management.jmxremote.port=3337 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false > > After running the Storm cluster when I'm connecting to the 3337 port then > I'm not seeing this metrics which I had defined. > > What am I missing? > > -- > Regards, > Niraj Gupta > +91 727533898 > 0 > > > -- > Regards, > Niraj Gupta > +91 7275338980 > > > -- > Regards, > Niraj Gupta > +91 7275338980 > --000000000000f2efdf0585aee70f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
As far as I can tell, the JMX reporting i= s only hooked up to the metrics v2 API. You're using metrics v1. Could = you try to register your metric with the new metrics system? You can find d= ocumentation at https://storm.apache.org/releases/2.0.0-SNAPSHOT/metrics_= v2.html.

Den ons. 3. apr. 2019 kl. 15.41 skrev Niraj Gupta <= ;nirajk42@gmail.com>:

Storm version: 1.0.3 I'm registering custom metric in the = makeState of the StateFactory implementation.

@Override
public State mak=
eState(final Ma=
p conf, final IMetricsContext metricsContext, final =
int partitionIndex, final int numPartitions) {
    ReducedMetric reducedMetric =3D new Reduc=
edMetric(new Me=
anReducer());
    metricsContext.registerMetric=
("custom-metric-1", re=
ducedMetric, 1);
    reducedMetric.update(<=
span class=3D"gmail-m_-5659840616738541328m_818408788927051423gmail-lit" st=
yle=3D"margin:0px;padding:0px;border:0px none;font-style:inherit;font-varia=
nt:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;fon=
t-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(125,3=
9,39)">100);
}

I have added the follow= ing jmx config in the storm.yml

-Dcom.s=
un.management.jmxr=
emote.port=3D333=
7 -Dcom.sun.management.jmxremote.local.=
only=3Dfalse -Dcom.sun.management.jmxremote -<=
span class=3D"gmail-m_-5659840616738541328m_818408788927051423gmail-typ" st=
yle=3D"margin:0px;padding:0px;border:0px none;font-style:inherit;font-varia=
nt:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;fon=
t-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(43,14=
5,175)">Dcom.sun.ma=
nagement.jmxremote.=
ssl=3Dfalse -Dcom.sun.management.jmxremote.authenticate=3Dfalse
<= p style=3D"margin:0px 0px 1em;padding:0px;border:0px none;font-variant-nume= ric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-heigh= t:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif= ;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color= :rgb(36,39,41)">After running the Storm cluster when I'm connecting to = the 3337 port then I'm not seeing this metrics which I had defined.

=

W= hat am I=C2=A0missing?


--
Regard= s,
Niraj Gupta
+91 727533898
0


--
Regards,
Niraj Gupta
+91 7275338980<= /div>


--
Regards,
Nir= aj Gupta
+91 7275338980
--000000000000f2efdf0585aee70f--