Package org.apache.tez.dag.recovery.records.RecoveryProtos

Examples of org.apache.tez.dag.recovery.records.RecoveryProtos.VertexFinishStateProto


    return startTime;
  }

  @Override
  public void toSummaryProtoStream(OutputStream outputStream) throws IOException {
    VertexFinishStateProto finishStateProto =
        VertexFinishStateProto.newBuilder()
            .setState(state.ordinal())
            .setVertexId(vertexID.toString())
            .build();

    SummaryEventProto.Builder builder = RecoveryProtos.SummaryEventProto.newBuilder()
        .setDagId(vertexID.getDAGId().toString())
        .setTimestamp(finishTime)
        .setEventType(getEventType().ordinal())
        .setEventPayload(finishStateProto.toByteString());
    builder.build().writeDelimitedTo(outputStream);

  }
View Full Code Here


  }

  @Override
  public void fromSummaryProtoStream(SummaryEventProto proto) throws IOException {
    VertexFinishStateProto finishStateProto =
        VertexFinishStateProto.parseFrom(proto.getEventPayload());
    this.vertexID = TezVertexID.fromString(finishStateProto.getVertexId());
    this.state = VertexState.values()[finishStateProto.getState()];
    this.finishTime = proto.getTimestamp();
    this.fromSummary = true;
  }
View Full Code Here

    return tezCounters;
  }

  @Override
  public void toSummaryProtoStream(OutputStream outputStream) throws IOException {
    VertexFinishStateProto finishStateProto =
        VertexFinishStateProto.newBuilder()
            .setState(state.ordinal())
            .setVertexId(vertexID.toString())
            .build();

    SummaryEventProto.Builder builder = RecoveryProtos.SummaryEventProto.newBuilder()
        .setDagId(vertexID.getDAGId().toString())
        .setTimestamp(finishTime)
        .setEventType(getEventType().ordinal())
        .setEventPayload(finishStateProto.toByteString());
    builder.build().writeDelimitedTo(outputStream);

  }
View Full Code Here

  }

  @Override
  public void fromSummaryProtoStream(SummaryEventProto proto) throws IOException {
    VertexFinishStateProto finishStateProto =
        VertexFinishStateProto.parseFrom(proto.getEventPayload());
    this.vertexID = TezVertexID.fromString(finishStateProto.getVertexId());
    this.state = VertexState.values()[finishStateProto.getState()];
    this.finishTime = proto.getTimestamp();
    this.fromSummary = true;
  }
View Full Code Here

    return tezCounters;
  }

  @Override
  public void toSummaryProtoStream(OutputStream outputStream) throws IOException {
    VertexFinishStateProto finishStateProto =
        VertexFinishStateProto.newBuilder()
            .setState(state.ordinal())
            .setVertexId(vertexID.toString())
            .build();

    SummaryEventProto.Builder builder = RecoveryProtos.SummaryEventProto.newBuilder()
        .setDagId(vertexID.getDAGId().toString())
        .setTimestamp(finishTime)
        .setEventType(getEventType().ordinal())
        .setEventPayload(finishStateProto.toByteString());
    builder.build().writeDelimitedTo(outputStream);

  }
View Full Code Here

  }

  @Override
  public void fromSummaryProtoStream(SummaryEventProto proto) throws IOException {
    VertexFinishStateProto finishStateProto =
        VertexFinishStateProto.parseFrom(proto.getEventPayload());
    this.vertexID = TezVertexID.fromString(finishStateProto.getVertexId());
    this.state = VertexState.values()[finishStateProto.getState()];
    this.finishTime = proto.getTimestamp();
    this.fromSummary = true;
  }
View Full Code Here

TOP

Related Classes of org.apache.tez.dag.recovery.records.RecoveryProtos.VertexFinishStateProto

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.