Package org.apache.flink.runtime.jobgraph

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


        e3.toString();
      }
     
      // RecentJobEvent
      {
        JobID jid = new JobID();
        RecentJobEvent e1 = new RecentJobEvent(jid, "some name", JobStatus.FAILED, false, 634563546, 546734734672572457L);
        RecentJobEvent e2 = new RecentJobEvent(jid, "some name", JobStatus.FAILED, false, 634563546, 546734734672572457L);
        RecentJobEvent e3 = new RecentJobEvent(jid, null, JobStatus.RUNNING, false, 42364716239476L, 127843618273607L);
        RecentJobEvent e4 = new RecentJobEvent(jid, null, JobStatus.RUNNING, false, 42364716239476L, 127843618273607L);
       
View Full Code Here


  }
 
  @Test
  public void testSerialization() {
    try {
      JobID jid = new JobID();
      JobVertexID vid = new JobVertexID();
      ExecutionAttemptID eid = new ExecutionAttemptID();
     
      ExecutionStateChangeEvent esce = new ExecutionStateChangeEvent(429345231796596L, vid, 17, eid, ExecutionState.CANCELING);
View Full Code Here

  /**
   * Default constructor for serialization/deserialization.
   */
  public TaskDeploymentDescriptor() {
    this.jobID = new JobID();
    this.vertexID = new JobVertexID();
    this.executionId = new ExecutionAttemptID();
    this.jobConfiguration = new Configuration();
    this.taskConfiguration = new Configuration();
    this.outputGates = Collections.emptyList();
View Full Code Here

  @Override
  public void read(DataInputView in) throws IOException {
    this.accumulators = null; // this makes sure we deserialize
   
    jobID = new JobID();
    jobID.read(in);
   
    int numberOfMapEntries = in.readInt();
    this.accNames = new String[numberOfMapEntries];
    this.classNames = new String[numberOfMapEntries];
View Full Code Here

        assertTrue(retCode != 0);
      }
     
      // test cancel properly
      {
        JobID jid = new JobID();
        String jidString = jid.toString();
       
        String[] parameters = {"-i", jidString};
        InfoListTestCliFrontend testFrontend = new InfoListTestCliFrontend(new TestProtocol(jid));
        int retCode = testFrontend.cancel(parameters);
        assertTrue(retCode == 0);
View Full Code Here

          throw new IOException("Network stream corrupted: invalid magic" +
              "number in current envelope header.");
        }

        int seqNum = this.headerBuffer.getInt();
        JobID jobId = JobID.fromByteBuffer(this.headerBuffer);
        ChannelID sourceId = ChannelID.fromByteBuffer(this.headerBuffer);

        this.currentEnvelope = new Envelope(seqNum, jobId, sourceId);

        int eventsSize = this.headerBuffer.getInt();
        int bufferSize = this.headerBuffer.getInt();

        this.currentEventsBuffer = eventsSize > 0 ? ByteBuffer.allocate(eventsSize) : null;
        this.currentBufferRequestSize = bufferSize > 0 ? bufferSize : 0;

        this.headerBuffer.clear();
      }
    }

    // --------------------------------------------------------------------
    // (2) events (var length)
    // --------------------------------------------------------------------
    if (this.currentEventsBuffer != null) {
      copy(in, this.currentEventsBuffer);

      if (this.currentEventsBuffer.hasRemaining()) {
        return DecoderState.PENDING;
      }
      else {
        this.currentEventsBuffer.flip();
        this.currentEnvelope.setEventsSerialized(this.currentEventsBuffer);
        this.currentEventsBuffer = null;
      }
    }

    // --------------------------------------------------------------------
    // (3) buffer (var length)
    // --------------------------------------------------------------------
    // (a) request a buffer from OUR pool
    if (this.currentBufferRequestSize > 0) {
      JobID jobId = this.currentEnvelope.getJobID();
      ChannelID sourceId = this.currentEnvelope.getSource();
      Buffer buffer = requestBufferForTarget(jobId, sourceId, this.currentBufferRequestSize);

      if (buffer == null) {
        return DecoderState.NO_BUFFER_AVAILABLE;
View Full Code Here

public class TaskDeploymentDescriptorTest {
  @Test
  public void testSerialization() {
    try {
      final JobID jobID = new JobID();
      final JobVertexID vertexID = new JobVertexID();
      final ExecutionAttemptID execId = new ExecutionAttemptID();
      final String taskName = "task name";
      final int indexInSubtaskGroup = 0;
      final int currentNumberOfSubtasks = 1;
View Full Code Here

public class TaskExecutionStateTest {

  @Test
  public void testEqualsHashCode() {
    try {
      final JobID jid = new JobID();
      final ExecutionAttemptID executionId = new ExecutionAttemptID();
      final ExecutionState state = ExecutionState.RUNNING;
      final Throwable error = new RuntimeException("some test error message");
     
      TaskExecutionState s1 = new TaskExecutionState(jid, executionId, state, error);
View Full Code Here

  }
 
  @Test
  public void testSerialization() {
    try {
      final JobID jid = new JobID();
      final ExecutionAttemptID executionId = new ExecutionAttemptID();
      final ExecutionState state = ExecutionState.DEPLOYING;
      final Throwable error = new IOException("fubar");
     
      TaskExecutionState original1 = new TaskExecutionState(jid, executionId, state, error);
View Full Code Here

public class TaskTest {

  @Test
  public void testTaskStates() {
    try {
      final JobID jid = new JobID();
      final JobVertexID vid = new JobVertexID();
      final ExecutionAttemptID eid = new ExecutionAttemptID();
     
      final TaskManager taskManager = mock(TaskManager.class);
      final RuntimeEnvironment env = mock(RuntimeEnvironment.class);
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.