hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goel, Ankur" <Ankur.G...@corp.aol.com>
Subject Filter omitting columns
Date Thu, 20 Mar 2008 14:23:44 GMT
   I am trying to obtain a set of rows by obtaining a scanner
on Htable. I also specify the RowFilterCriteria like this.

/* Code Start */
Map<Text, byte[]> columnFilter = new HashMap<Text, byte[]>();
columnFilter.put(new Text("status:"), getBytes(1));
RowFilterInterface rowFilter = new RegExpRowFilter(".*", columnFilter);

HTable myTable = new HTable(conf, new Text("myTable"));
Text[] columns = {new Text("url:"), new Text("status:")};
myTable.obtainScanner(columns, HConstants.EMPTY_START_ROW, rowFilter);
/* Code End */

When I scan the table, I only get 'status:' column family and its
The 'url:' family is not present.

In simple SQL the query translates to something like

SELECT url, status FROM mytable WHERE status=1;

What could be wrong ?

I eventually want to do something like this

SELECT url, status, date FROM mytable WHERE (status=1 or (status=2 and
[today's date] > date));

I have used RowFilterSet with RowFilterSet.Operation options to
accomplish this but the omission
of columns not on the filter column list by the filter beats me.


View raw message