flink Datastream to keyedStrem

36 Views Asked by At

I use kafka and flink for real-time dataStrem processing

flink application receives dataStrem of several metrics from the network through kafka for processing and pushes back the data to kafka broker

I woild like to implement one of the flink windows i have to partition the data usink keyBy and key selector what are the steps in order to create partitions of the data using keyBy in order to do several operations on these partitions.

DataStream inputStream = environment.fromSource(source, WatermarkStrategy.noWatermarks(), "Kafka Source");

DataStream inputMetricStream = inputStream.map(new StringToInputMetricThroughJson());

I tried to create amethod that stores the names of the metrics in order to use them as keys for the keySelctor. .keyBy

0

There are 0 best solutions below