Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7EA49F67 for ; Tue, 29 May 2012 13:47:45 +0000 (UTC) Received: (qmail 87793 invoked by uid 500); 29 May 2012 13:47:44 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 87637 invoked by uid 500); 29 May 2012 13:47:43 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 87629 invoked by uid 99); 29 May 2012 13:47:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 May 2012 13:47:43 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ananthu2050@gmail.com designates 209.85.213.41 as permitted sender) Received: from [209.85.213.41] (HELO mail-yw0-f41.google.com) (209.85.213.41) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 May 2012 13:47:35 +0000 Received: by yhr47 with SMTP id 47so3227552yhr.14 for ; Tue, 29 May 2012 06:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=oj/zNdt4K6XLj/LlLWJMeBlKvJ4vSwdFeDwUDN5oFeM=; b=BJUmI6WPMhVuGNpc0qqsuXDb8oRdUbe44R8IJzbYPMcFRaosWVSpGYLIapYl3YryS/ gRFi0SQk79KBNPeCWnghTXPTJ8iw2Xu0Kau6ZGC0xBaH/dFSsTUE1oViUUyAEwHQuQOV rIuvXuXwMVc1O8cIn5CqccV3venZxt6kym1FgHz+DGLwye9Pw3c/n/GgTs2kkwd/kDUp eSRL4mOrD97ZhLY+fvivJeJyheNIUTBZIb2BjTE4fli8NlVddyjzARdC1ZBECg2iz9QC 6ip3e9dMQKxWQcQOaLB8SmE6bQWunWRa7DbSWZL0+nHQqUCCUtc505ZnoxEOS3huEric d4ug== Received: by 10.101.141.35 with SMTP id t35mr2789970ann.31.1338299234885; Tue, 29 May 2012 06:47:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.79.8 with HTTP; Tue, 29 May 2012 06:46:41 -0700 (PDT) In-Reply-To: References: From: AnandaVelMurugan Chandra Mohan Date: Tue, 29 May 2012 19:16:41 +0530 Message-ID: Subject: Re: Issues with Java sample for connecting to remote Hbase To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=0016e6d386f07fa05804c12d1280 --0016e6d386f07fa05804c12d1280 Content-Type: text/plain; charset=ISO-8859-1 Thanks for the response. It still errors out. On Tue, May 29, 2012 at 7:05 PM, Mohammad Tariq wrote: > change the name from "localhost" to something else in the line > "10.78.32.131 honeywel-4a7632 localhost" and see if it works > > Regards, > Mohammad Tariq > > > On Tue, May 29, 2012 at 6:59 PM, AnandaVelMurugan Chandra Mohan > wrote: > > I have HBase version 0.92.1 running in standalone mode. I created a table > > and added few rows using hbase shell. Now I am developing a standalone > java > > application to connect to Hbase and retrieve the data from the table. > > * > > This is the code I am using > > * > > Configuration config = HBaseConfiguration.create(); > > config.clear(); > > config.set("hbase.zookeeper.quorum", "10.78.32.131"); > > config.set("hbase.zookeeper.property.clientPort","2181"); > > config.set("hbase.master", "10.78.32.131:60010"); > > > > HBaseAdmin.checkHBaseAvailable(config); > > > > > > // This instantiates an HTable object that connects you to > > the "myTable" > > // table. > > HTable table = new HTable(config, "asset"); > > > > Get g = new Get(Bytes.toBytes("APU 331-350")); > > Result r = table.get(g); > > > > *This is the content of my /etc/hosts file* > > > > #127.0.0.1 localhost.localdomain localhost > > #10.78.32.131 honeywel-4a7632 > > #127.0.1.1 honeywel-4a7632 > > ::1 honeywel-4a7632 localhost6.localdomain6 localhost6 > > 10.78.32.131 honeywel-4a7632 localhost > > * > > This is part of my error stack trace* > > > > 12/05/29 18:53:33 INFO > client.HConnectionManager$HConnectionImplementation: > > getMaster attempt 0 of 1 failed; no more retrying. > > java.net.ConnectException: Connection refused: no further information > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) > > at > > > org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206) > > at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:489) > > at > > > org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupConnection(HBaseClient.java:328) > > at > > > org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:362) > > at > > > org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:1045) > > at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:897) > > at > > > org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:150) > > at $Proxy5.getProtocolVersion(Unknown Source) > > at > > > org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.java:183) > > at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:303) > > at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:280) > > at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:332) > > at > > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:642) > > at > org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:106) > > at > > > org.apache.hadoop.hbase.client.HBaseAdmin.checkHBaseAvailable(HBaseAdmin.java:1553) > > at hbaseMain.main(hbaseMain.java:27) > > 12/05/29 18:53:33 INFO > client.HConnectionManager$HConnectionImplementation: > > Closed zookeeper sessionid=0x13798c3ce190003 > > 12/05/29 18:53:33 INFO zookeeper.ZooKeeper: Session: 0x13798c3ce190003 > > closed > > 12/05/29 18:53:33 INFO zookeeper.ClientCnxn: EventThread shut down > > > > Can some one help me fix this? Thanks a lot. > > -- > > Regards, > > Anand > -- Regards, Anand --0016e6d386f07fa05804c12d1280--