Return-Path: Delivered-To: apmail-hadoop-hbase-user-archive@locus.apache.org Received: (qmail 48776 invoked from network); 27 May 2008 16:53:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 May 2008 16:53:59 -0000 Received: (qmail 26661 invoked by uid 500); 27 May 2008 16:54:00 -0000 Delivered-To: apmail-hadoop-hbase-user-archive@hadoop.apache.org Received: (qmail 26642 invoked by uid 500); 27 May 2008 16:54:00 -0000 Mailing-List: contact hbase-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-user@hadoop.apache.org Delivered-To: mailing list hbase-user@hadoop.apache.org Received: (qmail 26631 invoked by uid 99); 27 May 2008 16:54:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2008 09:54:00 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.203.238.117] (HELO dns.duboce.net) (63.203.238.117) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2008 16:53:12 +0000 Received: by dns.duboce.net (Postfix, from userid 1008) id 9208CC51D; Tue, 27 May 2008 08:23:37 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-26) on dns.duboce.net X-Spam-Level: Received: from durruti.local (durruti.desk.hq.powerset.com [208.84.6.177]) by dns.duboce.net (Postfix) with ESMTP id AA70AC518 for ; Tue, 27 May 2008 08:23:32 -0700 (PDT) Message-ID: <483C3C78.8040406@duboce.net> Date: Tue, 27 May 2008 09:53:12 -0700 From: stack User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: hbase-user@hadoop.apache.org Subject: Re: How to access data from HBase on Tomcat ? References: <2af70f430805231819p483386aemf09dcb4086e85952@mail.gmail.com> <31a243e70805231827ma63dfe2lf74ff2d9d0950e33@mail.gmail.com> <2af70f430805250241n678fa2ebx103b1312a4dbabf9@mail.gmail.com> <4839B62A.1000400@duboce.net> <2af70f430805251905i15dce797nf4c564abd91af6d3@mail.gmail.com> <483B16FE.20408@duboce.net> <2af70f430805270709j284b56edk3525699c1a812dc6@mail.gmail.com> In-Reply-To: <2af70f430805270709j284b56edk3525699c1a812dc6@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.4 $HBASE_HOME/bin/shell --master:COMPUTERB_IP:60000 St.Ack ma qiang wrote: > Sorry. How to connect to computer B using hbase shell on computer A? > Thanks ! > > > > On Tue, May 27, 2008 at 4:01 AM, stack wrote: > >> Can you run an hbase shell on computer A and connect to computer B? Does it >> work? Perhaps you networking is wonky on computer A? When you specify >> hbase.master, you do it as follows: >> >> conf.set("hbase.master", "192.168.1.1:60000"); >> >> ... with no spaces around the IP as you have in your sample below? >> >> St.Ack >> >> >> ma qiang wrote: >> >>> I just wrote a simplest java class which read data form remote hbase, >>> the code as below; >>> >>> >>> HBaseConfiguration conf=new HBaseConfiguration(); >>> conf.set("hbase.master", "remote computer ip : 60000"); >>> HTable hTable=new HTable(conf, new Text(table name)); >>> >>> finally system print as follow: >>> 08/05/26 10:03:41 INFO ipc.Client: Retrying connect to server: >>> /127.0.1.1:60020. Already tried 1 time(s). >>> 08/05/26 10:04:03 INFO ipc.Client: Retrying connect to server: >>> /127.0.1.1:60020. Already tried 2 time(s). >>> 08/05/26 10:04:25 INFO ipc.Client: Retrying connect to server: >>> /127.0.1.1:60020. Already tried 3 time(s). >>> >>> >>> >>> >>> On Mon, May 26, 2008 at 2:55 AM, stack wrote: >>> >>> >>>> I'd guess computer A is not finding your customizations of hbase.master >>>> in >>>> your hbase-site.xml and instead its picking up the default setting for >>>> hbase.master (localhost). You could try manually setting computerB as >>>> hbase.master on the HBaseConfiguration you create to pass >>>> HTable/HBaseAdmin >>>> in your webapp context to verify this is indeed the case. >>>> >>>> Where is your hbase-site.xml currently? Is it bundled into your webapp? >>>> If >>>> so, at what location? >>>> >>>> St.Ack >>>> >>>> ma qiang wrote: >>>> >>>> >>>>> Hi, >>>>> Thank you for your reply so much! >>>>> I meet this problem. My program which read data from hbase run on >>>>> computer A, and the hbase deployed on computer B. >>>>> whatever I set the path in the HBaseConfiguration object in my >>>>> program, the program always read data from local computer A not to >>>>> read data from computer B. Can you tell me why and how to resolve this >>>>> problem ? >>>>> Thank you ! >>>>> >>>>> >>>>> >>>>> On Sat, May 24, 2008 at 9:27 AM, Jean-Daniel Cryans >>>>> wrote: >>>>> >>>>> >>>>> >>>>>> Hi maqiang, >>>>>> >>>>>> When you're running your webapp, using client's classes like HTable >>>>>> will >>>>>> require you to have a HBaseConfiguration object. When instantiated, it >>>>>> expects you to have hbase-site.xml in your path and then reads from it >>>>>> to >>>>>> obtain the master's adress and thus you can get your data. >>>>>> >>>>>> Jean-Daniel >>>>>> >>>>>> 2008/5/23 ma qiang : >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Hi all, >>>>>>> In my web app based on Tomcat, the server read data from HBase >>>>>>> then return these to client as a response. , Who can tell me how? >>>>>>> Thank you very much! >>>>>>> >>>>>>> Best wishes ! >>>>>>> maqiang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>> >>