Search in sources :

Example 1 with YarnApplicationStateProto

use of org.apache.hadoop.yarn.proto.YarnProtos.YarnApplicationStateProto in project hadoop by apache.

the class GetApplicationsRequestPBImpl method initApplicationStates.

private void initApplicationStates() {
    if (this.applicationStates != null) {
        return;
    }
    GetApplicationsRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<YarnApplicationStateProto> appStatesList = p.getApplicationStatesList();
    this.applicationStates = EnumSet.noneOf(YarnApplicationState.class);
    for (YarnApplicationStateProto c : appStatesList) {
        this.applicationStates.add(ProtoUtils.convertFromProtoFormat(c));
    }
}
Also used : YarnApplicationStateProto(org.apache.hadoop.yarn.proto.YarnProtos.YarnApplicationStateProto) YarnApplicationState(org.apache.hadoop.yarn.api.records.YarnApplicationState) GetApplicationsRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationsRequestProtoOrBuilder)

Aggregations

YarnApplicationState (org.apache.hadoop.yarn.api.records.YarnApplicationState)1 YarnApplicationStateProto (org.apache.hadoop.yarn.proto.YarnProtos.YarnApplicationStateProto)1 GetApplicationsRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationsRequestProtoOrBuilder)1