RichGMapFunction,
>>>> Tuple1>{
>>>>
>>>> private long num;
>>>>
>>>> @Override
>>>> public void open(Configuration parameters) throws
>>>> Exception {
>>>>
super.open(parameters);
>>> num = getRuntimeContext().
>>> getBroadcastVariable(
>>> "num").get(0);
>>> }
>>>
>>> @Override
>>>
lic void map(Tuple1value,
>> Collector> out))
>> throws Exception{
>> out.collect(new Tuple1(value/num));
>> }
>> }
>> }
>>
>> Best regards,
>>
>> Hung
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Difference-between-using-a-global-variable-and-broadcasting-a-variable-tp1128.html
>> Sent from the Apache Flink User Mailing List archive. mailing list
>> archive at Nabble.com.
>>
>>
ards,
Hung
--
View this message in context:
http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Difference-between-using-a-global-variable-and-broadcasting-a-variable-tp1128.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at
Nabble.com.
out))
throws Exception{
out.collect(new Tuple1(value/num));
}
}
}
Best regards,
Hung
--
View this message in context:
http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Difference-between-using-a-global-varia