Search in sources :

Example 1 with NodeHeartbeatRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatRequestPBImpl method initLogAggregationReportsForApps.

private void initLogAggregationReportsForApps() {
    NodeHeartbeatRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<LogAggregationReportProto> list = p.getLogAggregationReportsForAppsList();
    this.logAggregationReportsForApps = new ArrayList<LogAggregationReport>();
    for (LogAggregationReportProto c : list) {
        this.logAggregationReportsForApps.add(convertFromProtoFormat(c));
    }
}
Also used : LogAggregationReport(org.apache.hadoop.yarn.server.api.protocolrecords.LogAggregationReport) NodeHeartbeatRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder) LogAggregationReportProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.LogAggregationReportProto)

Example 2 with NodeHeartbeatRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatRequestPBImpl method initRegisteredCollectors.

private void initRegisteredCollectors() {
    NodeHeartbeatRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<AppCollectorsMapProto> list = p.getRegisteredCollectorsList();
    if (!list.isEmpty()) {
        this.registeredCollectors = new HashMap<>();
        for (AppCollectorsMapProto c : list) {
            ApplicationId appId = convertFromProtoFormat(c.getAppId());
            this.registeredCollectors.put(appId, c.getAppCollectorAddr());
        }
    }
}
Also used : NodeHeartbeatRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder) AppCollectorsMapProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.AppCollectorsMapProto) ApplicationId(org.apache.hadoop.yarn.api.records.ApplicationId)

Example 3 with NodeHeartbeatRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatRequestPBImpl method initNodeLabels.

private void initNodeLabels() {
    if (this.labels != null) {
        return;
    }
    NodeHeartbeatRequestProtoOrBuilder p = viaProto ? proto : builder;
    if (!p.hasNodeLabels()) {
        labels = null;
        return;
    }
    NodeLabelsProto nodeLabels = p.getNodeLabels();
    labels = new HashSet<NodeLabel>();
    for (NodeLabelProto nlp : nodeLabels.getNodeLabelsList()) {
        labels.add(convertFromProtoFormat(nlp));
    }
}
Also used : NodeLabelsProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeLabelsProto) NodeLabel(org.apache.hadoop.yarn.api.records.NodeLabel) NodeLabelProto(org.apache.hadoop.yarn.proto.YarnProtos.NodeLabelProto) NodeHeartbeatRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder)

Example 4 with NodeHeartbeatRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatRequestPBImpl method getLastKnownContainerTokenMasterKey.

@Override
public MasterKey getLastKnownContainerTokenMasterKey() {
    NodeHeartbeatRequestProtoOrBuilder p = viaProto ? proto : builder;
    if (this.lastKnownContainerTokenMasterKey != null) {
        return this.lastKnownContainerTokenMasterKey;
    }
    if (!p.hasLastKnownContainerTokenMasterKey()) {
        return null;
    }
    this.lastKnownContainerTokenMasterKey = convertFromProtoFormat(p.getLastKnownContainerTokenMasterKey());
    return this.lastKnownContainerTokenMasterKey;
}
Also used : NodeHeartbeatRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder)

Example 5 with NodeHeartbeatRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatRequestPBImpl method getLastKnownNMTokenMasterKey.

@Override
public MasterKey getLastKnownNMTokenMasterKey() {
    NodeHeartbeatRequestProtoOrBuilder p = viaProto ? proto : builder;
    if (this.lastKnownNMTokenMasterKey != null) {
        return this.lastKnownNMTokenMasterKey;
    }
    if (!p.hasLastKnownNmTokenMasterKey()) {
        return null;
    }
    this.lastKnownNMTokenMasterKey = convertFromProtoFormat(p.getLastKnownNmTokenMasterKey());
    return this.lastKnownNMTokenMasterKey;
}
Also used : NodeHeartbeatRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder)

Aggregations

NodeHeartbeatRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder)6 ApplicationId (org.apache.hadoop.yarn.api.records.ApplicationId)1 NodeLabel (org.apache.hadoop.yarn.api.records.NodeLabel)1 NodeLabelProto (org.apache.hadoop.yarn.proto.YarnProtos.NodeLabelProto)1 AppCollectorsMapProto (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.AppCollectorsMapProto)1 LogAggregationReportProto (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.LogAggregationReportProto)1 NodeLabelsProto (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeLabelsProto)1 LogAggregationReport (org.apache.hadoop.yarn.server.api.protocolrecords.LogAggregationReport)1