Happybase filtering using rows function
<p>I would like to perform a <code>rows</code> query with Happybase for some known row keys and add a value filter so that only rows matching the filter are returned.</p>

<p>In HBase shell you can supply a filter to a get command, like so:</p>

<pre><code>get 'meta', 'someuser', {FILTER =&gt; "SingleColumnValueFilter ('cf','gender',=,'regexstring:^male$')"}
</code></pre>

<p>In Happybase you can add a filter to a <code>scan</code> command but I don't see the option on a <code>rows</code> query. Here is how it works for <code>scan</code>:</p>

<pre><code>rows = tab.scan(filter="SingleColumnValueFilter('cf','gender',=,'regexstring:^male$')")
</code></pre>

<p>Is there a way to perform a filtered <code>rows</code> query (for potentially random ordered row keys) using Happybase (or any other Python HBase client library)? </p>

<p>I imagined it would look like this (but there is no filter argument):</p>

<pre><code>rows = tab.rows(rows=['h_key', 'a_key', 'z_key'], filter="SingleColumnValueFilter('cf','gender',=,'regexstring:^male$')")
</code></pre>

<p><strong>Get with filter is equal to Scan with start/stop row.</strong></p>

<pre><code>rows = tab.scan(filter="SingleColumnValueFilter('cf','gender',=,'regexstring:^male$')",
                     row_start="someuser", row_stop="someuser")
</code></pre>

<p>In Java, a <code>FilterList</code> combined <code>MultiRowRangeFilter</code> and <code>SingleColumnValueFilte</code>r will perfectly satisfy your demand, and there is an <a href="https://github.com/sel-fish/hbase-experiments/blob/master/src/test/java/com/mogujie/mst/hbase/filters/RowFilterTest.java" rel="nofollow">example</a> about that. </p>

<p>However, as <code>happyhbase</code> use Hbase Thrift service, and it seems that <a href="http://hbase.apache.org/0.94/book/thrift.html" rel="nofollow">don't support</a> FilterList, so I think the best you can get is to call the above procedure for each key in your example.</p>

python hbase happybase