flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aljoscha Krettek <aljos...@apache.org>
Subject Re: question for generic streams
Date Mon, 24 Oct 2016 17:20:39 GMT
Hi,
I think the basic problem here is that the generic types cannot really be
changed when executing, i.e. when you read the types of the stream from a
file.

One thing I could suggest is to use Strings for everything and inside those
Strings use JSON or something similar to encode different types. This might
not be a very well performing solution but it is very general.

Cheers,
Aljoscha

On Thu, 20 Oct 2016 at 18:15 Radu Tudoran <radu.tudoran@huawei.com> wrote:

> Hi,
>
>
>
> I am trying to read the types of an input stream from a file and then
> generate the datastream resulting from parsing a source accordingly (e.g.
> DataStream<TupleN<type1,type2…>>). Finally this will be registered as a
> table.
>
> What would be the best way to do this?
>
>
>
> I am trying currently to use the generic type of Tuple for the datastream
> which then will be instantiated based on the arity of the number of types.
> However, this does not seem to be a good way (and did not really figure out
> how to actually implement it)
>
>
>
> Any suggestions are welcome
>

Mime
View raw message