count the k-means iteration

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

count the k-means iteration

Pa Rö
hi community,

my k-means works fine now. thanks a lot for your help.

now i want test something, how is the best way in flink to cout
the iteration?

best regards,
paul
Reply | Threaded
Open this post in threaded view
|

Re: count the k-means iteration

rmetzger0
Sorry for the late reply.
Operators part of an iteration allow you to get the current iteration id like this: getIterationRuntimeContext().getSuperstepNumber()
To get the IterationRuntimeContext, the function needs to implement the Rich* interface.

On Tue, May 26, 2015 at 4:01 PM, Pa Rö <[hidden email]> wrote:
hi community,

my k-means works fine now. thanks a lot for your help.

now i want test something, how is the best way in flink to cout
the iteration?

best regards,
paul