How to use Tuple in ListValue?

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

How to use Tuple in ListValue?

Malte Schwarzer
Hello,

is it possible to use some how Tuple objects (e.g. Tuple2<String, Integer>) in a ListValue? Even if Tuple is serializable, it does not implement the Value interface. Therefore ListValue<Tuple2> is it working. 

Is there any work-around? I want to use something like "Tuple2<String, ListValue<Tuple2<String, Integer>>>“ as dataset.

Cheers
Malte
Reply | Threaded
Open this post in threaded view
|

Re: How to use Tuple in ListValue?

rmetzger0
Hi,

I think you can just use a java collection for the Tuple2's. (Starting from Flink 0.8.0)

Robert.

On Fri, Jan 23, 2015 at 11:27 AM, Malte Schwarzer <[hidden email]> wrote:
Hello,

is it possible to use some how Tuple objects (e.g. Tuple2<String, Integer>) in a ListValue? Even if Tuple is serializable, it does not implement the Value interface. Therefore ListValue<Tuple2> is it working. 

Is there any work-around? I want to use something like "Tuple2<String, ListValue<Tuple2<String, Integer>>>“ as dataset.

Cheers
Malte

Reply | Threaded
Open this post in threaded view
|

Re: How to use Tuple in ListValue?

Stefano Bortoli
what I did was to implement ListValue in a MyListValue object, then you can do pretty much what you want. :-)

saluti,
Stefano

2015-01-23 11:29 GMT+01:00 Robert Metzger <[hidden email]>:
Hi,

I think you can just use a java collection for the Tuple2's. (Starting from Flink 0.8.0)

Robert.

On Fri, Jan 23, 2015 at 11:27 AM, Malte Schwarzer <[hidden email]> wrote:
Hello,

is it possible to use some how Tuple objects (e.g. Tuple2<String, Integer>) in a ListValue? Even if Tuple is serializable, it does not implement the Value interface. Therefore ListValue<Tuple2> is it working. 

Is there any work-around? I want to use something like "Tuple2<String, ListValue<Tuple2<String, Integer>>>“ as dataset.

Cheers
Malte