From 6ea007ba91bbe460de7509351562ee06b3f77533 Mon Sep 17 00:00:00 2001 From: Junping Du Date: Tue, 5 May 2015 10:18:23 -0700 Subject: [PATCH] YARN-3396. Handle URISyntaxException in ResourceLocalizationService. (Contributed by Brahma Reddy Battula) (cherry picked from commit 38102420621308f5ba91cdeb6a18a63aa5acf640) --- hadoop-yarn-project/CHANGES.txt | 2 ++ .../localizer/ResourceLocalizationService.java | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 9f7af1eae7b..88533fb9e63 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -132,6 +132,8 @@ Release 2.8.0 - UNRELEASED YARN-3363. add localization and container launch time to ContainerMetrics at NM to show these timing information for each active container. (zxu via rkanter) + YARN-3396. Handle URISyntaxException in ResourceLocalizationService. + (Brahma Reddy Battula via junping_du) YARN-2980. Move health check script related functionality to hadoop-common (Varun Saxena via aw) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java index e9c45f345be..17ea1a94589 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java @@ -995,7 +995,9 @@ public class ResourceLocalizationService extends CompositeService try { req = new LocalResourceRequest(rsrc); } catch (URISyntaxException e) { - // TODO fail? Already translated several times... + LOG.error( + "Got exception in parsing URL of LocalResource:" + + rsrc.getResource(), e); } LocalizerResourceRequestEvent assoc = scheduled.get(req); if (assoc == null) { @@ -1069,7 +1071,9 @@ public class ResourceLocalizationService extends CompositeService LOG.error("Inorrect path for PRIVATE localization." + next.getResource().getFile(), e); } catch (URISyntaxException e) { - //TODO fail? Already translated several times... + LOG.error( + "Got exception in parsing URL of LocalResource:" + + next.getResource(), e); } }