Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-6481

SkipFilter javadoc is incorrect

VotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.94.0
    • 0.95.0
    • None
    • None
    • Reviewed

    Description

      The javadoc for SkipFilter (http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/SkipFilter.html) states :

      A wrapper filter that filters an entire row if any of the KeyValue checks do not pass.

      But the example same javadocs gives to support this statement is wrong. The *scan.setFilter(new SkipFilter(new ValueFilter(CompareOp.EQUAL,
      new BinaryComparator(Bytes.toBytes(0))));* , will only emit rows which have all column values zero. In other words it is going to skip all rows for which
      ValueFilter(CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes(0))) does not pass , which happen to be all non zero valued cells.

      In the same example a ValueFilter created with CompareOp.NOT_EQUAL will filter out the rows which have a column value zero.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shrijeet Shrijeet Paliwal
            shrijeet Shrijeet Paliwal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment