You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Stefano Baghino <st...@radicalbit.io> on 2016/01/12 11:49:54 UTC

Broadcast variable: error in the wiki?

Hi all, I'm starting to get familiar with Flink. With the help of a
colleague I've noticed what I think may be an error in the documentation
about broadcast variables (
https://cwiki.apache.org/confluence/display/FLINK/Variables+Closures+vs.+Broadcast+Variables
).

The documentation states that a broadcast variable "takes a Flink DataSet
and makes it available to all function instances". Then it goes on with an
example of an anonymous MapFunction invoking the getRuntimeContext method.
However, if I got it right, you need to extend a RichMapFunction in order
to have access to the runtime context. We've checked the code as well and
it looks like getRuntimeContext is only available to classes extending
AbstractRichFunction.

I'd like to edit the wiki page myself but unfortunately I don't seem to
have writing privileges. Is there a way for me to contribute to the
documentation? Thank you in advance.

-- 
BR,
Stefano Baghino

Software Engineer @ Radicalbit

Re: Broadcast variable: error in the wiki?

Posted by Stefano Baghino <st...@radicalbit.io>.
Hi, Stephan, thank you for the quick reply and for fixing the issue. If I
spot more issues I'll gladly contribute to the wiki.

On Tue, Jan 12, 2016 at 12:00 PM, Stephan Ewen <se...@apache.org> wrote:

> Hi!
>
> Thank you for pointing out the error.
>
> I actually fixed it before reading through to the end of your mail where
> you offered to fix it yourself.
>
> If you find more issues, ping me, I can give you edit permissions.
>
> Thanks,
> Stephan
>
>
> On Tue, Jan 12, 2016 at 11:49 AM, Stefano Baghino <
> stefano.baghino@radicalbit.io> wrote:
>
>> Hi all, I'm starting to get familiar with Flink. With the help of a
>> colleague I've noticed what I think may be an error in the documentation
>> about broadcast variables (
>> https://cwiki.apache.org/confluence/display/FLINK/Variables+Closures+vs.+Broadcast+Variables
>> ).
>>
>> The documentation states that a broadcast variable "takes a Flink DataSet
>> and makes it available to all function instances". Then it goes on with an
>> example of an anonymous MapFunction invoking the getRuntimeContext method.
>> However, if I got it right, you need to extend a RichMapFunction in order
>> to have access to the runtime context. We've checked the code as well and
>> it looks like getRuntimeContext is only available to classes extending
>> AbstractRichFunction.
>>
>> I'd like to edit the wiki page myself but unfortunately I don't seem to
>> have writing privileges. Is there a way for me to contribute to the
>> documentation? Thank you in advance.
>>
>> --
>> BR,
>> Stefano Baghino
>>
>> Software Engineer @ Radicalbit
>>
>
>


-- 
BR,
Stefano Baghino

Software Engineer @ Radicalbit

Re: Broadcast variable: error in the wiki?

Posted by Stephan Ewen <se...@apache.org>.
Hi!

Thank you for pointing out the error.

I actually fixed it before reading through to the end of your mail where
you offered to fix it yourself.

If you find more issues, ping me, I can give you edit permissions.

Thanks,
Stephan


On Tue, Jan 12, 2016 at 11:49 AM, Stefano Baghino <
stefano.baghino@radicalbit.io> wrote:

> Hi all, I'm starting to get familiar with Flink. With the help of a
> colleague I've noticed what I think may be an error in the documentation
> about broadcast variables (
> https://cwiki.apache.org/confluence/display/FLINK/Variables+Closures+vs.+Broadcast+Variables
> ).
>
> The documentation states that a broadcast variable "takes a Flink DataSet
> and makes it available to all function instances". Then it goes on with an
> example of an anonymous MapFunction invoking the getRuntimeContext method.
> However, if I got it right, you need to extend a RichMapFunction in order
> to have access to the runtime context. We've checked the code as well and
> it looks like getRuntimeContext is only available to classes extending
> AbstractRichFunction.
>
> I'd like to edit the wiki page myself but unfortunately I don't seem to
> have writing privileges. Is there a way for me to contribute to the
> documentation? Thank you in advance.
>
> --
> BR,
> Stefano Baghino
>
> Software Engineer @ Radicalbit
>