Search in sources :

Example 1 with StartContainersResponseProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProtoOrBuilder in project hadoop by apache.

the class StartContainersResponsePBImpl method initSucceededContainers.

private void initSucceededContainers() {
    if (this.succeededContainers != null)
        return;
    StartContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerIdProto> list = p.getSucceededRequestsList();
    this.succeededContainers = new ArrayList<ContainerId>();
    for (ContainerIdProto c : list) {
        this.succeededContainers.add(convertFromProtoFormat(c));
    }
}
Also used : ContainerId(org.apache.hadoop.yarn.api.records.ContainerId) StartContainersResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProtoOrBuilder) ContainerIdProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto)

Example 2 with StartContainersResponseProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProtoOrBuilder in project hadoop by apache.

the class StartContainersResponsePBImpl method initServicesMetaData.

private void initServicesMetaData() {
    if (this.servicesMetaData != null) {
        return;
    }
    StartContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<StringBytesMapProto> list = p.getServicesMetaDataList();
    this.servicesMetaData = new HashMap<String, ByteBuffer>();
    for (StringBytesMapProto c : list) {
        this.servicesMetaData.put(c.getKey(), convertFromProtoFormat(c.getValue()));
    }
}
Also used : StartContainersResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProtoOrBuilder) StringBytesMapProto(org.apache.hadoop.yarn.proto.YarnProtos.StringBytesMapProto) ByteString(com.google.protobuf.ByteString) ByteBuffer(java.nio.ByteBuffer)

Example 3 with StartContainersResponseProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProtoOrBuilder in project hadoop by apache.

the class StartContainersResponsePBImpl method initFailedContainers.

private void initFailedContainers() {
    if (this.failedContainers != null) {
        return;
    }
    StartContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerExceptionMapProto> protoList = p.getFailedRequestsList();
    this.failedContainers = new HashMap<ContainerId, SerializedException>();
    for (ContainerExceptionMapProto ce : protoList) {
        this.failedContainers.put(convertFromProtoFormat(ce.getContainerId()), convertFromProtoFormat(ce.getException()));
    }
}
Also used : ContainerId(org.apache.hadoop.yarn.api.records.ContainerId) StartContainersResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProtoOrBuilder) ContainerExceptionMapProto(org.apache.hadoop.yarn.proto.YarnServiceProtos.ContainerExceptionMapProto) SerializedException(org.apache.hadoop.yarn.api.records.SerializedException)

Aggregations

StartContainersResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProtoOrBuilder)3 ContainerId (org.apache.hadoop.yarn.api.records.ContainerId)2 ByteString (com.google.protobuf.ByteString)1 ByteBuffer (java.nio.ByteBuffer)1 SerializedException (org.apache.hadoop.yarn.api.records.SerializedException)1 ContainerIdProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto)1 StringBytesMapProto (org.apache.hadoop.yarn.proto.YarnProtos.StringBytesMapProto)1 ContainerExceptionMapProto (org.apache.hadoop.yarn.proto.YarnServiceProtos.ContainerExceptionMapProto)1