use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeLabelsProto.Builder in project hadoop by apache.
the class NodeHeartbeatRequestPBImpl method mergeLocalToBuilder.
private void mergeLocalToBuilder() {
if (this.nodeStatus != null) {
builder.setNodeStatus(convertToProtoFormat(this.nodeStatus));
}
if (this.lastKnownContainerTokenMasterKey != null) {
builder.setLastKnownContainerTokenMasterKey(convertToProtoFormat(this.lastKnownContainerTokenMasterKey));
}
if (this.lastKnownNMTokenMasterKey != null) {
builder.setLastKnownNmTokenMasterKey(convertToProtoFormat(this.lastKnownNMTokenMasterKey));
}
if (this.labels != null) {
builder.clearNodeLabels();
Builder newBuilder = NodeLabelsProto.newBuilder();
for (NodeLabel label : labels) {
newBuilder.addNodeLabels(convertToProtoFormat(label));
}
builder.setNodeLabels(newBuilder.build());
}
if (this.logAggregationReportsForApps != null) {
addLogAggregationStatusForAppsToProto();
}
if (this.registeredCollectors != null) {
addRegisteredCollectorsToProto();
}
}
use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeLabelsProto.Builder in project hadoop by apache.
the class RegisterNodeManagerRequestPBImpl method mergeLocalToBuilder.
private synchronized void mergeLocalToBuilder() {
if (this.containerStatuses != null) {
addNMContainerStatusesToProto();
}
if (this.runningApplications != null) {
addRunningApplicationsToProto();
}
if (this.resource != null) {
builder.setResource(convertToProtoFormat(this.resource));
}
if (this.nodeId != null) {
builder.setNodeId(convertToProtoFormat(this.nodeId));
}
if (this.labels != null) {
builder.clearNodeLabels();
Builder newBuilder = NodeLabelsProto.newBuilder();
for (NodeLabel label : labels) {
newBuilder.addNodeLabels(convertToProtoFormat(label));
}
builder.setNodeLabels(newBuilder.build());
}
if (this.physicalResource != null) {
builder.setPhysicalResource(convertToProtoFormat(this.physicalResource));
}
}
Aggregations