You're right, something is broken.

Opened HBASE-1828. I attached a patch that adds an HTable-level unit test that fails.

You can follow along here: https://issues.apache.org/jira/browse/HBASE-1828

Thanks for finding this.

JG

Angus He wrote:
What happened on the server?  Did you look at the regionserver logs?

Since the test was done in standalone mode, there is nothing in
regionserver logs, and the master log does not have something useful
either.

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).

It is really shame to have made such a stupid mistake.

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

Right. After correcting the test code, unfortunately , it does not
help, the program still blocks on the call of getScanner.

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.

Thanks for the advice, JG.
In our case, the column qualifier is composed of different parts in
the form of "<d1v1>-<d2v1>-<d3v1>", each of these parts represents a
dimension which contains many types of value.   Dimension <d1> may
contain values: <v1>, <v2>, <v3>, for example.

Sometimes, we need to retrieve all the values in a dimension with
other dimensions with a specific value, likes <*>-<d2v1>-<d3v2>.

BTW, HRegionServer::openScanner is never got called when issuing the
scan request with CompareFilter-derived filters in it.

The underlying TCP connection used by the getScanner RPC reqeust is
always marked closed for the IOException thrown by the statement

int id = in.readInt(); (line 505 in HBaseClient.java)

in HBaseClient.Connection.receiveResponse.

Any suggestions?

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