use of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationACLMapProto in project hadoop by apache.
the class ContainerLaunchContextPBImpl method addApplicationACLs.
private void addApplicationACLs() {
maybeInitBuilder();
builder.clearApplicationACLs();
if (applicationACLS == null) {
return;
}
Iterable<? extends ApplicationACLMapProto> values = new Iterable<ApplicationACLMapProto>() {
@Override
public Iterator<ApplicationACLMapProto> iterator() {
return new Iterator<ApplicationACLMapProto>() {
Iterator<ApplicationAccessType> aclsIterator = applicationACLS.keySet().iterator();
@Override
public boolean hasNext() {
return aclsIterator.hasNext();
}
@Override
public ApplicationACLMapProto next() {
ApplicationAccessType key = aclsIterator.next();
return ApplicationACLMapProto.newBuilder().setAcl(applicationACLS.get(key)).setAccessType(ProtoUtils.convertToProtoFormat(key)).build();
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
this.builder.addAllApplicationACLs(values);
}
Aggregations