YARN-4589: Diagnostics for localization timeouts is lacking. Contributed by Chang Li (lichangleo) and Jim Brennan (Jim_Brennan)
(cherry picked from commit a093bd859d
)
This commit is contained in:
parent
669c6a7cf4
commit
a4dea9de14
|
@ -23,6 +23,7 @@ import java.io.IOException;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -1219,6 +1220,15 @@ public class ContainerImpl implements Container {
|
||||||
container.resourceSet.addResources(ctxt.getLocalResources());
|
container.resourceSet.addResources(ctxt.getLocalResources());
|
||||||
container.dispatcher.getEventHandler().handle(
|
container.dispatcher.getEventHandler().handle(
|
||||||
new ContainerLocalizationRequestEvent(container, req));
|
new ContainerLocalizationRequestEvent(container, req));
|
||||||
|
// Get list of resources for logging
|
||||||
|
List<String> resourcePaths = new ArrayList<>();
|
||||||
|
for (Collection<LocalResourceRequest> rsrcReqList : req.values()) {
|
||||||
|
for (LocalResourceRequest rsrc : rsrcReqList) {
|
||||||
|
resourcePaths.add(rsrc.getPath().toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LOG.info("Container " + container.getContainerId()
|
||||||
|
+ " is localizing: " + resourcePaths);
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
// malformed resource; abort container launch
|
// malformed resource; abort container launch
|
||||||
LOG.warn("Failed to parse resource-request", e);
|
LOG.warn("Failed to parse resource-request", e);
|
||||||
|
|
Loading…
Reference in New Issue