當前位置: 首頁>>代碼示例>>Java>>正文


Java TaskConfig.setFilehandlesInput方法代碼示例

本文整理匯總了Java中org.apache.flink.runtime.operators.util.TaskConfig.setFilehandlesInput方法的典型用法代碼示例。如果您正苦於以下問題:Java TaskConfig.setFilehandlesInput方法的具體用法?Java TaskConfig.setFilehandlesInput怎麽用?Java TaskConfig.setFilehandlesInput使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.flink.runtime.operators.util.TaskConfig的用法示例。


在下文中一共展示了TaskConfig.setFilehandlesInput方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: assignLocalStrategyResources

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private void assignLocalStrategyResources(Channel c, TaskConfig config, int inputNum) {
	if (c.getRelativeMemoryLocalStrategy() > 0) {
		config.setRelativeMemoryInput(inputNum, c.getRelativeMemoryLocalStrategy());
		config.setFilehandlesInput(inputNum, this.defaultMaxFan);
		config.setSpillingThresholdInput(inputNum, this.defaultSortSpillingThreshold);
		config.setUseLargeRecordHandler(this.useLargeRecordHandler);
	}
}
 
開發者ID:axbaretto,項目名稱:flink,代碼行數:9,代碼來源:JobGraphGenerator.java

示例2: assignLocalStrategyResources

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private void assignLocalStrategyResources(Channel c, TaskConfig config, int inputNum) {
	if (c.getRelativeMemoryLocalStrategy() > 0) {
		config.setRelativeMemoryInput(inputNum, c.getRelativeMemoryLocalStrategy());
		config.setFilehandlesInput(inputNum, this.defaultMaxFan);
		config.setSpillingThresholdInput(inputNum, this.defaultSortSpillingThreshold);
	}
}
 
開發者ID:citlab,項目名稱:vs.msc.ws14,代碼行數:8,代碼來源:NepheleJobGraphGenerator.java

示例3: createIterationIntermediate

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private static AbstractJobVertex createIterationIntermediate(JobGraph jobGraph, int numSubTasks,
		TypeSerializerFactory<?> serializer, TypeComparatorFactory<?> comparator)
{
	// --------------- the intermediate (reduce to min id) ---------------
	AbstractJobVertex intermediate = JobGraphUtils.createTask(IterationIntermediatePactTask.class,
		"Find Min Component-ID", jobGraph, numSubTasks);
	TaskConfig intermediateConfig = new TaskConfig(intermediate.getConfiguration());
	{
		intermediateConfig.setIterationId(ITERATION_ID);

		intermediateConfig.addInputToGroup(0);
		intermediateConfig.setInputSerializer(serializer, 0);
		intermediateConfig.setInputComparator(comparator, 0);
		intermediateConfig.setInputLocalStrategy(0, LocalStrategy.SORT);
		intermediateConfig.setRelativeMemoryInput(0, MEM_FRAC_PER_CONSUMER);
		intermediateConfig.setFilehandlesInput(0, 64);
		intermediateConfig.setSpillingThresholdInput(0, 0.85f);

		intermediateConfig.setOutputSerializer(serializer);
		intermediateConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);

		intermediateConfig.setDriver(GroupReduceDriver.class);
		intermediateConfig.setDriverStrategy(DriverStrategy.SORTED_GROUP_REDUCE);
		intermediateConfig.setDriverComparator(comparator, 0);
		intermediateConfig.setStubWrapper(
			new UserCodeObjectWrapper<WrappingReduceFunction>(new WrappingClassReduceFunction(MinimumComponentIDReduce.class)));
	}

	return intermediate;
}
 
開發者ID:citlab,項目名稱:vs.msc.ws14,代碼行數:31,代碼來源:ConnectedComponentsNepheleITCase.java

示例4: createReducer

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private static AbstractJobVertex createReducer(JobGraph jobGraph, int numSubTasks, TypeSerializerFactory<?> inputSerializer,
		TypeComparatorFactory<?> inputComparator, TypeSerializerFactory<?> outputSerializer)
{
	// ---------------- the tail (reduce) --------------------
	
	AbstractJobVertex tail = JobGraphUtils.createTask(IterationTailPactTask.class, "Reduce / Iteration Tail", jobGraph,
		numSubTasks);
	
	TaskConfig tailConfig = new TaskConfig(tail.getConfiguration());
	tailConfig.setIterationId(ITERATION_ID);
	tailConfig.setIsWorksetUpdate();
	
	// inputs and driver
	tailConfig.setDriver(GroupReduceDriver.class);
	tailConfig.setDriverStrategy(DriverStrategy.SORTED_GROUP_REDUCE);
	tailConfig.addInputToGroup(0);
	tailConfig.setInputSerializer(inputSerializer, 0);		
	tailConfig.setDriverComparator(inputComparator, 0);

	tailConfig.setInputLocalStrategy(0, LocalStrategy.SORT);
	tailConfig.setInputComparator(inputComparator, 0);
	tailConfig.setRelativeMemoryInput(0, MEMORY_FRACTION_PER_CONSUMER);
	tailConfig.setFilehandlesInput(0, 128);
	tailConfig.setSpillingThresholdInput(0, 0.9f);
	
	// output
	tailConfig.setOutputSerializer(outputSerializer);
	
	// the udf
	tailConfig.setStubWrapper(new UserCodeObjectWrapper<WrappingReduceFunction>(new WrappingReduceFunction(new RecomputeClusterCenter())));
	
	return tail;
}
 
開發者ID:citlab,項目名稱:vs.msc.ws14,代碼行數:34,代碼來源:KMeansIterativeNepheleITCase.java


注:本文中的org.apache.flink.runtime.operators.util.TaskConfig.setFilehandlesInput方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。