use of org.apache.hadoop.yarn.api.records.impl.pb.URLPBImpl in project hadoop by apache.
the class ResourceLocalizationSpecPBImpl method mergeLocalToBuilder.
private void mergeLocalToBuilder() {
ResourceLocalizationSpecProtoOrBuilder l = viaProto ? proto : builder;
if (this.resource != null && !(l.getResource().equals(((LocalResourcePBImpl) resource).getProto()))) {
maybeInitBuilder();
builder.setResource(((LocalResourcePBImpl) resource).getProto());
}
if (this.destinationDirectory != null && !(l.getDestinationDirectory().equals(((URLPBImpl) destinationDirectory).getProto()))) {
maybeInitBuilder();
builder.setDestinationDirectory(((URLPBImpl) destinationDirectory).getProto());
}
}
use of org.apache.hadoop.yarn.api.records.impl.pb.URLPBImpl in project hadoop by apache.
the class ResourceLocalizationSpecPBImpl method getDestinationDirectory.
@Override
public URL getDestinationDirectory() {
ResourceLocalizationSpecProtoOrBuilder p = viaProto ? proto : builder;
if (destinationDirectory != null) {
return destinationDirectory;
}
if (!p.hasDestinationDirectory()) {
return null;
}
destinationDirectory = new URLPBImpl(p.getDestinationDirectory());
return destinationDirectory;
}
Aggregations