To handle a stream of incoming data, these numbered steps (as documented in the Flink documentation) have to be done programmatically:
- Get the StreamExecutionEnvironment object. StreamExecutionEnvironment is the basis for all Flink data stream execution programs. The following code block shows one way to get this object created in Java:
final StreamExecutionEnvironment env = StreamExecutionEnvironment . getExecutionEnvironment( );
- Load the initial data from the appropriate source.
- Do the necessary transformation on this loaded data. The full set of transformations available can be found in the Flink documentation at this link: https://goo.gl/YI82xY.
- Specify the destination where the results after transformation has to be kept.
- Trigger the program execution.
We wouldn't want to replicate the Flink documentation here; rather we would say that you go to this link to have a deep understanding of the DataStream API in the Flink documentation: https://goo.gl/NS69SK.