Search in sources :

Example 1 with LocalResourceStatusPBImpl

use of org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.impl.pb.LocalResourceStatusPBImpl in project hadoop by apache.

the class TestResourceLocalizationService method createLocalizerStatusForFailedResource.

private LocalizerStatus createLocalizerStatusForFailedResource(String localizerId, LocalResourceRequest req) {
    LocalizerStatus status = createLocalizerStatus(localizerId);
    LocalResourceStatus resourceStatus = new LocalResourceStatusPBImpl();
    resourceStatus.setException(SerializedException.newInstance(new YarnException("test")));
    resourceStatus.setStatus(ResourceStatusType.FETCH_FAILURE);
    resourceStatus.setResource(req);
    status.addResourceStatus(resourceStatus);
    return status;
}
Also used : LocalResourceStatusPBImpl(org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.impl.pb.LocalResourceStatusPBImpl) LocalizerStatus(org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus) LocalResourceStatus(org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalResourceStatus) YarnException(org.apache.hadoop.yarn.exceptions.YarnException)

Aggregations

YarnException (org.apache.hadoop.yarn.exceptions.YarnException)1 LocalResourceStatus (org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalResourceStatus)1 LocalizerStatus (org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus)1 LocalResourceStatusPBImpl (org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.impl.pb.LocalResourceStatusPBImpl)1