hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: HBase MR with Filter
Date Tue, 18 May 2010 16:35:25 GMT
On Tue, May 18, 2010 at 9:25 AM, Patrick Datko <patrick.datko@ymc.ch> wrote:
> 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