Package org.apache.flink.runtime.executiongraph

Examples of org.apache.flink.runtime.executiongraph.Execution


  }
 
  @Test
  public void testSetExecutionVertex() {
    try {
      Execution ev = mock(Execution.class);
      Execution ev_2 = mock(Execution.class);
     
      // assign to alive slot
      {
        AllocatedSlot slot = getSlot();
       
View Full Code Here


  }
 
  @Test
  public void testReleaseCancelsVertex() {
    try {
      Execution ev = mock(Execution.class);
     
      AllocatedSlot slot = getSlot();
      assertTrue(slot.setExecutedVertex(ev));
      assertEquals(ev, slot.getExecutedVertex());
     
View Full Code Here

  public static Execution getDummyTask() {
    ExecutionVertex vertex = mock(ExecutionVertex.class);
    when(vertex.getJobId()).thenReturn(new JobID());
    when(vertex.toString()).thenReturn("TEST-VERTEX");
   
    Execution execution = mock(Execution.class);
    when(execution.getVertex()).thenReturn(vertex);
   
    return execution;
  }
View Full Code Here

   
    when(vertex.getPreferredLocations()).thenReturn(preferredLocations);
    when(vertex.getJobId()).thenReturn(new JobID());
    when(vertex.toString()).thenReturn("TEST-VERTEX");
   
    Execution execution = mock(Execution.class);
    when(execution.getVertex()).thenReturn(vertex);
   
    return execution;
  }
View Full Code Here

    when(vertex.getParallelSubtaskIndex()).thenReturn(taskIndex);
    when(vertex.getTotalNumberOfParallelSubtasks()).thenReturn(numTasks);
    when(vertex.toString()).thenReturn("TEST-VERTEX");
    when(vertex.getSimpleName()).thenReturn("TEST-VERTEX");
   
    Execution execution = mock(Execution.class);
    when(execution.getVertex()).thenReturn(vertex);
   
    return execution;
  }
View Full Code Here

    when(vertex.getJobvertexId()).thenReturn(jid);
    when(vertex.getParallelSubtaskIndex()).thenReturn(taskIndex);
    when(vertex.getTotalNumberOfParallelSubtasks()).thenReturn(numTasks);
    when(vertex.toString()).thenReturn("TEST-VERTEX");
   
    Execution execution = mock(Execution.class);
    when(execution.getVertex()).thenReturn(vertex);
   
    return execution;
  }
View Full Code Here

 
 
  public void cancel() {
    if (STATUS_UPDATER.compareAndSet(this, ALLOCATED_AND_ALIVE, CANCELLED)) {
      // kill all tasks currently running in this slot
      Execution exec = this.executedTask;
      if (exec != null && !exec.isFinished()) {
        exec.fail(new Exception("The slot in which the task was scheduled has been killed (probably loss of TaskManager)."));
      }
    }
  }
View Full Code Here

      return null;
    }
   
    // get hostname for input split assignment
    String host = null;
    Execution execution = graph.getRegisteredExecutions().get(executionAttempt);
    if(execution == null) {
      LOG.error("Can not find Execution for attempt " + executionAttempt);
    } else {
      AllocatedSlot slot = execution.getAssignedResource();
      if(slot != null) {
        host = slot.getInstance().getInstanceConnectionInfo().getHostname();
      }
    }
   
View Full Code Here

      boolean first = true;
      for (ExecutionJobVertex groupVertex : graph.getAllVertices().values()) {
       
        for (ExecutionVertex vertex : groupVertex.getTaskVertices()) {
         
          Execution exec = vertex.getCurrentExecutionAttempt();
         
          if(first) {
            first = false;
          } else {
            wrt.write(","); }
         
          wrt.write("\""+exec.getAttemptId() +"\": {");
          wrt.write("\"vertexid\": \"" + exec.getAttemptId() + "\",");
          wrt.write("\"vertexname\": \"" + vertex + "\",");
          wrt.write("\"CREATED\": "+ vertex.getStateTimestamp(ExecutionState.CREATED) + ",");
          wrt.write("\"SCHEDULED\": "+ vertex.getStateTimestamp(ExecutionState.SCHEDULED) + ",");
          wrt.write("\"DEPLOYING\": "+ vertex.getStateTimestamp(ExecutionState.DEPLOYING) + ",");
          wrt.write("\"RUNNING\": "+ vertex.getStateTimestamp(ExecutionState.RUNNING) + ",");
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.executiongraph.Execution

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.