[jira] [Created] (FLINK-18435) Allow reporter factories to intercept reflection-based instantiation attempts

2020-06-26 Thread Chesnay Schepler (Jira)
Chesnay Schepler created FLINK-18435:


 Summary: Allow reporter factories to intercept reflection-based 
instantiation attempts
 Key: FLINK-18435
 URL: https://issues.apache.org/jira/browse/FLINK-18435
 Project: Flink
  Issue Type: Improvement
  Components: Runtime / Metrics
Reporter: Chesnay Schepler
Assignee: Chesnay Schepler
 Fix For: 1.12.0


Before 1.11 to use a reporter its class was configured, and the instance 
instantiated via reflection.
We then introduced reporter factories, and added an annotation for redirection 
instantiation attempts from the reporter class to factories, by annotating the 
reporter class with {{InstantiateViaFactory}}.
However, when we migrated reporters to plugins, this approach stopped working, 
the reason being that it required the reporter class to be accessible. The 
plugin system only exposes the factories however.

To ensure that existing configurations continue to work, I propose to add a new 
{{InterceptInstantiationViaReflection}} annotation for factories, with which 
they can specify a class name to intercept reflection-based instantiation 
attempts.

Basically, we just invert the {{InstantiateViaFactory}} logic.
Instead of the reporter saying "This factory should be used to instantiate 
me.", the factory now say "I can instantiate that reporter."



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (FLINK-18436) how to implement the class `MyTupleReducer`in flink official document

2020-06-26 Thread appleyuchi (Jira)
appleyuchi created FLINK-18436:
--

 Summary: how to implement the class `MyTupleReducer`in flink 
official document
 Key: FLINK-18436
 URL: https://issues.apache.org/jira/browse/FLINK-18436
 Project: Flink
  Issue Type: Test
Reporter: appleyuchi


