YARN-8403. Change the log level for fail to download resource from INFO to ERROR. Contributed by Eric Yang
(cherry picked from commit 67c65da261
)
This commit is contained in:
parent
a6525e0744
commit
2a94823f32
|
@ -972,11 +972,17 @@ public class ResourceLocalizationService extends CompositeService
|
||||||
.getDU(new File(local.toUri()))));
|
.getDU(new File(local.toUri()))));
|
||||||
assoc.getResource().unlock();
|
assoc.getResource().unlock();
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException e) {
|
||||||
LOG.info("Failed to download resource " + assoc.getResource(),
|
String user = assoc.getContext().getUser();
|
||||||
e.getCause());
|
ApplicationId applicationId = assoc.getContext().getContainerId().getApplicationAttemptId().getApplicationId();
|
||||||
LocalResourceRequest req = assoc.getResource().getRequest();
|
LocalResourcesTracker tracker =
|
||||||
publicRsrc.handle(new ResourceFailedLocalizationEvent(req,
|
getLocalResourcesTracker(LocalResourceVisibility.APPLICATION, user, applicationId);
|
||||||
e.getMessage()));
|
final String diagnostics = "Failed to download resource " +
|
||||||
|
assoc.getResource() + " " + e.getCause();
|
||||||
|
tracker.handle(new ResourceFailedLocalizationEvent(
|
||||||
|
assoc.getResource().getRequest(), diagnostics));
|
||||||
|
publicRsrc.handle(new ResourceFailedLocalizationEvent(
|
||||||
|
assoc.getResource().getRequest(), diagnostics));
|
||||||
|
LOG.error(diagnostics);
|
||||||
assoc.getResource().unlock();
|
assoc.getResource().unlock();
|
||||||
} catch (CancellationException e) {
|
} catch (CancellationException e) {
|
||||||
// ignore; shutting down
|
// ignore; shutting down
|
||||||
|
|
|
@ -2398,6 +2398,9 @@ public class TestResourceLocalizationService {
|
||||||
// Waiting for resource to change into FAILED state.
|
// Waiting for resource to change into FAILED state.
|
||||||
Assert.assertTrue(waitForResourceState(lr, spyService, req,
|
Assert.assertTrue(waitForResourceState(lr, spyService, req,
|
||||||
LocalResourceVisibility.PUBLIC, user, null, ResourceState.FAILED, 5000));
|
LocalResourceVisibility.PUBLIC, user, null, ResourceState.FAILED, 5000));
|
||||||
|
Assert.assertTrue(waitForResourceState(lr, spyService, req,
|
||||||
|
LocalResourceVisibility.APPLICATION, user, appId, ResourceState.FAILED, 5000));
|
||||||
|
|
||||||
// releasing lock as a part of download failed process.
|
// releasing lock as a part of download failed process.
|
||||||
lr.unlock();
|
lr.unlock();
|
||||||
// removing pending download request.
|
// removing pending download request.
|
||||||
|
|
Loading…
Reference in New Issue