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
