Re: Tuples serialization

2015-04-24 Thread Stephan Ewen
For the Input Side: The data set myTuples has its type via "myTuples.getType()". The TypeSerializerOutputFormat implements a special interface that picks up that type automatically. If you want to use the type serializer input, you can always do it like this: DataSet> myTuples = ...; myTuples.o

Re: Tuples serialization

2015-04-24 Thread Stephan Ewen
I think you need not create any TypeInformation anyways. It is always present in the data set. DataSet> myTuples = ...; myTuples.output(new TypeSerializerOutputFormat>()); On Fri, Apr 24, 2015 at 10:20 AM, Fabian Hueske wrote: > The BLOCK_SIZE_PARAMETER_KEY is used to split a file into process

Re: Tuples serialization

2015-04-24 Thread Fabian Hueske
The BLOCK_SIZE_PARAMETER_KEY is used to split a file into processable blocks. Since this is a binary file format, the InputFormat does not know where a new record starts. When writing such a file, each block starts with a new record and is filled until no more records fit completely in. The remaini

Re: Tuples serialization

2015-04-24 Thread Flavio Pompermaier
I managed to read and write avro files and still I have two doubts: Which size do I have to use for BLOCK_SIZE_PARAMETER_KEY? Do I have really to create a sample tuple to extract the TypeInformation to instantiate the TypeSerializerInputFormat? On Thu, Apr 23, 2015 at 7:04 PM, Flavio Pompermaier

Re: Tuples serialization

2015-04-23 Thread Flavio Pompermaier
I've searched within flink for a working example of TypeSerializerOutputFormat usage but I didn't find anything usable. Cold you show me a simple snippet of code? Do I have to configure BinaryInputFormat.BLOCK_SIZE_PARAMETER_KEY? Which size do I have to use? Will flink write a single file or a set

Re: Tuples serialization

2015-04-23 Thread Fabian Hueske
Have you tried the TypeSerializerOutputFormat? This will serialize data using Flink's own serializers and write it to binary files. The data can be read back using the TypeSerializerInputFormat. Cheers, Fabian 2015-04-23 11:14 GMT+02:00 Flavio Pompermaier : > Hi to all, > > in my use case I'd li