Search in sources :

Example 1 with AppCollectorsMapProto

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.AppCollectorsMapProto 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 2 with AppCollectorsMapProto

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

the class ReportNewCollectorInfoRequestPBImpl method initLocalCollectorsList.

private void initLocalCollectorsList() {
    ReportNewCollectorInfoRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<AppCollectorsMapProto> list = p.getAppCollectorsList();
    this.collectorsList = new ArrayList<AppCollectorsMap>();
    for (AppCollectorsMapProto m : list) {
        this.collectorsList.add(convertFromProtoFormat(m));
    }
}
Also used : AppCollectorsMap(org.apache.hadoop.yarn.server.api.records.AppCollectorsMap) ReportNewCollectorInfoRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.ReportNewCollectorInfoRequestProtoOrBuilder) AppCollectorsMapProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.AppCollectorsMapProto)

Example 3 with AppCollectorsMapProto

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

the class ReportNewCollectorInfoRequestPBImpl method addLocalCollectorsToProto.

private void addLocalCollectorsToProto() {
    maybeInitBuilder();
    builder.clearAppCollectors();
    List<AppCollectorsMapProto> protoList = new ArrayList<AppCollectorsMapProto>();
    for (AppCollectorsMap m : this.collectorsList) {
        protoList.add(convertToProtoFormat(m));
    }
    builder.addAllAppCollectors(protoList);
}
Also used : AppCollectorsMap(org.apache.hadoop.yarn.server.api.records.AppCollectorsMap) ArrayList(java.util.ArrayList) AppCollectorsMapProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.AppCollectorsMapProto)

Example 4 with AppCollectorsMapProto

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

the class NodeHeartbeatResponsePBImpl method initAppCollectorsMap.

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

Aggregations

AppCollectorsMapProto (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.AppCollectorsMapProto)4 ApplicationId (org.apache.hadoop.yarn.api.records.ApplicationId)2 AppCollectorsMap (org.apache.hadoop.yarn.server.api.records.AppCollectorsMap)2 ArrayList (java.util.ArrayList)1 NodeHeartbeatRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder)1 NodeHeartbeatResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder)1 ReportNewCollectorInfoRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.ReportNewCollectorInfoRequestProtoOrBuilder)1