hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Huang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-8677) Problems of fetching results by scanner interface(startup multi REST servers)
Date Mon, 03 Jun 2013 09:32:19 GMT
Eric Huang created HBASE-8677:

             Summary: Problems of fetching results by scanner interface(startup multi REST
                 Key: HBASE-8677
                 URL: https://issues.apache.org/jira/browse/HBASE-8677
             Project: HBase
          Issue Type: Bug
          Components: REST
    Affects Versions: 0.95.0, 0.94.5
         Environment: CentOS 5.5/hadoop0.20.2/hbase0.94.5/zookeeper3.4.3
            Reporter: Eric Huang

These days, I test one of available clients REST. When I startup two REST servers and put
these servers into Cluster instance using the REST client classes, I get the wrong results
by getScanner interface. 

Code like this(37, 38 are two rest servers):
        Cluster cluster = new Cluster();
        cluster.add("", 8080);
        cluster.add("", 8080);
        Client client = new Client(cluster);
        RemoteHTable table = new RemoteHTable(client, "demotime");
        ResultScanner resultScanner = table.getScanner(new Scan());
        for (Result result: resultScanner) {
            System.out.println("Scan row["+        Bytes.toString(result.getRow())+"]:"+result);

I find server-side codes of REST maybe the cause. They use "static final Map<String, ScannerInstanceResource>
scanners" to cache the last scanner context, so if there are multi REST servers, client may
navigate to the other server, which has not scanner conext of it and return the wrong results.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message