Harsh-
I can access HDFS directly from eclipse using "fs.default.name" but I want to
create a connection with Hbase so that I can perform Hbase specific task eg
create table etc from my eclipse directly.
I tried copying hbase-site.xml to my eclipse directory but still getting the
error :
Error :
11/09/07 17:54:39 INFO zookeeper.ClientCnxn: Opening socket connection to
server localhost/0:0:0:0:0:0:0:1:2181
11/09/07 17:54:39 WARN zookeeper.ClientCnxn: Session 0x0 for server null,
unexpected error, closing socket connection and attempting reconnect
java.net.SocketException: Address family not supported by protocol family:
connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:500)
at
org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1050)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1077)
11/09/07 17:54:40 INFO zookeeper.ClientCnxn: Opening socket connection to
server localhost/127.0.0.1:2181
11/09/07 17:54:41 WARN zookeeper.ClientCnxn: Session 0x0 for server null,
unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
11/09/07 17:54:42 INFO zookeeper.ClientCnxn: Opening socket connection to
server localhost/0:0:0:0:0:0:0:1:2181
11/09/07 17:54:42 WARN zookeeper.ClientCnxn: Session 0x0 for server null,
unexpected error, closing socket connection and attempting reconnect
-----Original Message-----
From: Harsh J [mailto:[email protected]]
Sent: Wednesday, September 07, 2011 5:45 PM
To: [email protected]
Subject: Re: Access Hbase server using Eclipse
Try setting "fs.default.name" instead. That's the one FileSystem would utilize.
The 'hbase.rootdir' prop is HBase-specific and wouldn't apply to hadoop
common/hdfs elements directly.
On Wed, Sep 7, 2011 at 5:41 PM, Stuti Awasthi <[email protected]> wrote:
> Hi,
>
> I have Hbase server on distant machine. I want to test my java code through
> my eclipse. So to achieve this I created Hbase connection :
>
> Code is :
> public static HBaseConfiguration conf = new
> HBaseConfiguration();
> conf.set("hbase.rootdir", "hdfs://<HBASE_SERVER_IP>:54310/hbase");
> FileSystem dfs = FileSystem.get(conf);
> String home= dfs.getHomeDirectory().toString();
> System.out.println(home);
>
> I get the output "file:/C:/Users/stutiawasthi", which is my windows home
> directory. How to establish connection with remote Hbase server ?
>
> Thanks & Regards
> Stuti Awasthi
>
>
>
> ________________________________
> ::DISCLAIMER::
> ----------------------------------------------------------------------
> -------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> It shall not attach any liability on the originator or HCL or its
> affiliates. Any views or opinions presented in this email are solely those of
> the author and may not necessarily reflect the opinions of HCL or its
> affiliates.
> Any form of reproduction, dissemination, copying, disclosure,
> modification, distribution and / or publication of this message
> without the prior written consent of the author of this e-mail is
> strictly prohibited. If you have received this email in error please delete
> it and notify the sender immediately. Before opening any mail and attachments
> please check them for viruses and defect.
>
> ----------------------------------------------------------------------
> -------------------------------------------------
>
--
Harsh J