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


Java ChainedDriver类代码示例

本文整理汇总了Java中org.apache.flink.runtime.operators.chaining.ChainedDriver的典型用法代码示例。如果您正苦于以下问题:Java ChainedDriver类的具体用法?Java ChainedDriver怎么用?Java ChainedDriver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ChainedDriver类属于org.apache.flink.runtime.operators.chaining包,在下文中一共展示了ChainedDriver类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initOutputs

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
/**
 * Creates a writer for each output. Creates an OutputCollector which forwards its input to all writers.
 * The output collector applies the configured shipping strategies for each writer.
 */
protected void initOutputs() throws Exception {
	this.chainedTasks = new ArrayList<ChainedDriver<?, ?>>();
	this.eventualOutputs = new ArrayList<RecordWriter<?>>();

	ClassLoader userCodeClassLoader = getUserCodeClassLoader();

	this.accumulatorMap = getEnvironment().getAccumulatorRegistry().getUserMap();

	this.output = initOutputs(this, userCodeClassLoader, this.config, this.chainedTasks, this.eventualOutputs,
			this.getExecutionConfig(), this.accumulatorMap);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:16,代码来源:BatchTask.java

示例2: openChainedTasks

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
/**
 * Opens all chained tasks, in the order as they are stored in the array. The opening process
 * creates a standardized log info message.
 * 
 * @param tasks The tasks to be opened.
 * @param parent The parent task, used to obtain parameters to include in the log message.
 * @throws Exception Thrown, if the opening encounters an exception.
 */
public static void openChainedTasks(List<ChainedDriver<?, ?>> tasks, AbstractInvokable parent) throws Exception {
	// start all chained tasks
	for (int i = 0; i < tasks.size(); i++) {
		final ChainedDriver<?, ?> task = tasks.get(i);
		if (LOG.isDebugEnabled()) {
			LOG.debug(constructLogString("Start task code", task.getTaskName(), parent));
		}
		task.openTask();
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:19,代码来源:BatchTask.java

示例3: closeChainedTasks

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
/**
 * Closes all chained tasks, in the order as they are stored in the array. The closing process
 * creates a standardized log info message.
 * 
 * @param tasks The tasks to be closed.
 * @param parent The parent task, used to obtain parameters to include in the log message.
 * @throws Exception Thrown, if the closing encounters an exception.
 */
public static void closeChainedTasks(List<ChainedDriver<?, ?>> tasks, AbstractInvokable parent) throws Exception {
	for (int i = 0; i < tasks.size(); i++) {
		final ChainedDriver<?, ?> task = tasks.get(i);
		task.closeTask();
		
		if (LOG.isDebugEnabled()) {
			LOG.debug(constructLogString("Finished task code", task.getTaskName(), parent));
		}
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:19,代码来源:BatchTask.java

示例4: cancelChainedTasks

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
/**
 * Cancels all tasks via their {@link ChainedDriver#cancelTask()} method. Any occurring exception
 * and error is suppressed, such that the canceling method of every task is invoked in all cases.
 * 
 * @param tasks The tasks to be canceled.
 */
public static void cancelChainedTasks(List<ChainedDriver<?, ?>> tasks) {
	for (int i = 0; i < tasks.size(); i++) {
		try {
			tasks.get(i).cancelTask();
		} catch (Throwable t) {
			// do nothing
		}
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:16,代码来源:BatchTask.java

示例5: addChainedTask

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
public void addChainedTask(@SuppressWarnings("rawtypes") Class<? extends ChainedDriver> chainedTaskClass, TaskConfig conf, String taskName)
{
	int numChainedYet = this.config.getInteger(CHAINING_NUM_STUBS, 0);
	
	this.config.setString(CHAINING_TASK_PREFIX + numChainedYet, chainedTaskClass.getName());
	this.config.addAll(conf.config, CHAINING_TASKCONFIG_PREFIX + numChainedYet + SEPARATOR);
	this.config.setString(CHAINING_TASKNAME_PREFIX + numChainedYet, taskName);
	
	this.config.setInteger(CHAINING_NUM_STUBS, ++numChainedYet);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:11,代码来源:TaskConfig.java

示例6: getChainedTask

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
public Class<? extends ChainedDriver<?, ?>> getChainedTask(int chainPos) {
	final String className = this.config.getString(CHAINING_TASK_PREFIX + chainPos, null);
	if (className == null) {
		throw new IllegalStateException("Chained Task Class missing");
	}
	
	@SuppressWarnings("unchecked")
	final Class<ChainedDriver<?, ?>> clazz = (Class<ChainedDriver<?, ?>>) (Class<?>) ChainedDriver.class;
	try {
		return Class.forName(className).asSubclass(clazz);
	} catch (ClassNotFoundException e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:15,代码来源:TaskConfig.java

示例7: initOutputs

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
/**
 * Creates a writer for each output. Creates an OutputCollector which forwards its input to all writers.
 * The output collector applies the configured shipping strategy.
 */
private void initOutputs(ClassLoader cl) throws Exception {
	this.chainedTasks = new ArrayList<ChainedDriver<?, ?>>();
	this.eventualOutputs = new ArrayList<RecordWriter<?>>();

	this.output = BatchTask.initOutputs(this, cl, this.config, this.chainedTasks, this.eventualOutputs,
			getExecutionConfig(), getEnvironment().getAccumulatorRegistry().getUserMap());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:12,代码来源:DataSourceTask.java

示例8: TaskInChain

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
TaskInChain(PlanNode planNode, Class<? extends ChainedDriver<?, ?>> chainedTask,
			TaskConfig taskConfig, String taskName) {
	
	this.planNode = planNode;
	this.chainedTask = chainedTask;
	this.taskConfig = taskConfig;
	this.taskName = taskName;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:9,代码来源:JobGraphGenerator.java

示例9: initOutputs

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
/**
 * Creates a writer for each output. Creates an OutputCollector which forwards its input to all writers.
 * The output collector applies the configured shipping strategies for each writer.
 */
protected void initOutputs() throws Exception {
	this.chainedTasks = new ArrayList<ChainedDriver<?, ?>>();
	this.eventualOutputs = new ArrayList<BufferWriter>();

	ClassLoader userCodeClassLoader = getUserCodeClassLoader();

	this.output = initOutputs(this, userCodeClassLoader, this.config, this.chainedTasks, this.eventualOutputs);
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:13,代码来源:RegularPactTask.java

示例10: cancelChainedTasks

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
/**
 * Cancels all tasks via their {@link ChainedDriver#cancelTask()} method. Any occurring exception
 * and error is suppressed, such that the canceling method of every task is invoked in all cases.
 * 
 * @param tasks The tasks to be canceled.
 */
public static void cancelChainedTasks(List<ChainedDriver<?, ?>> tasks) {
	for (int i = 0; i < tasks.size(); i++) {
		try {
			tasks.get(i).cancelTask();
		} catch (Throwable t) {}
	}
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:14,代码来源:RegularPactTask.java

示例11: getChainedTask

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
public Class<? extends ChainedDriver<?, ?>> getChainedTask() {
	return this.chainedTask;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:4,代码来源:JobGraphGenerator.java

示例12: TaskInChain

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
TaskInChain(Class<? extends ChainedDriver<?, ?>> chainedTask, TaskConfig taskConfig,
			String taskName) {
	this.chainedTask = chainedTask;
	this.taskConfig = taskConfig;
	this.taskName = taskName;
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:7,代码来源:NepheleJobGraphGenerator.java

示例13: initOutputs

import org.apache.flink.runtime.operators.chaining.ChainedDriver; //导入依赖的package包/类
/**
 * Creates a writer for each output. Creates an OutputCollector which forwards its input to all writers.
 * The output collector applies the configured shipping strategy.
 */
private void initOutputs(ClassLoader cl) throws Exception {
	this.chainedTasks = new ArrayList<ChainedDriver<?, ?>>();
	this.eventualOutputs = new ArrayList<BufferWriter>();
	this.output = RegularPactTask.initOutputs(this, cl, this.config, this.chainedTasks, this.eventualOutputs);
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:10,代码来源:DataSourceTask.java


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