ソースを参照

commit 5a21aa1efa89e13707871b32e1dee1328d8496b1
Author: Devaraj Das <ddas@yahoo-inc.com>
Date: Fri Oct 29 10:37:47 2010 -0700

. Makes the jobArchives map synchronized.

+++ b/YAHOO-CHANGES.txt
+ . Makes the jobArchives map synchronized. (ddas)
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077742 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 年 前
コミット
9ddc36bf67

+ 3 - 1
src/mapred/org/apache/hadoop/filecache/TrackerDistributedCacheManager.java

@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.text.DateFormat;
+import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -69,7 +70,8 @@ public class TrackerDistributedCacheManager {
   private TreeMap<String, CacheStatus> cachedArchives = 
     new TreeMap<String, CacheStatus>();
   private Map<JobID, TaskDistributedCacheManager> jobArchives =
-    new HashMap<JobID, TaskDistributedCacheManager>();
+    Collections.synchronizedMap(
+        new HashMap<JobID, TaskDistributedCacheManager>());
   private final TaskController taskController;
   private static final FsPermission PUBLIC_CACHE_OBJECT_PERM =
     FsPermission.createImmutable((short) 0755);