Search in sources :

Example 1 with ContainerLaunchContextProtoOrBuilder

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

the class ContainerLaunchContextPBImpl method initLocalResources.

private void initLocalResources() {
    if (this.localResources != null) {
        return;
    }
    ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
    List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
    this.localResources = new HashMap<String, LocalResource>();
    for (StringLocalResourceMapProto c : list) {
        this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
    }
}
Also used : ByteString(com.google.protobuf.ByteString) ContainerLaunchContextProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ContainerLaunchContextProtoOrBuilder) StringLocalResourceMapProto(org.apache.hadoop.yarn.proto.YarnProtos.StringLocalResourceMapProto) LocalResource(org.apache.hadoop.yarn.api.records.LocalResource)

Example 2 with ContainerLaunchContextProtoOrBuilder

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

the class ContainerLaunchContextPBImpl method initCommands.

private void initCommands() {
    if (this.commands != null) {
        return;
    }
    ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
    List<String> list = p.getCommandList();
    this.commands = new ArrayList<String>();
    for (String c : list) {
        this.commands.add(c);
    }
}
Also used : ByteString(com.google.protobuf.ByteString) ContainerLaunchContextProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ContainerLaunchContextProtoOrBuilder)

Example 3 with ContainerLaunchContextProtoOrBuilder

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

the class ContainerLaunchContextPBImpl method initServiceData.

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

Example 4 with ContainerLaunchContextProtoOrBuilder

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

the class ContainerLaunchContextPBImpl method initApplicationACLs.

private void initApplicationACLs() {
    if (this.applicationACLS != null) {
        return;
    }
    ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
    List<ApplicationACLMapProto> list = p.getApplicationACLsList();
    this.applicationACLS = new HashMap<ApplicationAccessType, String>(list.size());
    for (ApplicationACLMapProto aclProto : list) {
        this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto.getAccessType()), aclProto.getAcl());
    }
}
Also used : ApplicationAccessType(org.apache.hadoop.yarn.api.records.ApplicationAccessType) ApplicationACLMapProto(org.apache.hadoop.yarn.proto.YarnProtos.ApplicationACLMapProto) ByteString(com.google.protobuf.ByteString) ContainerLaunchContextProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ContainerLaunchContextProtoOrBuilder)

Example 5 with ContainerLaunchContextProtoOrBuilder

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

the class ContainerLaunchContextPBImpl method getContainerRetryContext.

public ContainerRetryContext getContainerRetryContext() {
    ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
    if (this.containerRetryContext != null) {
        return this.containerRetryContext;
    }
    if (!p.hasContainerRetryContext()) {
        return null;
    }
    this.containerRetryContext = convertFromProtoFormat(p.getContainerRetryContext());
    return this.containerRetryContext;
}
Also used : ContainerLaunchContextProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ContainerLaunchContextProtoOrBuilder)

Aggregations

ContainerLaunchContextProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnProtos.ContainerLaunchContextProtoOrBuilder)8 ByteString (com.google.protobuf.ByteString)5 ByteBuffer (java.nio.ByteBuffer)1 ApplicationAccessType (org.apache.hadoop.yarn.api.records.ApplicationAccessType)1 LocalResource (org.apache.hadoop.yarn.api.records.LocalResource)1 ApplicationACLMapProto (org.apache.hadoop.yarn.proto.YarnProtos.ApplicationACLMapProto)1 StringBytesMapProto (org.apache.hadoop.yarn.proto.YarnProtos.StringBytesMapProto)1 StringLocalResourceMapProto (org.apache.hadoop.yarn.proto.YarnProtos.StringLocalResourceMapProto)1 StringStringMapProto (org.apache.hadoop.yarn.proto.YarnProtos.StringStringMapProto)1