[ 
https://issues.apache.org/jira/browse/HADOOP-2472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553722
 ] 

stack commented on HADOOP-2472:
-------------------------------

Edward, this would be a nice addition.

A few comments:

+ The new range facility needs to be added to help output
+ There is a define in HConstants for new Text("")
+ Filters are a little non-intuitive.  You create a stop filter if there is an 
end row but this needs to then wrapped in a WhileMatchRowFilter.  Otherwise, 
without it, when we hit the stop row, we don't return any new results but the 
scanner keeps going.  You need the WhileMatchRowFilter so as soon as we hit the 
stop row, the scanner is let go.  See line #514 of HTable for an example.

> [Hbase Shell] Range selection using filter
> ------------------------------------------
>
>                 Key: HADOOP-2472
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2472
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.16.0
>         Environment: All
>            Reporter: Edward Yoon
>            Assignee: Edward Yoon
>            Priority: Minor
>             Fix For: 0.16.0
>
>         Attachments: 2472.patch, 2472_v01.patch
>
>
> STARTING FROM 'start' [ TO 'stop' ]
> {code}
> hql > select * from temp_05 starting from 'ra' to 're';
> +-------------------------+-------------------------+-------------------------+
> | Row                     | Column                  | Cell                    
> |
> +-------------------------+-------------------------+-------------------------+
> | ra                      | a:                      | v                       
> |
> +-------------------------+-------------------------+-------------------------+
> | rb                      | a:                      | v                       
> |
> +-------------------------+-------------------------+-------------------------+
> | rc                      | a:                      | v                       
> |
> +-------------------------+-------------------------+-------------------------+
> | rd                      | a:                      | v                       
> |
> +-------------------------+-------------------------+-------------------------+
> 4 row(s) in set. (0.51 sec)
> {code}

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

Reply via email to