Hi,
the result of a window operation on a KeyedStream is a regular DataStream.
So, you would need to call keyBy() on the result again if you'd like to
have a KeyedStream.
You can also key a stream by two or more attributes:
DataStream<Tuple4<String, String, String, Long>> windowedStream =
jsonToTuple.keyBy(0,1,3) // keys be first, second, and
forth attribute
Does this answer your question?
Best, Fabian
2016-11-21 2:07 GMT+01:00 Abdul Salam Shaikh <[email protected]>:
> I am trying to creating a keyed stream which collects events in a window
> using :
>
> DataStream<Tuple4<String, String, String, Long>> windowedStream =
> jsonToTuple.keyBy(0)
> .window(GlobalWindows.create())
> .trigger(new WindowCustomTrigger())
> .apply(new WindowCrossingCalculator());
>
> Is it possible to further create a keyed stream from this already created
> keyedStream using some other field for the keyBy function ?
>
> --
> Thanks & Regards,
>
> *Abdul Salam Shaikh*
>
>