Re: partition identifier

Posted by Stephan Ewen on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/partition-identifier-tp513p514.html

Hi!

You can always use the "rich" version of the function, for example the "RichMapFunction". Inside that function, you can call "getRuntimeContext()", which gives you access to many things, among them the partition number.

Stephan


On Wed, Dec 3, 2014 at 3:49 PM, Attila BernĂ¡th <[hidden email]> wrote:
Dear Developers,

Datasets are partitioned between machines. I wonder if there is a way
to get some identifier of a partition. I see that the class
HashPartition has a getPartitionNumber method, but I don't see how I
could use this.
(For example, I would like to see the partition identifier in a
MapFunction, or in a MapPartitionFunction).

Attila