Hi,

I'm not sure how the method filterRowKey(byte[] rowKey) of the
RowFilterInterface works.

I have the feeling that this method may be called with null as parameter
by HBase. When is the rowKey Parameter null and why?

I have used the following custom filter to verify this:

public class HFilter implements RowFilterInterface {

        public HFilter() {
                
        }

        public boolean filterRowKey(byte[] rowKey) {
                if (rowKey == null) {
                        throw new RuntimeException("rowKey == null");
                }
                return false;
        }
}

After a while I get the following exception:

192.168.0.11:32806: error: java.io.IOException:
java.lang.RuntimeException: rowKey == null
java.io.IOException: java.lang.RuntimeException: rowKey == null
        at
org.apache.hadoop.hbase.regionserver.HRegionServer.convertThrowableToIOE(HRegionServer.java:687)
        at
org.apache.hadoop.hbase.regionserver.HRegionServer.convertThrowableToIOE(HRegionServer.java:677)
        at
org.apache.hadoop.hbase.regionserver.HRegionServer.next(HRegionServer.java:1586)
        at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

I tried this with HBase 0.19.0 and HDFS (Hadoop 0.19.0) running together
on 1 server.

That's why I got the feeling that the method filterRowKey may be called
with null as parameter by HBase. I don't understand why this should
happen. Is null a special case that I have to handle in this method?

Kind regards,
Michael

Reply via email to