hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Datko <patrick.da...@ymc.ch>
Subject HBase MR with Filter
Date Tue, 18 May 2010 16:25:46 GMT
Hey,

i'm building a Map Reduce Job which should get Data from a HBase Table
filter it an store the reduced data in another HBase Table. I used the
SingleColumnValueFilter to limit the Data that will be commit to the
Map-Process. The Problem is, the Filter doesn't reduce the Data but
commit all Data in the Table to the Map Process:

The code looks like this for the Filter:

Scan scan = new Scan();
String columns = "details";
String qualifier = "details:page";
String value = "5";
scan.setFilter(new SingleColumnValueFilter(Bytes.toBytes(columns),
Bytes.toBytes(qualifier), CompareOp.EQUAL, Bytes.toBytes("5")));
TableMapReduceUtil.initTableMapperJob("books", scan, mapper.class,
ImmutableBytesWritable.class, IntWritable.class, job);


And this was my Code for filling the Table:

Put put = new Put(rowkey);
put.add(Bytes.toBytes("details"), Bytes.toBytes("page"),
Bytes.toBytes(rand.nextInt(20)));

and I didn't understand why the filter doesn't work! I hope anybody can
help me.

Best regards,
Patrick




Mime
View raw message