hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Huang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8677) Problems of fetching results by scanner interface(startup multi REST servers)
Date Tue, 04 Jun 2013 07:30:20 GMT

    [ https://issues.apache.org/jira/browse/HBASE-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13674135#comment-13674135
] 

Eric Huang commented on HBASE-8677:
-----------------------------------

Oh, there are some solutions recommended? If we can not startup multiple servers, how I can
make full use of loading balacne, such as Nginx?
                
> Problems of fetching results by scanner interface(startup multi REST servers)
> -----------------------------------------------------------------------------
>
>                 Key: HBASE-8677
>                 URL: https://issues.apache.org/jira/browse/HBASE-8677
>             Project: HBase
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 0.94.5, 0.95.0
>         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("10.28.171.37", 8080);
>         cluster.add("10.28.171.38", 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

Mime
View raw message