HBASE-8942 DFS errors during a read operation (get/scan), may cause write outliers

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1538867 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-11-05 05:27:30 +00:00
parent 04bd8761b3
commit 8d3133aa0f
1 changed files with 14 additions and 9 deletions

View File

@ -1678,16 +1678,21 @@ public class HStore implements Store {
//////////////////////////////////////////////////////////////////////////////
@Override
public KeyValueScanner getScanner(Scan scan, final NavigableSet<byte[]> targetCols, long readPt)
throws IOException {
KeyValueScanner scanner = null;
if (this.getCoprocessorHost() != null) {
scanner = this.getCoprocessorHost().preStoreScannerOpen(this, scan, targetCols);
public KeyValueScanner getScanner(Scan scan,
final NavigableSet<byte []> targetCols, long readPt) throws IOException {
lock.readLock().lock();
try {
KeyValueScanner scanner = null;
if (this.getCoprocessorHost() != null) {
scanner = this.getCoprocessorHost().preStoreScannerOpen(this, scan, targetCols);
}
if (scanner == null) {
scanner = new StoreScanner(this, getScanInfo(), scan, targetCols, readPt);
}
return scanner;
} finally {
lock.readLock().unlock();
}
if (scanner == null) {
scanner = new StoreScanner(this, getScanInfo(), scan, targetCols, readPt);
}
return scanner;
}
@Override