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()));
}
}
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);
}
}
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()));
}
}
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());
}
}
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;
}
Aggregations