Package org.apache.flink.configuration

Examples of org.apache.flink.configuration.Configuration


   *        the job graph to run
   * @throws IOException
   *         thrown on error while initializing the RPC connection to the job manager
   */
  public JobClient(JobGraph jobGraph, ClassLoader userCodeClassLoader) throws IOException {
    this(jobGraph, new Configuration(), userCodeClassLoader);
  }
View Full Code Here


    headConfig.setOutputSerializer(vertexWithRankAndDanglingSerializer);
    headConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
    headConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
   
    // final output
    TaskConfig headFinalOutConfig = new TaskConfig(new Configuration());
    headFinalOutConfig.setOutputSerializer(vertexWithRankAndDanglingSerializer);
    headFinalOutConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
    headConfig.setIterationHeadFinalOutputConfig(headFinalOutConfig);
   
    // the sync
View Full Code Here

   
    DataSet<Tuple3<Long, Long, Long>> smallInput = env.readCsvFile("file://smallFile").types(Long.class, Long.class, Long.class).name("smallFile");
   
    IterativeDataSet<Tuple3<Long, Long, Long>> iteration = bigInput.iterate(10);
   
    Configuration joinStrategy = new Configuration();
    joinStrategy.setString(PactCompiler.HINT_SHIP_STRATEGY, PactCompiler.HINT_SHIP_STRATEGY_REPARTITION_HASH);
   
    if(strategy != "") {
      joinStrategy.setString(PactCompiler.HINT_LOCAL_STRATEGY, strategy);
    }
   
    DataSet<Tuple3<Long, Long, Long>> inner = iteration.join(smallInput).where(0).equalTo(0).with(new DummyJoiner()).name("DummyJoiner").withParameters(joinStrategy);

    DataSet<Tuple3<Long, Long, Long>> output = iteration.closeWith(inner);
View Full Code Here

    @SuppressWarnings("unchecked")
    DataSet<Tuple3<Long, Long, Long>> smallInput = env.fromElements(new Tuple3<Long, Long, Long>(1L, 2L, 3L)).name("Small");
   
    IterativeDataSet<Tuple3<Long, Long, Long>> iteration = bigInput.iterate(10);
   
    Configuration joinStrategy = new Configuration();
    joinStrategy.setString(PactCompiler.HINT_LOCAL_STRATEGY, strategy);
   
    DataSet<Tuple3<Long, Long, Long>> inner = smallInput.join(iteration).where(0).equalTo(0).with(new DummyJoiner()).name("DummyJoiner").withParameters(joinStrategy);

    DataSet<Tuple3<Long, Long, Long>> output = iteration.closeWith(inner);
   
View Full Code Here

    headConfig.setOutputSerializer(recSerializer);
    headConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
    headConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
   
    // final output
    TaskConfig headFinalOutConfig = new TaskConfig(new Configuration());
    headFinalOutConfig.setOutputSerializer(recSerializer);
    headFinalOutConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
    headConfig.setIterationHeadFinalOutputConfig(headFinalOutConfig);
   
    // the sync
View Full Code Here

    headConfig.setOutputSerializer(vertexWithRankAndDanglingSerializer);
    headConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
    headConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
   
    // final output
    TaskConfig headFinalOutConfig = new TaskConfig(new Configuration());
    headFinalOutConfig.setOutputSerializer(vertexWithRankAndDanglingSerializer);
    headFinalOutConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
    headConfig.setIterationHeadFinalOutputConfig(headFinalOutConfig);
   
    // the sync
    headConfig.setIterationHeadIndexOfSyncOutput(3);
    headConfig.setNumberOfIterations(numIterations);
   
    // the driver
    headConfig.setDriver(CollectorMapDriver.class);
    headConfig.setDriverStrategy(DriverStrategy.COLLECTOR_MAP);
    headConfig.setStubWrapper(new UserCodeClassWrapper<CustomCompensatingMap>(CustomCompensatingMap.class));
    headConfig.setStubParameter("pageRank.numVertices", String.valueOf(numVertices));
    headConfig.setStubParameter("compensation.failingWorker", failingWorkers);
    headConfig.setStubParameter("compensation.failingIteration", String.valueOf(failingIteration));
    headConfig.setStubParameter("compensation.messageLoss", String.valueOf(messageLoss));
    headConfig.addIterationAggregator(CustomCompensatableDotProductCoGroup.AGGREGATOR_NAME, new PageRankStatsAggregator());

    // --------------- the join ---------------------
   
    AbstractJobVertex intermediate = JobGraphUtils.createTask(IterationIntermediatePactTask.class,
      "IterationIntermediate", jobGraph, degreeOfParallelism);
    TaskConfig intermediateConfig = new TaskConfig(intermediate.getConfiguration());
    intermediateConfig.setIterationId(ITERATION_ID);
