hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject svn commit: r1509887 - /hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
Date Fri, 02 Aug 2013 22:07:11 GMT
Author: eclark
Date: Fri Aug  2 22:07:10 2013
New Revision: 1509887

URL: http://svn.apache.org/r1509887
Log:
HBASE-9087 Handlers being blocked during reads

Modified:
    hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java

Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java?rev=1509887&r1=1509886&r2=1509887&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
(original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
Fri Aug  2 22:07:10 2013
@@ -27,10 +27,11 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.NavigableSet;
+import java.util.Set;
 import java.util.SortedSet;
 import java.util.concurrent.Callable;
 import java.util.concurrent.CompletionService;
-import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorCompletionService;
 import java.util.concurrent.Future;
@@ -144,8 +145,8 @@ public class HStore implements Store {
   final List<StoreFile> filesCompacting = Lists.newArrayList();
 
   // All access must be synchronized.
-  private final CopyOnWriteArraySet<ChangedReadersObserver> changedReaderObservers
=
-    new CopyOnWriteArraySet<ChangedReadersObserver>();
+  private final Set<ChangedReadersObserver> changedReaderObservers =
+    Collections.newSetFromMap(new ConcurrentHashMap<ChangedReadersObserver, Boolean>());
 
   private final int blocksize;
   private HFileDataBlockEncoder dataBlockEncoder;



Mime
View raw message