hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Seibold <seib...@in.tum.de>
Subject HBase: scanner with custom filter causes Exception
Date Mon, 09 Feb 2009 12:26:42 GMT

I want to create a scanner with a custom filter, but always get the
exception below.

1. I have implemented the RowFilterInterface:

public abstract class CustomFilter implements RowFilterInterface {

//...implemented method from interface RowFilterInterface

	public boolean filterRowKey(byte[] rowKey) {

//...implemented method from interface Writable
	public void write(DataOutput out) throws IOException {
	public void readFields(DataInput in) throws IOException {
		str = in.readUTF();

	public static CustomFilter read(DataInput in) throws IOException
		CustomFilter f = new CustomFilter();
		return f;

2. I create the scanner the following way:

RowFilterInterface customScanFilter = new CustomFilter();
table.getScanner(scanColumns, scanStartRow, customScanFilter);

3. I get the following exception in the region server:
ERROR org.apache.hadoop.hbase.regionserver.HRegionServer
: org.apache.hadoop.hbase.UnknownScannerException: Name: -1
INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handl
call next(-1, 30) from error: org.apache.hadoop.
hbase.UnknownScannerException: Name: -1
org.apache.hadoop.hbase.UnknownScannerException: Name: -1
        at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.hbase.ipc.HBaseRPC
        at org.apache.hadoop.hbase.ipc.HBaseServer

What am I doing wrong? Does the region server need the java source code
of my custom filter? Currently java source code of my custom filter is
only available on the client machine, not on the machine where the
region server is installed? How is this "mobile-code" via the Writable
interface supposed to work? How do I make my custom scanner available
for the region server?

Kind regards,

View raw message