hbase-commits mailing list archives

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

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

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

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java?rev=1509886&r1=1509885&r2=1509886&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
Fri Aug  2 22:07:03 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;
@@ -145,8 +146,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