From a65c38840f75806eda0afb8a53aeada27e2e0e70 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 26 Jun 2009 05:26:18 +0000 Subject: [PATCH] HBASE-1580 Store scanner does not consult filter.filterRow at end of scan git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@788581 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ .../hadoop/hbase/regionserver/StoreScanner.java | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 053159786b1..0f0524cb402 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -230,6 +230,8 @@ Release 0.20.0 - Unreleased HBASE-1566 using Scan(startRow,stopRow) will cause you to iterate the entire table HBASE-1560 TIF can't seem to find one region + HBASE-1580 Store scanner does not consult filter.filterRow at end of scan + (Clint Morgan via Stack) IMPROVEMENTS HBASE-1089 Add count of regions on filesystem to master UI; add percentage diff --git a/src/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java b/src/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java index e59563efa3b..7a5a57ab27f 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java @@ -152,6 +152,10 @@ class StoreScanner implements KeyValueScanner, InternalScanner, ChangedReadersOb return true; case DONE_SCAN: + if (matcher.filterEntireRow()) { + // nuke all results, and then return. + results.clear(); + } close(); // copy jazz @@ -178,7 +182,12 @@ class StoreScanner implements KeyValueScanner, InternalScanner, ChangedReadersOb throw new RuntimeException("UNEXPECTED"); } } - + + if (matcher.filterEntireRow()) { + // nuke all results, and then return. + results.clear(); + } + if (!results.isEmpty()) { // copy jazz outResult.addAll(results);