Search in sources :

Example 1 with StartContainerRequestProto

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

the class StartContainersRequestPBImpl method addLocalRequestsToProto.

private void addLocalRequestsToProto() {
    maybeInitBuilder();
    builder.clearStartContainerRequest();
    List<StartContainerRequestProto> protoList = new ArrayList<StartContainerRequestProto>();
    for (StartContainerRequest r : this.requests) {
        protoList.add(convertToProtoFormat(r));
    }
    builder.addAllStartContainerRequest(protoList);
}
Also used : StartContainerRequestProto(org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainerRequestProto) ArrayList(java.util.ArrayList) StartContainerRequest(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest)

Example 2 with StartContainerRequestProto

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

the class StartContainersRequestPBImpl method initLocalRequests.

private void initLocalRequests() {
    StartContainersRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<StartContainerRequestProto> requestList = p.getStartContainerRequestList();
    this.requests = new ArrayList<StartContainerRequest>();
    for (StartContainerRequestProto r : requestList) {
        this.requests.add(convertFromProtoFormat(r));
    }
}
Also used : StartContainerRequestProto(org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainerRequestProto) StartContainersRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProtoOrBuilder) StartContainerRequest(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest)

Aggregations

StartContainerRequest (org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest)2 StartContainerRequestProto (org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainerRequestProto)2 ArrayList (java.util.ArrayList)1 StartContainersRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.StartContainersRequestProtoOrBuilder)1