Measure job execution time in flink

和自甴很熟 提交于 2019-12-10 13:15:54

问题


Is there any way to measure job execution time in Apache Flink when submitting the job to flink using command line?

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


回答1:


The ExecutionEnvironment.execute() method returns a JobExecutionResult object containing the job runtime.

You could 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");


来源:https://stackoverflow.com/questions/34243365/measure-job-execution-time-in-flink

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!