Search in sources :

Example 6 with ContainerIdProto

use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto in project hadoop by apache.

the class NodeHeartbeatResponsePBImpl method initContainersToCleanup.

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

Example 7 with ContainerIdProto

use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto in project hadoop by apache.

the class GetContainerStatusesRequestPBImpl method addLocalContainerIdsToProto.

private void addLocalContainerIdsToProto() {
    maybeInitBuilder();
    builder.clearContainerId();
    if (this.containerIds == null)
        return;
    List<ContainerIdProto> protoList = new ArrayList<ContainerIdProto>();
    for (ContainerId id : containerIds) {
        protoList.add(convertToProtoFormat(id));
    }
    builder.addAllContainerId(protoList);
}
Also used : ContainerId(org.apache.hadoop.yarn.api.records.ContainerId) ArrayList(java.util.ArrayList) ContainerIdProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto)

Example 8 with ContainerIdProto

use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto in project hadoop by apache.

the class StopContainersRequestPBImpl method initLocalContainerIds.

private void initLocalContainerIds() {
    if (this.containerIds != null) {
        return;
    }
    StopContainersRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerIdProto> containerIds = p.getContainerIdList();
    this.containerIds = new ArrayList<ContainerId>();
    for (ContainerIdProto id : containerIds) {
        this.containerIds.add(convertFromProtoFormat(id));
    }
}
Also used : ContainerId(org.apache.hadoop.yarn.api.records.ContainerId) StopContainersRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProtoOrBuilder) ContainerIdProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto)

Example 9 with ContainerIdProto

use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto in project hadoop by apache.

the class StopContainersRequestPBImpl method addLocalContainerIdsToProto.

private void addLocalContainerIdsToProto() {
    maybeInitBuilder();
    builder.clearContainerId();
    if (this.containerIds == null)
        return;
    List<ContainerIdProto> protoList = new ArrayList<ContainerIdProto>();
    for (ContainerId id : containerIds) {
        protoList.add(convertToProtoFormat(id));
    }
    builder.addAllContainerId(protoList);
}
Also used : ContainerId(org.apache.hadoop.yarn.api.records.ContainerId) ArrayList(java.util.ArrayList) ContainerIdProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto)

Example 10 with ContainerIdProto

use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto in project hadoop by apache.

the class StopContainersResponsePBImpl method initSucceededRequests.

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

Aggregations

ContainerId (org.apache.hadoop.yarn.api.records.ContainerId)10 ContainerIdProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto)10 ArrayList (java.util.ArrayList)2 NodeHeartbeatResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder)2 AllocateRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder)1 GetContainerStatusesRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.GetContainerStatusesRequestProtoOrBuilder)1 IncreaseContainersResourceResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.IncreaseContainersResourceResponseProtoOrBuilder)1 StartContainersResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersResponseProtoOrBuilder)1 StopContainersRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersRequestProtoOrBuilder)1 StopContainersResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.StopContainersResponseProtoOrBuilder)1