You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by Chesnay Schepler <ch...@apache.org> on 2023/07/18 08:37:13 UTC
[DISCUSS][2.0] FLIP-341: Remove MetricGroup methods accepting an int as a name
The MetricGroup interface contains methods to create groups and metrics
using an int as a name. The original intention was to allow pattern like
|group.addGroup("subtaskIndex").addGroup(0)| , but this didn't really
work out, with |addGroup(String, String)| serving this use case much
better.
Metric methods accept an int mostly for consistency, but there's no good
use-case for it.
These methods also offer hardly any convenience since all they do is
save potential users from using |String.valueOf| on one argument. That's
doesn't seem valuable enough for something that doubles the size of the
interface.
I propose to remove said method.
https://cwiki.apache.org/confluence/display/FLINK/FLIP-341%3A+Remove+MetricGroup+methods+accepting+an+int+as+a+name
Re: [DISCUSS][2.0] FLIP-341: Remove MetricGroup methods accepting an int as a name
Posted by Leonard Xu <xb...@gmail.com>.
+1, there’re methods offer parameter with String which allows users to migrate.
Best,
Leonard
> On Jul 18, 2023, at 9:26 PM, Jing Ge <ji...@ververica.com.INVALID> wrote:
>
> +1
>
> On Tue, Jul 18, 2023 at 1:11 PM Chesnay Schepler <ch...@apache.org> wrote:
>
>> Good catch; i've fixed the list.
>>
>> On 18/07/2023 12:20, Xintong Song wrote:
>>> +1 in general.
>>>
>>> I think the list of affected public interfaces in the FLIP is not
>> accurate.
>>>
>>> - `#counter(int, Counter)` is missed
>>> - `#meter(int)` should be `#meter(int, Meter)`
>>> - `#group(int)` should be `#addGroup(int)`
>>>
>>>
>>> Best,
>>>
>>> Xintong
>>>
>>>
>>>
>>> On Tue, Jul 18, 2023 at 4:39 PM Chesnay Schepler <ch...@apache.org>
>> wrote:
>>>
>>>> The MetricGroup interface contains methods to create groups and metrics
>>>> using an int as a name. The original intention was to allow pattern like
>>>> |group.addGroup("subtaskIndex").addGroup(0)| , but this didn't really
>>>> work out, with |addGroup(String, String)| serving this use case much
>>>> better.
>>>>
>>>> Metric methods accept an int mostly for consistency, but there's no good
>>>> use-case for it.
>>>>
>>>> These methods also offer hardly any convenience since all they do is
>>>> save potential users from using |String.valueOf| on one argument. That's
>>>> doesn't seem valuable enough for something that doubles the size of the
>>>> interface.
>>>>
>>>> I propose to remove said method.
>>>>
>>>>
>>>>
>>>>
>> https://cwiki.apache.org/confluence/display/FLINK/FLIP-341%3A+Remove+MetricGroup+methods+accepting+an+int+as+a+name
>>>>
>>
>>
Re: [DISCUSS][2.0] FLIP-341: Remove MetricGroup methods accepting an int as a name
Posted by Jing Ge <ji...@ververica.com.INVALID>.
+1
On Tue, Jul 18, 2023 at 1:11 PM Chesnay Schepler <ch...@apache.org> wrote:
> Good catch; i've fixed the list.
>
> On 18/07/2023 12:20, Xintong Song wrote:
> > +1 in general.
> >
> > I think the list of affected public interfaces in the FLIP is not
> accurate.
> >
> > - `#counter(int, Counter)` is missed
> > - `#meter(int)` should be `#meter(int, Meter)`
> > - `#group(int)` should be `#addGroup(int)`
> >
> >
> > Best,
> >
> > Xintong
> >
> >
> >
> > On Tue, Jul 18, 2023 at 4:39 PM Chesnay Schepler <ch...@apache.org>
> wrote:
> >
> >> The MetricGroup interface contains methods to create groups and metrics
> >> using an int as a name. The original intention was to allow pattern like
> >> |group.addGroup("subtaskIndex").addGroup(0)| , but this didn't really
> >> work out, with |addGroup(String, String)| serving this use case much
> >> better.
> >>
> >> Metric methods accept an int mostly for consistency, but there's no good
> >> use-case for it.
> >>
> >> These methods also offer hardly any convenience since all they do is
> >> save potential users from using |String.valueOf| on one argument. That's
> >> doesn't seem valuable enough for something that doubles the size of the
> >> interface.
> >>
> >> I propose to remove said method.
> >>
> >>
> >>
> >>
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-341%3A+Remove+MetricGroup+methods+accepting+an+int+as+a+name
> >>
>
>
Re: [DISCUSS][2.0] FLIP-341: Remove MetricGroup methods accepting an int as a name
Posted by Chesnay Schepler <ch...@apache.org>.
Good catch; i've fixed the list.
On 18/07/2023 12:20, Xintong Song wrote:
> +1 in general.
>
> I think the list of affected public interfaces in the FLIP is not accurate.
>
> - `#counter(int, Counter)` is missed
> - `#meter(int)` should be `#meter(int, Meter)`
> - `#group(int)` should be `#addGroup(int)`
>
>
> Best,
>
> Xintong
>
>
>
> On Tue, Jul 18, 2023 at 4:39 PM Chesnay Schepler <ch...@apache.org> wrote:
>
>> The MetricGroup interface contains methods to create groups and metrics
>> using an int as a name. The original intention was to allow pattern like
>> |group.addGroup("subtaskIndex").addGroup(0)| , but this didn't really
>> work out, with |addGroup(String, String)| serving this use case much
>> better.
>>
>> Metric methods accept an int mostly for consistency, but there's no good
>> use-case for it.
>>
>> These methods also offer hardly any convenience since all they do is
>> save potential users from using |String.valueOf| on one argument. That's
>> doesn't seem valuable enough for something that doubles the size of the
>> interface.
>>
>> I propose to remove said method.
>>
>>
>>
>> https://cwiki.apache.org/confluence/display/FLINK/FLIP-341%3A+Remove+MetricGroup+methods+accepting+an+int+as+a+name
>>
Re: [DISCUSS][2.0] FLIP-341: Remove MetricGroup methods accepting an int as a name
Posted by Xintong Song <to...@gmail.com>.
+1 in general.
I think the list of affected public interfaces in the FLIP is not accurate.
- `#counter(int, Counter)` is missed
- `#meter(int)` should be `#meter(int, Meter)`
- `#group(int)` should be `#addGroup(int)`
Best,
Xintong
On Tue, Jul 18, 2023 at 4:39 PM Chesnay Schepler <ch...@apache.org> wrote:
> The MetricGroup interface contains methods to create groups and metrics
> using an int as a name. The original intention was to allow pattern like
> |group.addGroup("subtaskIndex").addGroup(0)| , but this didn't really
> work out, with |addGroup(String, String)| serving this use case much
> better.
>
> Metric methods accept an int mostly for consistency, but there's no good
> use-case for it.
>
> These methods also offer hardly any convenience since all they do is
> save potential users from using |String.valueOf| on one argument. That's
> doesn't seem valuable enough for something that doubles the size of the
> interface.
>
> I propose to remove said method.
>
>
>
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-341%3A+Remove+MetricGroup+methods+accepting+an+int+as+a+name
>