hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Holstad (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-1249) Rearchitecting of server, client, API, key format, etc for 0.20
Date Fri, 08 May 2009 01:04:45 GMT

    [ https://issues.apache.org/jira/browse/HBASE-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707198#action_12707198
] 

Erik Holstad commented on HBASE-1249:
-------------------------------------

Been working on a new FilterInterface that will work better with the new server side implementation,
been thinking something like:

/**
 * Interface to be used for server side filtering for gets and scans.
 * The cases of wanting to not look at any more entries in the current store
 * and the case of always wanting to look at the filter should be handled with
 * the return codes from the individual filters. 
 *
 */
public interface FilterInterface extends Writable {

  final static int DONE = -1;
  final static int SKIP = 0;
  final static int INCLUDE = 1;
  
  /**
   * Resets the state of this filter. 
   */
  public void reset();
  
  /**
   * Filters the current row to see if it should be included in the result or
   * not.
   * @param bytes
   * @param rowOffset
   * @param rowLength
   * @return -1 if you are done and can return the result, 0 when not to include
   * in result and 1 if this row should be included. 
   */
  public int filterRow(byte [] bytes, int rowOffset, int rowLength);

  /**
   * Filters the current qualifier to see if it should be included in the result
   * or not.
   * @param bytes
   * @param qualifierOffset
   * @param qualifierLength
   * @return -1 if you are done and can return the result, 0 when not to include
   * in result and 1 if this row should be included
   */
  public int filterQualifier(byte [] bytes, int qfOffset, int qfLength);

  /**
   * Filters the current value to see if it should be included in the result or
   * not.
   * @param bytes
   * @param valueOffset
   * @param valueLength
   * @return -1 if you are done and can return the result, 0 when not to include
   * in result and 1 if this row should be included
   */
  public int filterValue(byte [] bytes, int valueOffset, int valueLength);
  
}

They way I see it work is while comparing the different parts of the KeyValue you after every
check do the matching filter check, to be able to early our as soon as possible. An extra
method for filterFamily can easily be added in the future if we choose to support multiple
families in the same store. 



> Rearchitecting of server, client, API, key format, etc for 0.20
> ---------------------------------------------------------------
>
>                 Key: HBASE-1249
>                 URL: https://issues.apache.org/jira/browse/HBASE-1249
>             Project: Hadoop HBase
>          Issue Type: Improvement
>            Reporter: Jonathan Gray
>            Priority: Blocker
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1249-Example-v1.pdf, HBASE-1249-Example-v2.pdf, HBASE-1249-GetQuery-v1.pdf,
HBASE-1249-GetQuery-v2.pdf, HBASE-1249-GetQuery-v3.pdf, HBASE-1249-GetQuery-v4.pdf, HBASE-1249-StoreFile-v1.pdf,
HBASE-1249-StoreFile-v4.pdf
>
>
> To discuss all the new and potential issues coming out of the change in key format (HBASE-1234):
zero-copy reads, client binary protocol, update of API (HBASE-880), server optimizations,
etc...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message