use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder in project hadoop by apache.
the class AllocateResponsePBImpl method initLocalNewNodeReportList.
// Once this is called. updatedNodes will never be null - until a getProto is
// called.
private synchronized void initLocalNewNodeReportList() {
if (this.updatedNodes != null) {
return;
}
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
List<NodeReportProto> list = p.getUpdatedNodesList();
updatedNodes = new ArrayList<NodeReport>(list.size());
for (NodeReportProto n : list) {
updatedNodes.add(convertFromProtoFormat(n));
}
}
use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder in project hadoop by apache.
the class AllocateResponsePBImpl method getApplicationPriority.
@Override
public synchronized Priority getApplicationPriority() {
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
if (this.appPriority != null) {
return this.appPriority;
}
if (!p.hasApplicationPriority()) {
return null;
}
this.appPriority = convertFromProtoFormat(p.getApplicationPriority());
return this.appPriority;
}
use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder in project hadoop by apache.
the class AllocateResponsePBImpl method getPreemptionMessage.
@Override
public synchronized PreemptionMessage getPreemptionMessage() {
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
if (this.preempt != null) {
return this.preempt;
}
if (!p.hasPreempt()) {
return null;
}
this.preempt = convertFromProtoFormat(p.getPreempt());
return this.preempt;
}
use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder in project hadoop by apache.
the class AllocateResponsePBImpl method initLocalUpdateErrorsList.
private synchronized void initLocalUpdateErrorsList() {
if (updateErrors != null) {
return;
}
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
List<YarnServiceProtos.UpdateContainerErrorProto> list = p.getUpdateErrorsList();
this.updateErrors = new ArrayList<UpdateContainerError>();
for (YarnServiceProtos.UpdateContainerErrorProto t : list) {
updateErrors.add(ProtoUtils.convertFromProtoFormat(t));
}
}
use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder in project hadoop by apache.
the class AllocateResponsePBImpl method getAMRMToken.
@Override
public synchronized Token getAMRMToken() {
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
if (amrmToken != null) {
return amrmToken;
}
if (!p.hasAmRmToken()) {
return null;
}
this.amrmToken = convertFromProtoFormat(p.getAmRmToken());
return amrmToken;
}
Aggregations