From 3d465b4dc46137d2b63946dc98ac7a85f050ccab Mon Sep 17 00:00:00 2001 From: Shrijeet Paliwal Date: Thu, 2 Aug 2012 12:07:13 -0700 Subject: [PATCH] HBASE-6481 SkipFilter javadoc is incorrect Change the example in javadoc to use CompareOp.NOT_EQUAL instead of CompareOp.EQUAL. To filter rows which have a cell with column value as 0, we need ValueFilter which fails such a cell, CompareOp.NOT_EQUAL operator will do the job. The Filter itself and the unit tests behave correctly only example needed a fix. --- .../org/apache/hadoop/hbase/filter/SkipFilter.java | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/SkipFilter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/SkipFilter.java index 29aa46e..a684906 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/SkipFilter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/SkipFilter.java @@ -40,10 +40,11 @@ import java.util.List; * with a {@link ValueFilter}: *

*

- * scan.setFilter(new SkipFilter(new ValueFilter(CompareOp.EQUAL,
+ * scan.setFilter(new SkipFilter(new ValueFilter(CompareOp.NOT_EQUAL,
  *     new BinaryComparator(Bytes.toBytes(0))));
  * 
- * Any row which contained a column whose value was 0 will be filtered out.
+ * Any row which contained a column whose value was 0 will be filtered out
+ * (since ValueFilter will not pass that KeyValue).
  * Without this filter, the other non-zero valued columns in the row would still
  * be emitted.
  */
-- 
1.7.7.5 (Apple Git-26)