Hi Gagan, Obvious question but have you made that configuration available by some sort of web-server on the host/port combination you specified? Can you do a wget for that URL? It'll probably look something like:
http://<yourIP>:<yourPort>/opt/habse-0.20.4/conf/hbase-site.xml (i'm reluctant to create the real URL as who knows where that link goes on the wider internet!) from what you specified above. If you get no response, that's probably why you can't see the config. I've assumed you're on linux. In windows you might just have to type that into a browser. A way that I use to distribute my hadoop config is to mount the master config directory on each of the nodes of the cluster. Thanks, Jamie On 21 July 2010 10:24, gagansnt <[email protected]> wrote: > > I have written a simple Java application to use functionality provided by > HBaseAdmin class. When I am running my application on master machine works > well. following is the code to access config files- > > HBaseConfiguration config = new HBaseConfiguration(); > config.addResource(new Path("/opt/habse-0.20.4/conf/hbase-site.xml")); > config.addResource(new Path("/opt/habse-0.20.4/conf/hbase-default.xml")); > > Problem is when I try to connect from other machine then I am unable to read > these configurations. I am using following code - > > private final String host="172.16.5.84"; > private final int port=2181; > private final String protocol = "http"; > > HBaseConfiguration config = new HBaseConfiguration(); > config.addResource(new > URL(protocol,host,port,/opt/habse-0.20.4/conf/hbase-site.xml)); > config.addResource(new > URL(protocol,host,port,/opt/habse-0.20.4/conf/hbase-default.xml)); > > I am getting exception - > FATAL conf.Configuration: error parsing conf file: java.net.SocketException: > Unexpected end of file from server > Exception in thread "main" java.lang.RuntimeException: > java.net.SocketException: Unexpected end of file from server > at > org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1162) > at > org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1040) > at > org.apache.hadoop.conf.Configuration.getProps(Configuration.java:980) > at > org.apache.hadoop.conf.Configuration.iterator(Configuration.java:1016) > at > org.apache.hadoop.hbase.HBaseConfiguration.hashCode(HBaseConfiguration.java:63) > at java.util.HashMap.getEntry(HashMap.java:344) > at java.util.LinkedHashMap.get(LinkedHashMap.java:280) > at > org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:116) > at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:68) > at net.smithmicro.hbase.JHBaseAdmin.initConfig(JHBaseAdmin.java:55) > at net.smithmicro.hbase.JHBaseAdmin.main(JHBaseAdmin.java:40) > > > Not sure I am missing anything. Kindly help me out. > Thanks in advance. > Gagan > -- > View this message in context: > http://old.nabble.com/Accessing-HBase-conf-folder-from-other-machine-tp29223571p29223571.html > Sent from the HBase User mailing list archive at Nabble.com. > >
