From user-return-14358-archive-asf-public=cust-asf.ponee.io@storm.apache.org Thu Apr 4 07:09:16 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 895FB18064C for ; Thu, 4 Apr 2019 09:09:14 +0200 (CEST) Received: (qmail 10460 invoked by uid 500); 4 Apr 2019 07:09:13 -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 10450 invoked by uid 99); 4 Apr 2019 07:09:13 -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, 04 Apr 2019 07:09:13 +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 6B49CC2319 for ; Thu, 4 Apr 2019 07:09:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.006 X-Spam-Level: *** X-Spam-Status: No, score=3.006 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, MISSING_HEADERS=1.207, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id WrN8qS8tSLmg for ; Thu, 4 Apr 2019 07:09:10 +0000 (UTC) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 29D4B6120E for ; Thu, 4 Apr 2019 07:02:47 +0000 (UTC) Received: by mail-ot1-f44.google.com with SMTP id 103so1369298otd.9 for ; Thu, 04 Apr 2019 00:02:47 -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:cc; bh=76gv/57k8FFk7MFkAlVbSeIvRB27Md7PRngU3n22YYU=; b=LXJuvQBgeO7IyB7m6wUHUZKEoD736evv9/JasnXXnu7c9t4dhnxTf7aMUhR3hoE4QG Ln/oNaEv7EjtOkPvilO7R6/oUefnGsObZ4FYJzN8GA0+vJ5npkKqtnx6gikcJ+aO9rvw S9MAfIP/DXuJdWRrRCgZNbcAbVnwZUosjRust/XUMfPWHFUSKfj1wurceQVvO3WseGF6 SR6yefhAmVL9BvatK7cVy9Cdos5qHo+gxrenu8QTxDowGOxIOQSjDAe2UOQUvlnq3FMe gv4/64Jd5DPYwfbGBBPbcJdyYwNm0PO5MdiH7e/orki4tJR6DrNhYuHYTo7F0j9U9KJQ Z2+w== 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:cc; bh=76gv/57k8FFk7MFkAlVbSeIvRB27Md7PRngU3n22YYU=; b=L5xin/n9ChfXNG/FVQSaBXVCocsKiFER8P+w7fkpKKsGHl89iksQXAebZeRMT5Ib67 f28jqtR7+go6xU0GSTH436JZj9ly44qFFx5OSbNQqgXnyQpdMktULDk4VGRmOjwcqLe/ iq0kRrp66Cir+upw4o2mokMiveGk4t6cZVg86JxqbfLIchplLyN1zWeaj8zWEviwwAFl QoeN/AxL1hzVivobhp3o7xwqu3eyDk4W4woN1CyxGZ3HHynA44VuHhx1y4vM9PJ4PF1T tJbe/Vor+jA07in9uxmAtwgz+Saz+Hvhu++qxd3Q5tO/wJ67XHrYp9jZ+fb2j/GWCm9L d4rg== X-Gm-Message-State: APjAAAVVyt59Me9p5kWhammCIcc7iaXHPGwh0q62Vuw/gHV7ZzFXqZ7y MiO7qkmzVwQcuf6yDciq6zBP/VRle6e9P1tp2bWMQyeA X-Google-Smtp-Source: APXvYqziMUuSHwOdE7NuF1P0F8sQ/7vcSEjc4sKHpBqZnwL7YC7S5+0hc1Ncdo5cZSPMZVf7WzIaXTkdVuX2tpbhVoo= X-Received: by 2002:a05:6830:1153:: with SMTP id x19mr3159483otq.74.1554361365566; Thu, 04 Apr 2019 00:02:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Stig_Rohde_D=C3=B8ssing?= Date: Thu, 4 Apr 2019 09:02:33 +0200 Message-ID: Subject: Re: Need help with custom Storm Trident Metrics Cc: user@storm.apache.org Content-Type: multipart/alternative; boundary="0000000000000c19df0585aef5ce" --0000000000000c19df0585aef5ce Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable There might be an issue with the API for StateFactory here. You need a TopologyContext to use the new metrics API, but makeState doesn't take one. Others can correct me if this is not an issue, but IMO feel free to register an issue at https://issues.apache.org/jira. Den tor. 4. apr. 2019 kl. 08.58 skrev Stig Rohde D=C3=B8ssing < stigdoessing@gmail.com>: > 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 wi= th > 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 me= tricsContext, final int partitionIndex, final int numPartitions) { >> ReducedMetric reducedMetric =3D 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=3D3337 -Dcom.sun.management.jmxremot= e.local.only=3Dfalse -Dcom.sun.management.jmxremote -Dcom.sun.management.jm= xremote.ssl=3Dfalse -Dcom.sun.management.jmxremote.authenticate=3Dfalse >> >> After running the Storm cluster when I'm connecting to the 3337 port the= n >> 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 >> > --0000000000000c19df0585aef5ce Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
There might be an issue with the API for = StateFactory here. You need a TopologyContext to use the new metrics API, b= ut makeState doesn't take one. Others can correct me if this is not an = issue, but IMO feel free to register an issue at https://issues.apache.org/jira.

Den tor. 4. a= pr. 2019 kl. 08.58 skrev Stig Rohde D=C3=B8ssing <stigdoessing@gmail.com>:
As fa= r 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 th= e new metrics system? You can find documentation at htt= ps://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 mak= eState of the StateFactory implementation.

@O=
verride
public State makeState(final Map<=
/span> conf, final IMetricsContext metricsContext, final int partitionIndex, fi=
nal int numPartitions) {
    ReducedMetric reducedMetric =3D new ReducedMetric(new<=
span class=3D"gmail-m_-5939624756074935653gmail-m_-5659840616738541328m_818=
408788927051423gmail-pln" style=3D"margin:0px;padding:0px;border:0px none;f=
ont-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inh=
erit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-si=
zing:inherit;color:rgb(48,51,54)"> MeanReducer());
    metricsContext.registerMetric("custom-metric-1&=
quot;, reducedMetric, 1);
    reducedMetric.update=
(100);
}

I have added the following jmx config in the storm.yml

-Dcom.=
sun.management.jmxremote.port=3D3337<=
/span> -Dcom.sun.management.jmxremote.local.only=3Dfalse -Dcom=
.sun.management.jmxremote -Dcom.sun=
.management.jmxremote.ssl=3Dfalse -Dcom.sun<=
span class=3D"gmail-m_-5939624756074935653gmail-m_-5659840616738541328m_818=
408788927051423gmail-pun" style=3D"margin:0px;padding:0px;border:0px none;f=
ont-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inh=
erit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-si=
zing:inherit;color:rgb(48,51,54)">.management.jmxremote=
.authenticate=3Dfalse=

After running the Storm cluster when I= 'm connecting to the 3337 port then I'm not seeing this metrics whi= ch I had defined.

What am I=C2=A0missing?

<= br>
--
Regards,
Niraj Gupta
+91 727533898
0


--
Regards,
Niraj Gup= ta
+91 7275338980


--
Regards,
Niraj Gupta
+91 7275338980
--0000000000000c19df0585aef5ce--