From 74d6f312d6428f8848837ded72bd8e7ae3e3dbae Mon Sep 17 00:00:00 2001 From: Imran M Yousuf Date: Wed, 1 Sep 2010 09:13:55 +0600 Subject: [PATCH] Add filter config to determine whether to filter on row id only Signed-off-by: Imran M Yousuf --- .../smartitengineering/dao/impl/hbase/spi/FilterConfig.java | 6 ++++++ .../dao/impl/hbase/spi/impl/FilterConfigImpl.java | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/FilterConfig.java b/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/FilterConfig.java index 33b3cfc..1f21eb6 100644 --- a/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/FilterConfig.java +++ b/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/FilterConfig.java @@ -56,4 +56,10 @@ public interface FilterConfig { * @return True if range of cells, false if a single column */ boolean isQualifierARangePrefix(); + + /** + * We need a way to determine to add row filter and this config will give us just that. + * @return + */ + boolean isFilterOnRowId(); } diff --git a/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/impl/FilterConfigImpl.java b/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/impl/FilterConfigImpl.java index 3b14957..3350bb0 100644 --- a/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/impl/FilterConfigImpl.java +++ b/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/impl/FilterConfigImpl.java @@ -29,6 +29,11 @@ public class FilterConfigImpl implements FilterConfig { private byte[] columnFamily, columnQualifier; private boolean filterOnIfMissing, filterOnLatestVersionOnly, qualifierARangePrefix; + private boolean filterOnRowId; + + public void setFilterOnRowId(boolean filterOnRowId) { + this.filterOnRowId = filterOnRowId; + } public void setQualifierARangePrefix(boolean qualifierARangePrefix) { this.qualifierARangePrefix = qualifierARangePrefix; @@ -82,4 +87,9 @@ public class FilterConfigImpl implements FilterConfig { public boolean isQualifierARangePrefix() { return qualifierARangePrefix; } + + @Override + public boolean isFilterOnRowId() { + return filterOnRowId; + } } -- 2.11.4.GIT