Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 30727CA21 for ; Tue, 4 Jun 2013 07:30:23 +0000 (UTC) Received: (qmail 89983 invoked by uid 500); 4 Jun 2013 07:30:22 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 89707 invoked by uid 500); 4 Jun 2013 07:30:22 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 89692 invoked by uid 99); 4 Jun 2013 07:30:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jun 2013 07:30:20 +0000 Date: Tue, 4 Jun 2013 07:30:20 +0000 (UTC) From: "Eric Huang (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-8677) Problems of fetching results by scanner interface(startup multi REST servers) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 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