What happened on the server?  Did you look at the regionserver logs?

You seem to be misusing the API. scan.addColumn("foobar") is incorrect, that is the old-API style (we should mark it deprecated or through a warning on it, if not there already).

I think what you were looking for was scan.addFamily("foobar"), and then match the qualifiers inside of it from col0 to col9?

Though extremely verbose, the way I would recommend doing that is:

scan.addColumn("foobar", "col0");
scan.addColumn("foobar", "col1");
...
scan.addColumn("foobar", "col9");

HBase is designed to select specific columns if you know what they are, and this gives HBase the best chance to optimize the query. This would really only make a different if you had a large number of columns as the filter would not early out but the explicit configuration would.

JG

Angus He wrote:
Hi everyone,

After running the following code:

        Scan scan = new Scan("0000".getBytes(), "9999".getBytes());
        scan.addColumn("foobar");
        scan.setFilter(new QualifierFilter(CompareOp.EQUAL, new
SubstringComparator("col[0-9]")));

        ResultScanner scanner = this.hTable.getScanner(scan);
        org.apache.hadoop.hbase.client.Result ret = scanner.next();

the program got blocked at "this.hTable.getScanner(scan)".
And it finally stopped with the following information:

org.apache.hadoop.hbase.client.RetriesExhaustedException: Trying to
contact region server 127.0.1.1:39941 for region
summary,,1252563328954, row '0000', but failed after 10 attempts.
Exceptions:
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException
java.io.IOException: Call to /127.0.1.1:39941 failed on local
exception: java.io.EOFException

        at 
org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getRegionServerWithRetries(HConnectionManager.java:994)
        at 
org.apache.hadoop.hbase.client.HTable$ClientScanner.nextScanner(HTable.java:1878)
        at 
org.apache.hadoop.hbase.client.HTable$ClientScanner.initialize(HTable.java:1824)
        at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:370)
        at com.longtuo.cactus.db.SummaryTable.testTest(SummaryTable.java:76)
        at com.longtuo.cactus.db.SummaryTable.main(SummaryTable.java:264)




Are there any constraints on the use of CompareFilter-derived filter
or it is just a bug?


Reply via email to