Package org.apache.flink.runtime.jobgraph

Examples of org.apache.flink.runtime.jobgraph.JobGraph


    @SuppressWarnings("unchecked")
    final TypeComparatorFactory<?> comparator =
      new RecordComparatorFactory(new int[] { 0 }, new Class[] { LongValue.class }, new boolean[] { true });
    final TypePairComparatorFactory<?, ?> pairComparator = RecordPairComparatorFactory.get();

    JobGraph jobGraph = new JobGraph("Connected Components (Intermediate Workset Update, Solution Set Tail)");

    // input
    InputFormatVertex vertices = createVerticesInput(jobGraph, verticesPath, numSubTasks, serializer, comparator);
    InputFormatVertex edges = createEdgesInput(jobGraph, edgesPath, numSubTasks, serializer, comparator);
View Full Code Here


    @SuppressWarnings("unchecked")
    final TypeComparatorFactory<?> comparator =
      new RecordComparatorFactory(new int[] { 0 }, new Class[] { LongValue.class }, new boolean[] { true });
    final TypePairComparatorFactory<?, ?> pairComparator = RecordPairComparatorFactory.get();

    JobGraph jobGraph = new JobGraph("Connected Components (Intermediate Solution Set Update, Workset Tail)");

    // input
    InputFormatVertex vertices = createVerticesInput(jobGraph, verticesPath, numSubTasks, serializer, comparator);
    InputFormatVertex edges = createEdgesInput(jobGraph, edgesPath, numSubTasks, serializer, comparator);
View Full Code Here

    }

    private JobGraph createJobGraph(int dataVolumeGb, boolean useForwarder, boolean isSlowSender,
        boolean isSlowReceiver, int numSubtasks)
    {
      JobGraph jobGraph = new JobGraph("Speed Test");
      SlotSharingGroup sharingGroup = new SlotSharingGroup();

      AbstractJobVertex producer = new AbstractJobVertex("Speed Test Producer");
      jobGraph.addVertex(producer);
      producer.setSlotSharingGroup(sharingGroup);
     
      producer.setInvokableClass(SpeedTestProducer.class);
      producer.setParallelism(numSubtasks);
      producer.getConfiguration().setInteger(DATA_VOLUME_GB_CONFIG_KEY, dataVolumeGb);
      producer.getConfiguration().setBoolean(IS_SLOW_SENDER_CONFIG_KEY, isSlowSender);

      AbstractJobVertex forwarder = null;
      if (useForwarder) {
        forwarder = new AbstractJobVertex("Speed Test Forwarder");
        jobGraph.addVertex(forwarder);
        forwarder.setSlotSharingGroup(sharingGroup);
       
        forwarder.setInvokableClass(SpeedTestForwarder.class);
        forwarder.setParallelism(numSubtasks);
      }

      AbstractJobVertex consumer = new AbstractJobVertex("Speed Test Consumer");
      jobGraph.addVertex(consumer);
      consumer.setSlotSharingGroup(sharingGroup);
     
      consumer.setInvokableClass(SpeedTestConsumer.class);
      consumer.setParallelism(numSubtasks);
      consumer.getConfiguration().setBoolean(IS_SLOW_RECEIVER_CONFIG_KEY, isSlowReceiver);
View Full Code Here

    return getTestJobGraph(dataPath, resultPath, numSubTasks, maxIterations);
  }

  private JobGraph getTestJobGraph(String inputPath, String outputPath, int numSubTasks, int maxIterations) {

    final JobGraph jobGraph = new JobGraph("Iteration Tail with Chaining");

    final TypeSerializerFactory<Record> serializer = RecordSerializerFactory.get();

    @SuppressWarnings("unchecked")
    final TypeComparatorFactory<Record> comparator =
View Full Code Here

  }

  @Override
  public void execute() {
   
    JobGraph jobGraph = jobGraphBuilder.getJobGraph();
    executeRemotely(jobGraph);
  }
View Full Code Here

  }
 
  @Override
  public void execute(String jobName) {
   
    JobGraph jobGraph = jobGraphBuilder.getJobGraph(jobName);
    executeRemotely(jobGraph);
  }
View Full Code Here

   *
   * @param jobGraphName
   *            name of the jobGraph
   */
  public JobGraph getJobGraph(String jobGraphName) {
    jobGraph = new JobGraph(jobGraphName);
    buildJobGraph();
    return jobGraph;
  }
View Full Code Here

  }
   
  public void runAndCancelJob(Plan plan, int msecsTillCanceling, int maxTimeTillCanceled) throws Exception {
    try {
      // submit job
      final JobGraph jobGraph = getJobGraph(plan);

      final long startingTime = System.currentTimeMillis();
      long cancelTime = -1L;
      final JobClient client = this.executor.getJobClient(jobGraph);
      final JobSubmissionResult submissionResult = client.submitJob();
View Full Code Here

      sender.setParallelism(NUM_TASKS);
      receiver.setParallelism(NUM_TASKS);
     
      receiver.connectNewDataSetAsInput(sender, DistributionPattern.POINTWISE);
     
      final JobGraph jobGraph = new JobGraph("Pointwise Job", sender, receiver);
      jobGraph.setNumberOfExecutionRetries(1);
     
      jm = startJobManager(2 * NUM_TASKS);
     
      final GlobalBufferPool bp = ((LocalInstanceManager) jm.getInstanceManager())
          .getTaskManagers()[0].getChannelManager().getGlobalBufferPool();
     
      JobSubmissionResult result = jm.submitJob(jobGraph);

      if (result.getReturnCode() != AbstractJobResult.ReturnCode.SUCCESS) {
        System.out.println(result.getDescription());
      }
      assertEquals(AbstractJobResult.ReturnCode.SUCCESS, result.getReturnCode());
     
      // monitor the execution
      ExecutionGraph eg = jm.getCurrentJobs().get(jobGraph.getJobID());
     
      if (eg != null) {
        eg.waitForJobEnd();
        assertEquals(JobStatus.FINISHED, eg.getState());
      }
View Full Code Here

     
      SlotSharingGroup sharingGroup = new SlotSharingGroup();
      sender.setSlotSharingGroup(sharingGroup);
      receiver.setSlotSharingGroup(sharingGroup);
     
      final JobGraph jobGraph = new JobGraph("Pointwise Job", sender, receiver);
      jobGraph.setNumberOfExecutionRetries(1);
     
      jm = startJobManager(NUM_TASKS);
     
      final GlobalBufferPool bp = ((LocalInstanceManager) jm.getInstanceManager())
          .getTaskManagers()[0].getChannelManager().getGlobalBufferPool();
     
      JobSubmissionResult result = jm.submitJob(jobGraph);

      if (result.getReturnCode() != AbstractJobResult.ReturnCode.SUCCESS) {
        System.out.println(result.getDescription());
      }
      assertEquals(AbstractJobResult.ReturnCode.SUCCESS, result.getReturnCode());
     
      // monitor the execution
      ExecutionGraph eg = jm.getCurrentJobs().get(jobGraph.getJobID());
     
      if (eg != null) {
        eg.waitForJobEnd();
        assertEquals(JobStatus.FINISHED, eg.getState());
      }
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.jobgraph.JobGraph

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.