Search in sources :

Example 16 with ApplicationTimeoutType

use of org.apache.hadoop.yarn.api.records.ApplicationTimeoutType in project hadoop by apache.

the class ApplicationStateDataPBImpl method initApplicationTimeout.

private void initApplicationTimeout() {
    if (this.applicationTimeouts != null) {
        return;
    }
    ApplicationStateDataProtoOrBuilder p = viaProto ? proto : builder;
    List<ApplicationTimeoutMapProto> lists = p.getApplicationTimeoutsList();
    this.applicationTimeouts = new HashMap<ApplicationTimeoutType, Long>(lists.size());
    for (ApplicationTimeoutMapProto timeoutProto : lists) {
        this.applicationTimeouts.put(ProtoUtils.convertFromProtoFormat(timeoutProto.getApplicationTimeoutType()), timeoutProto.getTimeout());
    }
}
Also used : ApplicationStateDataProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationStateDataProtoOrBuilder) ApplicationTimeoutType(org.apache.hadoop.yarn.api.records.ApplicationTimeoutType) ApplicationTimeoutMapProto(org.apache.hadoop.yarn.proto.YarnProtos.ApplicationTimeoutMapProto)

Example 17 with ApplicationTimeoutType

use of org.apache.hadoop.yarn.api.records.ApplicationTimeoutType in project hadoop by apache.

the class RMAppLifetimeMonitor method updateApplicationTimeouts.

public void updateApplicationTimeouts(ApplicationId appId, Map<ApplicationTimeoutType, Long> timeouts) {
    for (Entry<ApplicationTimeoutType, Long> entry : timeouts.entrySet()) {
        ApplicationTimeoutType timeoutType = entry.getKey();
        RMAppToMonitor update = new RMAppToMonitor(appId, timeoutType);
        register(update, entry.getValue());
    }
}
Also used : ApplicationTimeoutType(org.apache.hadoop.yarn.api.records.ApplicationTimeoutType)

Aggregations

ApplicationTimeoutType (org.apache.hadoop.yarn.api.records.ApplicationTimeoutType)17 HashMap (java.util.HashMap)4 Iterator (java.util.Iterator)4 ApplicationTimeoutMapProto (org.apache.hadoop.yarn.proto.YarnProtos.ApplicationTimeoutMapProto)4 ApplicationId (org.apache.hadoop.yarn.api.records.ApplicationId)3 YarnException (org.apache.hadoop.yarn.exceptions.YarnException)3 MockNM (org.apache.hadoop.yarn.server.resourcemanager.MockNM)3 MockRM (org.apache.hadoop.yarn.server.resourcemanager.MockRM)3 RMApp (org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp)3 Test (org.junit.Test)3 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 UpdateApplicationTimeoutsRequest (org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsRequest)2 ApplicationTimeout (org.apache.hadoop.yarn.api.records.ApplicationTimeout)2 AppTimeoutsMapProto (org.apache.hadoop.yarn.proto.YarnProtos.AppTimeoutsMapProto)2 ApplicationUpdateTimeoutMapProto (org.apache.hadoop.yarn.proto.YarnProtos.ApplicationUpdateTimeoutMapProto)2 MockAM (org.apache.hadoop.yarn.server.resourcemanager.MockAM)2 MemoryRMStateStore (org.apache.hadoop.yarn.server.resourcemanager.recovery.MemoryRMStateStore)2 ApplicationStateData (org.apache.hadoop.yarn.server.resourcemanager.recovery.records.ApplicationStateData)2