From 4709160d75a762ff1e189f49e28e84d59c3e8fd6 Mon Sep 17 00:00:00 2001 From: Harsh J Date: Fri, 25 May 2012 14:02:01 +0000 Subject: [PATCH] HADOOP-6871. When the value of a configuration key is set to its unresolved form, it causes an IllegalStateException in Configuration.get() stating that substitution depth is too large. Contributed by Arvind Prabhakar (harsh) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1342626 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 5 +++++ .../main/java/org/apache/hadoop/conf/Configuration.java | 6 ++++++ .../java/org/apache/hadoop/conf/TestConfiguration.java | 9 +++++++++ 3 files changed, 20 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 6312fc8e11..7bddd9ea58 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -153,6 +153,11 @@ Trunk (unreleased changes) HADOOP-8413. test-patch.sh gives out the wrong links for newPatchFindbugsWarnings (Colin Patrick McCabe via bobby) + HADOOP-6871. When the value of a configuration key is set to its + unresolved form, it causes the IllegalStateException in + Configuration.get() stating that substitution depth is too large. + (Arvind Prabhakar via harsh) + OPTIMIZATIONS HADOOP-7761. Improve the performance of raw comparisons. (todd) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java index 9384b87901..917f97c69b 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java @@ -617,7 +617,13 @@ private String substituteVars(String expr) { } Matcher match = varPat.matcher(""); String eval = expr; + Set evalSet = new HashSet(); for(int s=0; s