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


Java TaskConfig.setStubParameters方法代碼示例

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


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

示例1: createDualInputVertex

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private JobVertex createDualInputVertex(DualInputPlanNode node) throws CompilerException {
    final String taskName = node.getNodeName();
    final DriverStrategy ds = node.getDriverStrategy();
    final JobVertex vertex = new JobVertex(taskName);
    final TaskConfig config = new TaskConfig(vertex.getConfiguration());
    vertex.setResources(node.getMinResources(), node.getPreferredResources());
    vertex.setInvokableClass( (this.currentIteration != null && node.isOnDynamicPath()) ? IterationIntermediateTask.class : BatchTask.class);
    
    // set user code
    config.setStubWrapper(node.getProgramOperator().getUserCodeWrapper());
    config.setStubParameters(node.getProgramOperator().getParameters());
    
    // set the driver strategy
    config.setDriver(ds.getDriverClass());
    config.setDriverStrategy(ds);
    if (node.getComparator1() != null) {
        config.setDriverComparator(node.getComparator1(), 0);
    }
    if (node.getComparator2() != null) {
        config.setDriverComparator(node.getComparator2(), 1);
    }
    if (node.getPairComparator() != null) {
        config.setDriverPairComparator(node.getPairComparator());
    }
    
    // assign memory, file-handles, etc.
    assignDriverResources(node, config);
    return vertex;
}
 
開發者ID:axbaretto,項目名稱:flink,代碼行數:30,代碼來源:JobGraphGenerator.java

示例2: createDataSourceVertex

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private InputFormatVertex createDataSourceVertex(SourcePlanNode node) throws CompilerException {
    final InputFormatVertex vertex = new InputFormatVertex(node.getNodeName());
    final TaskConfig config = new TaskConfig(vertex.getConfiguration());

    vertex.setResources(node.getMinResources(), node.getPreferredResources());
    vertex.setInvokableClass(DataSourceTask.class);
    vertex.setFormatDescription(getDescriptionForUserCode(node.getProgramOperator().getUserCodeWrapper()));

    // set user code
    config.setStubWrapper(node.getProgramOperator().getUserCodeWrapper());
    config.setStubParameters(node.getProgramOperator().getParameters());

    config.setOutputSerializer(node.getSerializer());
    return vertex;
}
 
開發者ID:axbaretto,項目名稱:flink,代碼行數:16,代碼來源:JobGraphGenerator.java

示例3: createDataSinkVertex

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private JobVertex createDataSinkVertex(SinkPlanNode node) throws CompilerException {
    final OutputFormatVertex vertex = new OutputFormatVertex(node.getNodeName());
    final TaskConfig config = new TaskConfig(vertex.getConfiguration());

    vertex.setResources(node.getMinResources(), node.getPreferredResources());
    vertex.setInvokableClass(DataSinkTask.class);
    vertex.setFormatDescription(getDescriptionForUserCode(node.getProgramOperator().getUserCodeWrapper()));
    
    // set user code
    config.setStubWrapper(node.getProgramOperator().getUserCodeWrapper());
    config.setStubParameters(node.getProgramOperator().getParameters());

    return vertex;
}
 
開發者ID:axbaretto,項目名稱:flink,代碼行數:15,代碼來源:JobGraphGenerator.java

示例4: createDualInputVertex

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private AbstractJobVertex createDualInputVertex(DualInputPlanNode node) throws CompilerException {
    final String taskName = node.getNodeName();
    final DriverStrategy ds = node.getDriverStrategy();
    final AbstractJobVertex vertex = new AbstractJobVertex(taskName);
    final TaskConfig config = new TaskConfig(vertex.getConfiguration());
    vertex.setInvokableClass( (this.currentIteration != null && node.isOnDynamicPath()) ? IterationIntermediatePactTask.class : RegularPactTask.class);
    
    // set user code
    config.setStubWrapper(node.getPactContract().getUserCodeWrapper());
    config.setStubParameters(node.getPactContract().getParameters());
    
    // set the driver strategy
    config.setDriver(ds.getDriverClass());
    config.setDriverStrategy(ds);
    if (node.getComparator1() != null) {
        config.setDriverComparator(node.getComparator1(), 0);
    }
    if (node.getComparator2() != null) {
        config.setDriverComparator(node.getComparator2(), 1);
    }
    if (node.getPairComparator() != null) {
        config.setDriverPairComparator(node.getPairComparator());
    }
    
    // assign memory, file-handles, etc.
    assignDriverResources(node, config);
    return vertex;
}
 
開發者ID:citlab,項目名稱:vs.msc.ws14,代碼行數:29,代碼來源:NepheleJobGraphGenerator.java

示例5: createDataSourceVertex

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private InputFormatVertex createDataSourceVertex(SourcePlanNode node) throws CompilerException {
    final InputFormatVertex vertex = new InputFormatVertex(node.getNodeName());
    final TaskConfig config = new TaskConfig(vertex.getConfiguration());

    vertex.setInvokableClass(DataSourceTask.class);

    // set user code
    config.setStubWrapper(node.getPactContract().getUserCodeWrapper());
    config.setStubParameters(node.getPactContract().getParameters());

    config.setOutputSerializer(node.getSerializer());
    return vertex;
}
 
開發者ID:citlab,項目名稱:vs.msc.ws14,代碼行數:14,代碼來源:NepheleJobGraphGenerator.java

示例6: createDataSinkVertex

import org.apache.flink.runtime.operators.util.TaskConfig; //導入方法依賴的package包/類
private AbstractJobVertex createDataSinkVertex(SinkPlanNode node) throws CompilerException {
    final OutputFormatVertex vertex = new OutputFormatVertex(node.getNodeName());
    final TaskConfig config = new TaskConfig(vertex.getConfiguration());

    vertex.setInvokableClass(DataSinkTask.class);
    vertex.getConfiguration().setInteger(DataSinkTask.DEGREE_OF_PARALLELISM_KEY, node.getDegreeOfParallelism());

    // set user code
    config.setStubWrapper(node.getPactContract().getUserCodeWrapper());
    config.setStubParameters(node.getPactContract().getParameters());

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


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