File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
hadoop-common-project/hadoop-common
src/main/java/org/apache/hadoop/fs Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,8 @@ Branch-2 ( Unreleased changes )
331331 HADOOP-3886. Error in javadoc of Reporter, Mapper and Progressable
332332 (Jingguo Yao via harsh)
333333
334+ HADOOP-8587. HarFileSystem access of harMetaCache isn't threadsafe. (eli)
335+
334336 BREAKDOWN OF HDFS-3042 SUBTASKS
335337
336338 HADOOP-8220. ZKFailoverController doesn't handle failure to become active
Original file line number Diff line number Diff line change 2424import java .net .URISyntaxException ;
2525import java .net .URLDecoder ;
2626import java .util .ArrayList ;
27- import java .util .EnumSet ;
2827import java .util .List ;
2928import java .util .Map ;
3029import java .util .TreeMap ;
3130import java .util .HashMap ;
31+ import java .util .concurrent .ConcurrentHashMap ;
3232
3333import org .apache .hadoop .conf .Configuration ;
3434import org .apache .hadoop .fs .permission .FsPermission ;
5252public class HarFileSystem extends FilterFileSystem {
5353 public static final int VERSION = 3 ;
5454
55- private static final Map <URI , HarMetaData > harMetaCache = new HashMap <URI , HarMetaData >();
55+ private static final Map <URI , HarMetaData > harMetaCache =
56+ new ConcurrentHashMap <URI , HarMetaData >();
5657
5758 // uri representation of this Har filesystem
5859 private URI uri ;
@@ -1055,7 +1056,7 @@ private void parseMetaData() throws IOException {
10551056 FileStatus archiveStat = fs .getFileStatus (archiveIndexPath );
10561057 archiveIndexTimestamp = archiveStat .getModificationTime ();
10571058 LineReader aLin ;
1058- String retStr = null ;
1059+
10591060 // now start reading the real index file
10601061 for (Store s : stores ) {
10611062 read = 0 ;
You can’t perform that action at this time.
0 commit comments