Examples of AllocatedSlot


Examples of org.apache.flink.runtime.instance.AllocatedSlot

     
      // 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.AllocatedSlot

      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.AllocatedSlot

      // 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.AllocatedSlot

      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.AllocatedSlot

      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.AllocatedSlot

     
      // 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.AllocatedSlot

     
      // 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 = getJobVertexExecutingTriggered(jid, queue);
     
      final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
      final ExecutionAttemptID eid = vertex.getCurrentExecutionAttempt().getAttemptId();
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot

            }
          }
        });
      }
      else {
        AllocatedSlot slot = scheduler.scheduleImmediately(toSchedule);
        try {
          deployToSlot(slot);
        }
        catch (Throwable t) {
          try {
            slot.releaseSlot();
          } finally {
            markFailed(t);
          }
        }
      }
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot

      return false;
    }
  }
 
  private void sendCancelRpcCall() {
    final AllocatedSlot slot = this.assignedResource;
    if (slot == null) {
      return;
    }
   
    Runnable cancelAction = new Runnable() {
     
      @Override
      public void run() {
        Throwable exception = null;
       
        for (int triesLeft = NUM_CANCEL_CALL_TRIES; triesLeft > 0; --triesLeft) {
         
          try {
            // send the call. it may be that the task is not really there (asynchronous / overtaking messages)
            // in which case it is fine (the deployer catches it)
            TaskOperationResult result = slot.getInstance().getTaskManagerProxy().cancelTask(attemptId);
           
            if (!result.isSuccess()) {
              // the task was not found, which may be when the task concurrently finishes or fails, or
              // when the cancel call overtakes the deployment call
              if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.flink.runtime.instance.AllocatedSlot

   
    for (int i = 0; i < inputEdges.length; i++) {
      ExecutionEdge[] sources = inputEdges[i];
      if (sources != null) {
        for (int k = 0; k < sources.length; k++) {
          AllocatedSlot sourceSlot = sources[k].getSource().getProducer().getCurrentAssignedResource();
          if (sourceSlot != null) {
            locations.add(sourceSlot.getInstance());
            if (locations.size() > MAX_DISTINCT_LOCATIONS_TO_CONSIDER) {
              return null;
            }
          }
        }
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.