Hi Your response is interesting to me. I've been chasing a problem and unable to figure out what is going on.
I have some java code written which uses the HBase API. I can run the app on a test system and it successfully stores data in an HBase table running on an instance of Cloudera's "training-vm". When I run the same app ( with appropriate changes to hbase-site.xml ) on a production server connecting to the real Hbase/Hadoop cluster I'm seeing the following. HTable successfully connects to the Zookeeper master. It tries to connect to /hbase/root-region-server and gets back a "failure to login" error Is configuring the client in the security group in the Hbase/Hadoop cluster to allow a client to connect general advice Or is that advice EC2 specific. Thanks Gary Gilbert -----Original Message----- From: Lars George [mailto:[email protected]] Sent: Saturday, December 04, 2010 11:03 AM To: [email protected] Subject: Re: Writing to HBase cluster on EC2 with Java client Hi Alex, You will need to add your client IP address (or - but not really recommmended - 0.0.0.0/0 for the world) into the Security Group that you used to start the cluster on EC2 and allow TCP access to a few ports that the client needs to communicate with HBase. For starters 2181 which is the ZooKeeper client port. Next is 60000, the master port plus 60020 for the RegionServers. Try those first and let us know if it works. Lars On Sat, Dec 4, 2010 at 5:19 PM, Nanheng Wu <[email protected]> wrote: > Thanks Vijay, I was thinking of using the Java client API. I guess my > question was, if I wanted to write a test program to load data into > HBase, can I run the program from a host that's not in EC2 (say like > my laptop)? I am wondering if there are anything special that need to > be done. > > On Sat, Dec 4, 2010 at 2:38 AM, Vijay > <[email protected]> wrote: >> Hi Alex, >> There is a better way that suits your requirements. >> You can use the HBase java client API. Detailed explanation with the sample >> code can be found here : >> http://hbase.apache.org/docs/current/api/org/apache/hadoop/hbase/client/pack age-summary.html#package_description >> >> Hope this helps. >> Vijay >> >> On Sat, Dec 4, 2010 at 3:43 PM, Vijay >> <[email protected]>wrote: >> >>> Hi Alex, >>> HBase exposes a REST interface named startgate. >>> You can find about it here >>> http://wiki.apache.org/hadoop/Hbase/Stargate >>> >>> The method of starting the REST server mentioned above seems to be >>> deprecated. >>> >>> With HBase 0.20.6 I was able to start it as follows >>> $HBASE_HOME/*bin/hbase org.apache.hadoop.hbase.stargate.Main* >>> >>> It is basically a jetty servlet container. >>> >>> There also seems to be a thrift interface for HBase. You could use the java >>> thrift client to access HBase. >>> >>> These are the methods I am aware of. There could be better methods too. >>> >>> I would be interested in knowing them too :) >>> >>> Thanks >>> Vijay >>> >>> >>> On Sat, Dec 4, 2010 at 12:59 PM, Nanheng Wu <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> I set up a small test hbase cluster on ec2. If I want to now store >>>> some data in the cluster from outside ec2 using the java client, what >>>> should I do? I am very new to hbase and ec2 so any help would be >>>> appreciated! >>>> >>>> Best, >>>> Alex >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------ >>> A. Vijayaraghavan >>> Senior Software Engineer >>> Mob : +91 99861 70810 >>> Informatica Business Solutions PVT LTD >>> "The Data Integration Company" (TM) >>> >> >> >> >> -- >> ------------------------------------------------------------ >> A. Vijayaraghavan >> Senior Software Engineer >> Mob : +91 99861 70810 >> Informatica Business Solutions PVT LTD >> "The Data Integration Company" (TM) >> >
