Examples of allocateSlot()


Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

      if (queued != null) {
        ScheduledUnit task = queued.getTask();
        ExecutionVertex vertex = task.getTaskToExecute().getVertex();
       
        try {
          AllocatedSlot newSlot = instance.allocateSlot(vertex.getJobId());
          if (newSlot != null) {
           
            // success, remove from the task queue and notify the future
            taskQueue.poll();
            if (queued.getFuture() != null) {
View Full Code Here

Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

       
      }).when(assignment).releaseSubSlot(any(SubSlot.class), any(SharedSlot.class));
     
      Instance instance = SchedulerTestUtils.getRandomInstance(1);
     
      SharedSlot slot = new SharedSlot(instance.allocateSlot(new JobID()), assignment);
      assertFalse(slot.isDisposed());
     
      SubSlot ss1 = slot.allocateSubSlot(new JobVertexID());
      assertNotNull(ss1);
     
View Full Code Here

Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

       
      }).when(assignment).releaseSubSlot(any(SubSlot.class), any(SharedSlot.class));
     
      Instance instance = SchedulerTestUtils.getRandomInstance(1);
     
      SharedSlot slot = new SharedSlot(instance.allocateSlot(new JobID()), assignment);
      assertFalse(slot.isDisposed());
     
      SubSlot ss1 = slot.allocateSubSlot(new JobVertexID());
      assertNotNull(ss1);
     
View Full Code Here

Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

          return new TaskOperationResult(tdd.getExecutionId(), true);
        }
      });
     
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(jobId);
     
      assertEquals(ExecutionState.CREATED, vertex.getExecutionState());
     
      vertex.deployToSlot(slot);
     
View Full Code Here

Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

     
      // mock taskmanager to simply accept the call
      TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
     
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(new JobID());
     
      final ExecutionJobVertex ejv = getJobVertexNotExecuting(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
     
View Full Code Here

Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(new JobID());
     
      final ExecutionJobVertex ejv = getJobVertexExecutingSynchronously(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
     
View Full Code Here

Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

      // mock taskmanager to simply accept the call
      TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
     
     
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(new JobID());
     
      final ExecutionJobVertex ejv = getJobVertexExecutingAsynchronously(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
      when(taskManager.submitTask(Matchers.any(TaskDeploymentDescriptor.class))).thenReturn(new TaskOperationResult(vertex.getCurrentExecutionAttempt().getAttemptId(), true));
View Full Code Here

Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(new JobID());
     
      final ExecutionJobVertex ejv = getJobVertexExecutingSynchronously(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
     
View Full Code Here

Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(new JobID());
     
      final ExecutionJobVertex ejv = getJobVertexExecutingAsynchronously(jid);
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
     
      when(taskManager.submitTask(Matchers.any(TaskDeploymentDescriptor.class))).thenReturn(new TaskOperationResult(vertex.getCurrentExecutionAttempt().getAttemptId(), false, ERROR_MESSAGE));
View Full Code Here

Examples of org.apache.flink.runtime.instance.Instance.allocateSlot()

     
      // mock taskmanager to simply accept the call
      TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
     
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(new JobID());
     
      final ExecutionJobVertex ejv = getJobVertexNotExecuting(jid);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.