Package org.apache.flink.runtime.jobgraph

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


    // Check which of the registered jobs are assigned to that instance
    synchronized (this.registeredJobs) {

      Iterator<JobID> it = this.registeredJobs.keySet().iterator();
      while (it.hasNext()) {
        final JobID jobID = it.next();
        final JobProfilingData jobProfilingData = this.registeredJobs.get(jobID);
        if (!jobProfilingData.addIfInstanceIsAllocatedByJob(profilingData)) {
          continue;
        }
View Full Code Here


  }


  @Override
  public TaskOperationResult submitTask(TaskDeploymentDescriptor tdd) {
    final JobID jobID = tdd.getJobID();
    final JobVertexID vertexId = tdd.getVertexID();
    final ExecutionAttemptID executionId = tdd.getExecutionId();
    final int taskIndex = tdd.getIndexInSubtaskGroup();
    final int numSubtasks = tdd.getCurrentNumberOfSubtasks();
   
View Full Code Here

  /**
   * Creates an empty task execution state.
   */
  public TaskExecutionState() {
    this.jobID = new JobID();
    this.executionId = new ExecutionAttemptID();
  }
View Full Code Here

  private void cleanup(JobID jobId) {
    if (!lru.contains(jobId)) {
      lru.addFirst(jobId);
    }
    if (lru.size() > this.max_entries) {
      JobID toRemove = lru.removeLast();
      collectedEvents.remove(toRemove);
      oldJobs.remove(toRemove);
      graphs.remove(toRemove);
    }
  }
View Full Code Here

  private static class MockInputGate extends InputGate<Record> {
   
    private MutableObjectIterator<Record> it;

    public MockInputGate(int id, MutableObjectIterator<Record> it) {
      super(new JobID(), new GateID(), id);
      this.it = it;
    }
View Full Code Here

    private RecordDeserializer<Record> deserializer;

    private Record record;

    public MockOutputGate(int index, List<Record> outList) {
      super(new JobID(), new GateID(), index);
      this.out = outList;
      this.deserializer = new AdaptiveSpanningRecordDeserializer<Record>();
      this.record = new Record();
    }
View Full Code Here

    HardwareDescription hardwareDescription = new HardwareDescription(4, 2L*1024*1024*1024, 1024*1024*1024, 512*1024*1024);
    InetAddress address = InetAddress.getByName("127.0.0.1");
    InstanceConnectionInfo connection = new InstanceConnectionInfo(address, 10000, 10001);
   
    Instance instance = new Instance(connection, new InstanceID(), hardwareDescription, 1);
    return instance.allocateSlot(new JobID());
  }
View Full Code Here

     
      assertEquals(4, instance.getTotalNumberOfSlots());
      assertEquals(4, instance.getNumberOfAvailableSlots());
      assertEquals(0, instance.getNumberOfAllocatedSlots());
     
      AllocatedSlot slot1 = instance.allocateSlot(new JobID());
      AllocatedSlot slot2 = instance.allocateSlot(new JobID());
      AllocatedSlot slot3 = instance.allocateSlot(new JobID());
      AllocatedSlot slot4 = instance.allocateSlot(new JobID());
     
      assertNotNull(slot1);
      assertNotNull(slot2);
      assertNotNull(slot3);
      assertNotNull(slot4);
     
      assertEquals(0, instance.getNumberOfAvailableSlots());
      assertEquals(4, instance.getNumberOfAllocatedSlots());
      assertEquals(6, slot1.getSlotNumber() + slot2.getSlotNumber() +
          slot3.getSlotNumber() + slot4.getSlotNumber());
     
      // no more slots
      assertNull(instance.allocateSlot(new JobID()));
      try {
        instance.returnAllocatedSlot(slot2);
        fail("instance accepted a non-cancelled slot.");
      } catch (IllegalArgumentException e) {
        // good
View Full Code Here

     
      Instance instance = new Instance(connection, new InstanceID(), hardwareDescription, 3);
     
      assertEquals(3, instance.getNumberOfAvailableSlots());
     
      AllocatedSlot slot1 = instance.allocateSlot(new JobID());
      AllocatedSlot slot2 = instance.allocateSlot(new JobID());
      AllocatedSlot slot3 = instance.allocateSlot(new JobID());
     
      instance.markDead();
     
      assertEquals(0, instance.getNumberOfAllocatedSlots());
      assertEquals(0, instance.getNumberOfAvailableSlots());
View Full Code Here

     
      Instance instance = new Instance(connection, new InstanceID(), hardwareDescription, 3);
     
      assertEquals(3, instance.getNumberOfAvailableSlots());
     
      AllocatedSlot slot1 = instance.allocateSlot(new JobID());
      AllocatedSlot slot2 = instance.allocateSlot(new JobID());
      AllocatedSlot slot3 = instance.allocateSlot(new JobID());
     
      instance.cancelAndReleaseAllSlots();
     
      assertEquals(3, instance.getNumberOfAvailableSlots());
     
View Full Code Here

TOP

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

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.