hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1538869 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
Date Tue, 05 Nov 2013 05:31:14 GMT
Author: stack
Date: Tue Nov  5 05:31:13 2013
New Revision: 1538869

URL: http://svn.apache.org/r1538869
Log:
HBASE-8942 DFS errors during a read operation (get/scan), may cause write outliers; REVERT

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1538869&r1=1538868&r2=1538869&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Tue
Nov  5 05:31:13 2013
@@ -2200,15 +2200,20 @@ public class Store extends SchemaConfigu
    * @throws IOException
    */
   public KeyValueScanner getScanner(Scan scan,
-    final NavigableSet<byte []> targetCols) throws IOException {
-    KeyValueScanner scanner = null;
-    if (getHRegion().getCoprocessorHost() != null) {
-      scanner = getHRegion().getCoprocessorHost().preStoreScannerOpen(this, scan, targetCols);
-    }
-    if (scanner == null) {
-      scanner = new StoreScanner(this, getScanInfo(), scan, targetCols);
+      final NavigableSet<byte []> targetCols) throws IOException {
+    lock.readLock().lock();
+    try {
+      KeyValueScanner scanner = null;
+      if (getHRegion().getCoprocessorHost() != null) {
+        scanner = getHRegion().getCoprocessorHost().preStoreScannerOpen(this, scan, targetCols);
+      }
+      if (scanner == null) {
+        scanner = new StoreScanner(this, getScanInfo(), scan, targetCols);
+      }
+      return scanner;
+    } finally {
+      lock.readLock().unlock();
     }
-    return scanner;
   }
 
   @Override



Mime
View raw message