YARN-4589: Diagnostics for localization timeouts is lacking. Contributed by Chang Li (lichangleo) and Jim Brennan (Jim_Brennan)

This commit is contained in:
Eric Payne 2021-01-13 17:01:28 +00:00
parent 836c630430
commit d8fadec944

View File

@ -23,6 +23,7 @@
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;
@ -1240,6 +1241,15 @@ public ContainerState transition(ContainerImpl 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);
return ContainerState.LOCALIZING; return ContainerState.LOCALIZING;
} else { } else {
container.sendScheduleEvent(); container.sendScheduleEvent();