Passing two value to the ConvergenceCriterion function

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

Passing two value to the ConvergenceCriterion function

Riccardo Diomedi
Hi

I want to send two value to the ConvergenceCriterion function, so i decided to use an aggregator of Tuple2. But then, when i implement Aggregator<Tuple2>, i cannot do that because Tuple2 doesn’t implement Value.
So i tried to create a class Tuple2Value that implements Value, but here i get stuck because i don’t know how to do it in a proper way.
Any suggestions?
Is there an alternative (and easy) way to pass two values to the convergenceCriterion function?

Thank you

Riccardo!
Reply | Threaded
Open this post in threaded view
|

Re: Passing two value to the ConvergenceCriterion function

rmetzger0
Hi,

take a look at the "Record" class. That one implements the Value interface and can have multiple values.

On Fri, Mar 11, 2016 at 6:01 PM, Riccardo Diomedi <[hidden email]> wrote:
Hi

I want to send two value to the ConvergenceCriterion function, so i decided to use an aggregator of Tuple2. But then, when i implement Aggregator<Tuple2>, i cannot do that because Tuple2 doesn’t implement Value.
So i tried to create a class Tuple2Value that implements Value, but here i get stuck because i don’t know how to do it in a proper way.
Any suggestions?
Is there an alternative (and easy) way to pass two values to the convergenceCriterion function?

Thank you

Riccardo!

Reply | Threaded
Open this post in threaded view
|

Re: Passing two value to the ConvergenceCriterion function

Riccardo Diomedi
Ok!
On 14 Mar 2016, at 10:41, Robert Metzger <[hidden email]> wrote:

Hi,

take a look at the "Record" class. That one implements the Value interface and can have multiple values.

On Fri, Mar 11, 2016 at 6:01 PM, Riccardo Diomedi <[hidden email]> wrote:
Hi

I want to send two value to the ConvergenceCriterion function, so i decided to use an aggregator of Tuple2. But then, when i implement Aggregator<Tuple2>, i cannot do that because Tuple2 doesn’t implement Value.
So i tried to create a class Tuple2Value that implements Value, but here i get stuck because i don’t know how to do it in a proper way.
Any suggestions?
Is there an alternative (and easy) way to pass two values to the convergenceCriterion function?

Thank you

Riccardo!