hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject hbase git commit: HBASE-18220 - Addendum as per Duo suggestion for readability (Ram)
Date Fri, 16 Jun 2017 07:05:55 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 ac2018e27 -> 7c15e5700


HBASE-18220 - Addendum as per Duo suggestion for readability (Ram)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7c15e570
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7c15e570
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7c15e570

Branch: refs/heads/branch-2
Commit: 7c15e57005c243d72b2228fadc959f301f9daa03
Parents: ac2018e
Author: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
Authored: Fri Jun 16 12:34:08 2017 +0530
Committer: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
Committed: Fri Jun 16 12:35:38 2017 +0530

----------------------------------------------------------------------
 .../apache/hadoop/hbase/regionserver/StoreScanner.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/7c15e570/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
index 985af4b..9849c93 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
@@ -190,6 +190,11 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
     if (get) {
       this.readType = Scan.ReadType.PREAD;
       this.scanUsePread = true;
+    } else if(scanType != scanType.USER_SCAN) {
+      // For compaction scanners never use Pread as already we have stream based scanners
on the
+      // store files to be compacted
+      this.readType = Scan.ReadType.STREAM;
+      this.scanUsePread = false;
     } else {
       if (scan.getReadType() == Scan.ReadType.DEFAULT) {
         this.readType = scanInfo.isUsePread() ? Scan.ReadType.PREAD : Scan.ReadType.DEFAULT;
@@ -198,12 +203,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
       }
       // Always start with pread unless user specific stream. Will change to stream later
if
       // readType is default if the scan keeps running for a long time.
-      if (scanType != ScanType.COMPACT_DROP_DELETES
-          && scanType != ScanType.COMPACT_RETAIN_DELETES) {
-        // For compaction scanners never use Pread as already we have stream based scanners
on the
-        // store files to be compacted
-        this.scanUsePread = this.readType != Scan.ReadType.STREAM;
-      }
+      this.scanUsePread = this.readType != Scan.ReadType.STREAM;
     }
     this.preadMaxBytes = scanInfo.getPreadMaxBytes();
     this.cellsPerHeartbeatCheck = scanInfo.getCellsPerTimeoutCheck();


Mime
View raw message