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

(cherry picked from commit d8fadec944)
This commit is contained in:
Eric Payne 2021-01-13 17:01:28 +00:00
parent 75f34a156f
commit 4518ece4c9

View File

@ -23,6 +23,7 @@
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
@ -1240,6 +1241,15 @@ public ContainerState transition(ContainerImpl container,
container.resourceSet.addResources(ctxt.getLocalResources());
container.dispatcher.getEventHandler().handle(
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;
} else {
container.sendScheduleEvent();