Measurement of task execution time in the mode

Is there a way to measure the execution time of a job in Apache Flink when sending a job to go to the command line?

PS. I want the flink API to give me time, rather than measuring it in bash myself, noting the start and end time

+4
source share
1 answer

The method ExecutionEnvironment.execute()returns an object JobExecutionResultcontaining the runtime.

You can, for example, do something like this:

// execute program
JobExecutionResult result = env.execute("My Flink Job");
System.out.println("The job took " + result.getNetRuntime(TimeUnit.SECONDS) + " to execute");
+7
source

Source: https://habr.com/ru/post/1619642/


All Articles