This question has been posted in 
[https://stackoverflow.com/questions/62553572/how-to-implement-the-class-mytuplereducerin-flink-official-document]
 
but no final result:
 
 
I'm learning [flink document-dataset api 
|https://ci.apache.org/projects/flink/flink-docs-stable/dev/batch/dataset_transformations.html]

there's a class called{{mytupleReducer}}

I'm trying to complete it: [https://paste.ubuntu.com/p/3CjphGQrXP/]

but it' full of red line in Intellij.

could you give me a right style of above code?

Thanks for your help~!

PS:

I'm writing part of MyTupleReduce [https://pastebin.ubuntu.com/p/m4rjs6t8QP/]

but the return part is Wrong.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re:Re: [Reminder] Prefer {% link %} tag in documentation

2020-06-26 Thread Roc Marshal
Hi everyone,


There is a question about optimizing and translating documents. If the link 
target is an internal image, does the link method need to be set as the same 
way that link target is other pages. 
Such as : Should """   src="{{ site.baseurl }}/fig/stream_barriers.svg"   """   
be written as   """ src="{% link fig/stream_barriers.svg %} """ ?


Thank you. 
Best Roc.
















At 2020-06-17 12:38:38, "Yangze Guo"  wrote:
>I second Jark's comment. We need a CI mechanism to ensure this.
>
>Best,
>Yangze Guo
>
>On Wed, Jun 17, 2020 at 11:45 AM Jark Wu  wrote:
>>
>> Hi everyone,
>>
>> Before going to use {% link %} and adding a CI to force using link tag, I
>> suggest adding a CI profile to check broken links first.
>>
>> The background is that, recently, I noticed that many contributors are
>> beginning to use link tags, but forget to link ".zh.md" instead of ".md" in
>> Chinese documentation.
>> This leads to the docs build failing in the last two days [1]. I have fixed
>> a couple of broken links. But if we don't have a CI mechanism, this would
>> make the docs build unstable.
>>
>> Best,
>> Jark
>>
>> [1]: https://ci.apache.org/builders/flink-docs-master
>>
>> On Mon, 15 Jun 2020 at 12:48, Congxian Qiu  wrote:
>>
>> > +1 to use {% link %} tag and add a check during CI.
>> > for Chinese doc, will suggest the Chinese translate contributor use the {%
>> > link %} tag when reviewing the translate pr.
>> >
>> > Best,
>> > Congxian
>> >
>> >
>> > Jark Wu  于2020年6月10日周三 上午10:48写道:
>> >
>> > > +1 to use  {% link %}  tag and add check in CI.
>> > >
>> > > Tips: if want to link a Chinese page, should write: [CLI]({% link ops/
>> > > cli.zh.md %})
>> > >
>> > > Best,
>> > > Jark
>> > >
>> > > On Wed, 10 Jun 2020 at 10:30, Yangze Guo  wrote:
>> > >
>> > > > Thanks for that reminder, Seth!
>> > > >
>> > > > +1 to add a check during CI if possible.
>> > > >
>> > > > Best,
>> > > > Yangze Guo
>> > > >
>> > > > On Wed, Jun 10, 2020 at 3:04 AM Kostas Kloudas 
>> > > wrote:
>> > > > >
>> > > > > Thanks for the heads up Seth!
>> > > > >
>> > > > > Kostas
>> > > > >
>> > > > > On Tue, Jun 9, 2020 at 7:27 PM Seth Wiesman 
>> > > wrote:
>> > > > > >
>> > > > > > The tag is new to Jekyll 4.0 which we only recently updated to.
>> > > > > >
>> > > > > > There are a lot of existing tags that would need to be updated
>> > first
>> > > :)
>> > > > > > I opened a ticket to track that work and then yes that would make
>> > > > sense.
>> > > > > >
>> > > > > > Seth
>> > > > > >
>> > > > > > [1] https://issues.apache.org/jira/browse/FLINK-18193
>> > > > > >
>> > > > > > On Tue, Jun 9, 2020 at 12:05 PM Robert Metzger <
>> > rmetz...@apache.org>
>> > > > wrote:
>> > > > > >
>> > > > > > > Thanks for the reminder. I was also not aware of this tag!
>> > > > > > >
>> > > > > > > How about enforcing the use of this tag through CI?
>> > > > > > > We could for example grep through the added lines of all changes
>> > in
>> > > > docs/
>> > > > > > > and fail the build if we see the wrong pattern.
>> > > > > > >
>> > > > > > >
>> > > > > > > On Tue, Jun 9, 2020 at 4:37 PM Seth Wiesman > > >
>> > > > wrote:
>> > > > > > >
>> > > > > > > > Whoops, responded from the wrong email :)
>> > > > > > > >
>> > > > > > > > Thank you for noticing that, the guide is out of date. I will
>> > fix
>> > > > that
>> > > > > > > > immediately!
>> > > > > > > >
>> > > > > > > > On Tue, Jun 9, 2020 at 9:36 AM Seth Wiesman <
>> > s...@ververica.com>
>> > > > wrote:
>> > > > > > > >
>> > > > > > > > > Thank you for noticing that, the guide is out of date. I will
>> > > > fix that
>> > > > > > > > > immediately!
>> > > > > > > > >
>> > > > > > > > > On Tue, Jun 9, 2020 at 9:34 AM Dawid Wysakowicz <
>> > > > > > > dwysakow...@apache.org>
>> > > > > > > > > wrote:
>> > > > > > > > >
>> > > > > > > > >> Hi Seth,
>> > > > > > > > >>
>> > > > > > > > >> Thanks I did not know that.
>> > > > > > > > >>
>> > > > > > > > >> I am not entirely sure, but I think our documentation guide
>> > is
>> > > > > > > slightly
>> > > > > > > > >> outdated on that manner (
>> > > > > > > > >> https://flink.apache.org/contributing/docs-style.html) Or
>> > is
>> > > > there a
>> > > > > > > > >> mistake in your example? Our guide recommends:
>> > > > > > > > >>
>> > > > > > > > >> [CLI]({{ site.baseurl }}{% link ops/cli.md %})
>> > > > > > > > >>
>> > > > > > > > >>
>> > > > > > > > >> Best,
>> > > > > > > > >>
>> > > > > > > > >> Dawid
>> > > > > > > > >> On 09/06/2020 16:20, Seth Wiesman wrote:
>> > > > > > > > >>
>> > > > > > > > >> Hi Everyone!
>> > > > > > > > >>
>> > > > > > > > >> As we are seeing an influx of documentation PRs in
>> > > anticipation
>> > > > of the
>> > > > > > > > 1.11
>> > > > > > > > >> release I would like to remind everyone to use the {% link
>> > %}
>> > > > tag when
>> > > > > > > > >> cross-linking pages[1]. This is opposed to creating a link
>> > > > based on
>> > > > > > > > >> site.baseurl.
>> > > > > > > > >>
>> > > > > > > > >> Going forward