You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ac...@apache.org on 2011/05/03 01:21:40 UTC
svn commit: r1098854 - in /hadoop/common/branches/branch-0.20-security-203:
CHANGES.txt src/core/org/apache/hadoop/conf/Configuration.java
Author: acmurthy
Date: Mon May 2 23:21:40 2011
New Revision: 1098854
URL: http://svn.apache.org/viewvc?rev=1098854&view=rev
Log:
HADOOP-6269. Fix threading issue with defaultResource in Configuration. Contributed by Sreekanth Ramakrishnan.
Modified:
hadoop/common/branches/branch-0.20-security-203/CHANGES.txt
hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/conf/Configuration.java
Modified: hadoop/common/branches/branch-0.20-security-203/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/CHANGES.txt?rev=1098854&r1=1098853&r2=1098854&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security-203/CHANGES.txt Mon May 2 23:21:40 2011
@@ -1714,6 +1714,9 @@ Release 0.20.2 - Unreleased
HADOOP-6315. Avoid incorrect use of BuiltInflater/BuiltInDeflater in
GzipCodec. (Aaron Kimball via cdouglas)
+ HADOOP-6269. Fix threading issue with defaultResource in Configuration.
+ (Sreekanth Ramakrishnan via cdouglas)
+
Release 0.20.1 - 2009-09-01
INCOMPATIBLE CHANGES
Modified: hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/conf/Configuration.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/conf/Configuration.java?rev=1098854&r1=1098853&r2=1098854&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/conf/Configuration.java (original)
+++ hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/conf/Configuration.java Mon May 2 23:21:40 2011
@@ -43,6 +43,7 @@ import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.WeakHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -165,8 +166,8 @@ public class Configuration implements It
* List of default Resources. Resources are loaded in the order of the list
* entries
*/
- private static final ArrayList<String> defaultResources =
- new ArrayList<String>();
+ private static final CopyOnWriteArrayList<String> defaultResources =
+ new CopyOnWriteArrayList<String>();
/**
* Flag to indicate if the storage of resource which updates a key needs
@@ -1356,7 +1357,7 @@ public class Configuration implements It
return sb.toString();
}
- private void toString(ArrayList resources, StringBuffer sb) {
+ private void toString(List resources, StringBuffer sb) {
ListIterator i = resources.listIterator();
while (i.hasNext()) {
if (i.nextIndex() != 0) {