0

I'm currently developing a stream processing application, one of the functionality is to take events that happen in the time zone [time of submitting the job, time of submitting the job + T ].

how can access to that particular variable (time of submitting the job) with stream processing APIs in Flink?

Thank you.

Maher Marwani
  • 43
  • 1
  • 5

1 Answers1

1

One possible way is to use Flink's ParameterTool

https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/best_practices.html#getting-your-configuration-values-into-the-parametertool

ParameterTool parameters = ParameterTool.fromArgs(args);

// set up the execution environment
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
env.getConfig().setGlobalJobParameters(parameters);

You can pass the timestamp through CLI parameters or simply get the system time in java code. With GlobalJobParameters, you can access the time in any operators through the context.

iluvex
  • 103
  • 1
  • 9