From dev-return-49126-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Thu Jan 16 17:07:26 2020 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id D3D7718060E for ; Thu, 16 Jan 2020 18:07:25 +0100 (CET) Received: (qmail 34886 invoked by uid 500); 16 Jan 2020 17:07:25 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 34873 invoked by uid 99); 16 Jan 2020 17:07:24 -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, 16 Jan 2020 17:07:24 +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 802ACC03EF for ; Thu, 16 Jan 2020 17:07:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 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=0.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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-he-de.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id vB5eekYfkwGg for ; Thu, 16 Jan 2020 17:07:17 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::933; helo=mail-ua1-x933.google.com; envelope-from=alexey.goncharuk@gmail.com; receiver= Received: from mail-ua1-x933.google.com (mail-ua1-x933.google.com [IPv6:2607:f8b0:4864:20::933]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 8CF817E131 for ; Thu, 16 Jan 2020 17:07:16 +0000 (UTC) Received: by mail-ua1-x933.google.com with SMTP id 73so7900949uac.6 for ; Thu, 16 Jan 2020 09:07:16 -0800 (PST) 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=eWg14Hwoh+ACkmvjxU4jFTbU4qu+GGDK7wvY7hfxdiE=; b=YtupRlN3YdEV4z8n46Rq132Hukp2x1SUGciQZTWWKXZkEmH6FCDV1EWSQRvsYcRAfE 7+fWaCXP/zqhmTcUO+qqXBeXDLuvnm+vkWpEUHr8bM9fGbs4J38YieJ2J7p6kHl5gPlT 5C0XZLbYP8MbFAewBYGtTdLLJgZbcbXz8NUNtexhTpjIwKss8nlXGR2WGk0xYUBCA6FW Cp50WgkSsArQScx91uHJ/OXval5N54dKOqWpTiqt3aJUY/a8sISSoNsc6eJaX2J4CWOY 3fnAkp/yK4etzsYqKi17FQMfUVQVhoFRVVsdlV4EE84xDOe29/S++nu+oRbVr69F/FkT K9VQ== 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=eWg14Hwoh+ACkmvjxU4jFTbU4qu+GGDK7wvY7hfxdiE=; b=NgVKVkFDNBA2Oesx2SbbcBy7Ns0HufXRwh4LcgJW1Hhh4Zqywil7kgyjm89vi+wKvd ZDveeS/QDD5AzTeDHMBG/UWEzMNTbK7eM3iUxZ81+ySx/3c75QapJQOSKauv7V+zjqRE NiEOLjWim2UBUB/ittnpZusgX741JuhzbmH55fOB3q41Anu5VrGXYxXPw7mdt5T9drMB qRpCVqG2czY6MmyngK1x98YbFqKO8bZ8GwtNinTtQ+nZVEucnkuzH/3g7jfEcr9Djser Aq+11/r6A9tx/SqKPDq7msrMPqmL2NSN3x2Nhvzi7oESgPHBV+PFx/XcHZ8VHWxriuX7 Q25A== X-Gm-Message-State: APjAAAUD4Ft3IVAUygntY5UHtEKL9dejIfn8FaWbWq/h7+YHOl6IjOtb K723SqMyxq4dq5EP0MCH0FsvFFyFhXyCZHf4xLPBN2hoX+Q= X-Google-Smtp-Source: APXvYqy4cL5g7Gmii6eJGnaV4MMvhXY5nbqaMKfSvYb1Gx0TJcJTQyOA/2lVOIdMH9lsLrZ++KtE4fm3xkSpr/VPX4c= X-Received: by 2002:ab0:2ea8:: with SMTP id y8mr4574835uay.23.1579194428527; Thu, 16 Jan 2020 09:07:08 -0800 (PST) MIME-Version: 1.0 References: <1F8796A8-09DC-40C5-B29D-76D38D24A825@gmail.com> <6B6F7062-62CB-4E71-AE2E-4A5C2F44962C@gmail.com> In-Reply-To: <6B6F7062-62CB-4E71-AE2E-4A5C2F44962C@gmail.com> From: Alexey Goncharuk Date: Thu, 16 Jan 2020 20:06:57 +0300 Message-ID: Subject: Re: Internal classes are exposed in public API To: dev Content-Type: multipart/alternative; boundary="000000000000f197b6059c44da10" --000000000000f197b6059c44da10 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think it would make sense to make something like a new IgniteMonitoring facade on Ignite interface and add an ability to obtain a metric value through this facade, not through an exporter. This would be a straightforward replacement for all old metrics interfaces. =D1=87=D1=82, 16 =D1=8F=D0=BD=D0=B2. 2020 =D0=B3. =D0=B2 17:13, =D0=9D=D0= =B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9 =D0=98=D0=B6=D0=B8=D0=BA=D0=BE=D0=B2 : > Ticket to export MetricRegistry to the public API created - > https://issues.apache.org/jira/browse/IGNITE-12552 > > > 16 =D1=8F=D0=BD=D0=B2. 2020 =D0=B3., =D0=B2 16:58, =D0=9D=D0=B8=D0=BA= =D0=BE=D0=BB=D0=B0=D0=B9 =D0=98=D0=B6=D0=B8=D0=BA=D0=BE=D0=B2 > =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): > > > > Do you propose to keep these interfaces forever? > > > >> 16 =D1=8F=D0=BD=D0=B2. 2020 =D0=B3., =D0=B2 16:52, Alexey Goncharuk > =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): > >> > >> Let's say I am upgrading from 2.7 to 2.8. Given that I figured out to > >> obtain an instance of the JMX exporter SPI, how should I map the old > >> 'interface + method name' to the new metric name? I think deprecation = of > >> the public API may be a bit harsh in this case. > >> > >> =D1=87=D1=82, 16 =D1=8F=D0=BD=D0=B2. 2020 =D0=B3. =D0=B2 16:44, =D0=9D= =D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9 =D0=98=D0=B6=D0=B8=D0=BA=D0=BE=D0=B2 <= nizhikov@apache.org>: > >> > >>> Hello, Alexey. > >>> > >>>> * DataRegionMetric public interface is deprecated, however, the > >>> suggested replacement class GridMetricsManager is internal and cannot > be > >>> acquired by a user. This makes impossible for the user to fix their > code to > >>> not use deprecated API > >>> > >>> May be it=E2=80=99s not clear text here. > >>> My point here, that user should obtain metrics values via configured > >>> metric exporters and don=E2=80=99t use *Metric interfaces. > >>> > >>>> * In ReadOnlyMetricsRegistry there is a Consumer, bu= t > >>> MetricRegistry is again an internal class. > >>> > >>> This is a real issue. > >>> We should expose MetricRegistry interface to the public API and keep > >>> internal implementation. > >>> > >>> I will create ticket and fix it, shortly. > >>> > >>> > >>>> 16 =D1=8F=D0=BD=D0=B2. 2020 =D0=B3., =D0=B2 16:39, Alexey Goncharuk = < > alexey.goncharuk@gmail.com> > >>> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): > >>>> > >>>> Igniters, Nikolay, > >>>> > >>>> I was adding a new metric in the scope of the ticket [1] and was > >>> surprised by a few things: > >>>> * DataRegionMetric public interface is deprecated, however, the > >>> suggested replacement class GridMetricsManager is internal and cannot > be > >>> acquired by a user. This makes impossible for the user to fix their > code to > >>> not use deprecated API > >>>> * In ReadOnlyMetricsRegistry there is a Consumer, bu= t > >>> MetricRegistry is again an internal class. This will cause the user > code > >>> compilation to break when MetricRegistry is changed > >>>> > >>>> These things violate the public-private API separation and need to b= e > >>> fixed prior 2.8 is released. Let's discuss what changes need to be > made to > >>> the API or perhaps move incomplete IEP-35 interfaces to the private > package > >>> and remove deprecations until the API is ready. > >>>> > >>>> --AG > >>> > >>> > > > > --000000000000f197b6059c44da10--