//    intermediateConfig.setDriver(RepeatableHashjoinMatchDriverWithCachedBuildside.class);
    intermediateConfig.setDriver(BuildSecondCachedMatchDriver.class);
    intermediateConfig.setDriverStrategy(DriverStrategy.HYBRIDHASH_BUILD_SECOND);
    intermediateConfig.setRelativeMemoryDriver((double)matchMemory/totalMemoryConsumption);
    intermediateConfig.addInputToGroup(0);
    intermediateConfig.addInputToGroup(1);
    intermediateConfig.setInputSerializer(vertexWithRankAndDanglingSerializer, 0);
    intermediateConfig.setInputSerializer(vertexWithAdjacencyListSerializer, 1);
    intermediateConfig.setDriverComparator(vertexWithRankAndDanglingComparator, 0);
    intermediateConfig.setDriverComparator(vertexWithAdjacencyListComparator, 1);
    intermediateConfig.setDriverPairComparator(matchComparator);
   
    intermediateConfig.setOutputSerializer(vertexWithRankSerializer);
    intermediateConfig.addOutputShipStrategy(ShipStrategyType.FORWARD);
   
    intermediateConfig.setStubWrapper(new UserCodeClassWrapper<CustomCompensatableDotProductMatch>(CustomCompensatableDotProductMatch.class));
    intermediateConfig.setStubParameter("pageRank.numVertices", String.valueOf(numVertices));
    intermediateConfig.setStubParameter("compensation.failingWorker", failingWorkers);
    intermediateConfig.setStubParameter("compensation.failingIteration", String.valueOf(failingIteration));
    intermediateConfig.setStubParameter("compensation.messageLoss", String.valueOf(messageLoss));
   
    // the combiner and the output
    TaskConfig combinerConfig = new TaskConfig(new Configuration());
    combinerConfig.addInputToGroup(0);
    combinerConfig.setInputSerializer(vertexWithRankSerializer, 0);
    combinerConfig.setDriverStrategy(DriverStrategy.SORTED_GROUP_COMBINE);
    combinerConfig.setDriverComparator(vertexWithRankComparator, 0);
    combinerConfig.setDriverComparator(vertexWithRankComparator, 1);
View Full Code Here

    iteration.setNextWorkset(vertexUpdater);
    iteration.setSolutionSetDelta(vertexUpdater);
   
    // parameterize the data flow
    try {
      Configuration vertexUdfParams = vertexUpdater.getParameters();
      InstantiationUtil.writeObjectToConfig(uf, vertexUdfParams, VertexUpdateDriver.UDF_PARAM);
      vertexUdfParams.setClass(VertexUpdateDriver.KEY_PARAM, vertexKey);
      vertexUdfParams.setClass(VertexUpdateDriver.VALUE_PARAM, vertexValue);
      vertexUdfParams.setClass(VertexUpdateDriver.MESSAGE_PARAM, messageType);
     
      Configuration messageUdfParams = messager.getParameters();
      InstantiationUtil.writeObjectToConfig(mf, messageUdfParams, MessagingDriver.UDF_PARAM);
      messageUdfParams.setClass(MessagingDriver.KEY_PARAM, vertexKey);
      messageUdfParams.setClass(MessagingDriver.VALUE_PARAM, vertexValue);
      messageUdfParams.setClass(MessagingDriver.MESSAGE_PARAM, messageType);
      messageUdfParams.setClass(MessagingDriver.EDGE_PARAM, edgeValue);
    }
    catch (IOException e) {
      throw new RuntimeException("Could not serialize the UDFs for distribution" +
          (e.getMessage() == null ? '.' : ": " + e.getMessage()), e);
    }
View Full Code Here

    if (op instanceof UdfOperator<?> ) {
      @SuppressWarnings("unchecked")
      SingleInputUdfOperator<I, O, ?> udfOp = (SingleInputUdfOperator<I, O, ?>) op;
     
      // set configuration parameters
      Configuration opParams = udfOp.getParameters();
      if (opParams != null) {
        dataFlowOp.getParameters().addAll(opParams);
      }
     
      // set the semantic properties
View Full Code Here

    if (op instanceof UdfOperator<?> ) {
      @SuppressWarnings("unchecked")
      TwoInputUdfOperator<I1, I2, O, ?> udfOp = (TwoInputUdfOperator<I1, I2, O, ?>) op;
     
      // set configuration parameters
      Configuration opParams = udfOp.getParameters();
      if (opParams != null) {
        dataFlowOp.getParameters().addAll(opParams);
      }
     
      // set the semantic properties
View Full Code Here

    final AbstractJobVertex vertex;
    final TaskConfig config;
   
    if (chaining) {
      vertex = null;
      config = new TaskConfig(new Configuration());
      this.chainedTasks.put(node, new TaskInChain(ds.getPushChainDriverClass(), config, taskName));
    } else {
      // create task vertex
      vertex = new AbstractJobVertex(taskName);
      vertex.setInvokableClass((this.currentIteration != null && node.isOnDynamicPath()) ? IterationIntermediatePactTask.class : RegularPactTask.class);
View Full Code Here

TOP

Related Classes of org.apache.flink.configuration.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.