'Use KeyProcessFunction on KeyBy

I have a snippet of code that looks like this:

DataStream<Tuple2<Long, Integer>> datastream = otherDatastream
        .keyBy(event -> event.getField(1))
        .process(new SomeFunction());

My someFunction is a class that extends the KeyedProcessFunction. But trying this code results in a Cannot resolve method process(SomeFunction). I am unsure what the correct syntax would look like for this case.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source