YARN-4530. LocalizedResource trigger a NPE Cause the NodeManager exit. (tangshangwen via rohithsharmaks)

This commit is contained in:
Rohith Sharma K S 2016-01-04 09:58:13 +05:30
parent 4e4b3a8465
commit f9e36dea96
2 changed files with 4 additions and 1 deletions

View File

@ -99,6 +99,9 @@ Release 2.9.0 - UNRELEASED
YARN-2934. Improve handling of container's stderr.
(Naganarasimha G R via gera)
YARN-4530. LocalizedResource trigger a NPE Cause the NodeManager exit
(tangshangwen via rohithsharmaks)
Release 2.8.0 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -878,12 +878,12 @@ public void run() {
Future<Path> completed = queue.take();
LocalizerResourceRequestEvent assoc = pending.remove(completed);
try {
Path local = completed.get();
if (null == assoc) {
LOG.error("Localized unknown resource to " + completed);
// TODO delete
return;
}
Path local = completed.get();
LocalResourceRequest key = assoc.getResource().getRequest();
publicRsrc.handle(new ResourceLocalizedEvent(key, local, FileUtil
.getDU(new File(local.toUri()))));