Hi, the runtime context has the following method:
int subtask = getRuntimeContext().getIndexOfThisSubtask(); The RuntimeContext is available in each Rich* function. On Fri, Apr 8, 2016 at 11:46 PM, Deepak Jha <dkjhan...@gmail.com> wrote: > Hi, > I have a use case where I need to get UniqueId of an operator inside a > stream. DataStream's getId() returns the ID of the stream but I have > operator partitioned (say partitionByHash) inside the datastream. So I > would like to get unique ID for each operator working in parallel. Is there > a way in which I can get it ? > Also, does DataStream's getId generates different ID in case i have > parallelism > 1 ? > > > -- > Thanks, > Deepak >