当前位置: 首页>>代码示例>>Java>>正文


Java JobGraph.setClasspaths方法代码示例

本文整理汇总了Java中org.apache.flink.runtime.jobgraph.JobGraph.setClasspaths方法的典型用法代码示例。如果您正苦于以下问题:Java JobGraph.setClasspaths方法的具体用法?Java JobGraph.setClasspaths怎么用?Java JobGraph.setClasspaths使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.flink.runtime.jobgraph.JobGraph的用法示例。


在下文中一共展示了JobGraph.setClasspaths方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getJobGraph

import org.apache.flink.runtime.jobgraph.JobGraph; //导入方法依赖的package包/类
private JobGraph getJobGraph(FlinkPlan optPlan, List<URL> jarFiles, List<URL> classpaths, SavepointRestoreSettings savepointSettings) {
	JobGraph job;
	if (optPlan instanceof StreamingPlan) {
		job = ((StreamingPlan) optPlan).getJobGraph();
		job.setSavepointRestoreSettings(savepointSettings);
	} else {
		JobGraphGenerator gen = new JobGraphGenerator(this.flinkConfig);
		job = gen.compileJobGraph((OptimizedPlan) optPlan);
	}

	for (URL jar : jarFiles) {
		try {
			job.addJar(new Path(jar.toURI()));
		} catch (URISyntaxException e) {
			throw new RuntimeException("URL is invalid. This should not happen.", e);
		}
	}

	job.setClasspaths(classpaths);

	return job;
}
 
开发者ID:datafibers-community,项目名称:df_data_service,代码行数:23,代码来源:DFCusterClient.java

示例2: execute

import org.apache.flink.runtime.jobgraph.JobGraph; //导入方法依赖的package包/类
@Override
public JobExecutionResult execute(String jobName) throws Exception {
	OptimizedPlan op = compileProgram(jobName);

	JobGraphGenerator jgg = new JobGraphGenerator();
	JobGraph jobGraph = jgg.compileJobGraph(op);

	for (Path jarFile: jarFiles) {
		jobGraph.addJar(jarFile);
	}

	jobGraph.setClasspaths(new ArrayList<>(classPaths));

	this.lastJobExecutionResult = jobExecutor.executeJobBlocking(jobGraph);
	return this.lastJobExecutionResult;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:17,代码来源:TestEnvironment.java

示例3: execute

import org.apache.flink.runtime.jobgraph.JobGraph; //导入方法依赖的package包/类
@Override
public JobExecutionResult execute(String jobName) throws Exception {
	final StreamGraph streamGraph = getStreamGraph();
	streamGraph.setJobName(jobName);
	final JobGraph jobGraph = streamGraph.getJobGraph();

	for (Path jarFile: jarFiles) {
		jobGraph.addJar(jarFile);
	}

	jobGraph.setClasspaths(new ArrayList<>(classPaths));

	return jobExecutor.executeJobBlocking(jobGraph);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:15,代码来源:TestStreamEnvironment.java


注:本文中的org.apache.flink.runtime.jobgraph.JobGraph.setClasspaths方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。