hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r882833 - in /hadoop/common/branches/branch-0.20: CHANGES.txt src/core/org/apache/hadoop/conf/Configuration.java
Date Sat, 21 Nov 2009 04:22:56 GMT
Author: cdouglas
Date: Sat Nov 21 04:22:55 2009
New Revision: 882833

URL: http://svn.apache.org/viewvc?rev=882833&view=rev
Log:
HADOOP-6269. Fix threading issue with defaultResource in Configuration.
Contributed by Sreekanth Ramakrishnan

Modified:
    hadoop/common/branches/branch-0.20/CHANGES.txt
    hadoop/common/branches/branch-0.20/src/core/org/apache/hadoop/conf/Configuration.java

Modified: hadoop/common/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/CHANGES.txt?rev=882833&r1=882832&r2=882833&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20/CHANGES.txt Sat Nov 21 04:22:55 2009
@@ -69,6 +69,9 @@
     MAPREDUCE-1147. Add map output counters to new API. (Amar Kamat 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/src/core/org/apache/hadoop/conf/Configuration.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/core/org/apache/hadoop/conf/Configuration.java?rev=882833&r1=882832&r2=882833&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/src/core/org/apache/hadoop/conf/Configuration.java
(original)
+++ hadoop/common/branches/branch-0.20/src/core/org/apache/hadoop/conf/Configuration.java
Sat Nov 21 04:22:55 2009
@@ -42,6 +42,7 @@
 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;
 
@@ -162,8 +163,8 @@
    * 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>();
   
   static{
     //print deprecation warning if hadoop-site.xml is found in classpath
@@ -1250,7 +1251,7 @@
     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) {



Mime
View raw message