hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hotec04 <hao.l...@dish.com>
Subject How to override the hbase-site.xml
Date Sun, 18 May 2014 21:03:37 GMT
Hi there,

I am trying to use an hbase-site.xml from other directory instead from class
path. But the the configuration.addResource() does not work. For example, I
have an hbase-site.xml sitting at catalina_home/hbase/hbase-site.xml, I used
configuration.addResource("{catalina.base}/hbase/hbase-site.xml"). It looks
like the addResource command does not override the hbase-site.xml while
createing the configuration by HBaseConfiguration.create(). It still looks
for hbase-site.xml from the class path and since there is none, it trys to
connect to localhose as default. 

log:
{2014-05-18 15:00:36,142} INFO  [http-bio-8080-exec-5-SendThread()]
(ClientCnxn.java:1061) - Opening socket connection to server
localhost/127.0.0.1:2181
{2014-05-18 15:00:36,145} INFO  [http-bio-8080-exec-5]
(RecoverableZooKeeper.java:104) - The identifier of this process is
xxxxxxxxxxx
{2014-05-18 15:00:37,151} WARN 
[http-bio-8080-exec-5-SendThread(localhost:2181)] (ClientCnxn.java:1188) -
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:1146)
{2014-05-18 15:00:37,309} WARN  [http-bio-8080-exec-5]
(RecoverableZooKeeper.java:219) - Possibly transient ZooKeeper exception:
org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
{2014-05-18 15:00:37,309} INFO  [http-bio-8080-exec-5]
(RetryCounter.java:53) - Sleeping 2000ms before retry #1...
{2014-05-18 15:00:37,815} INFO 
[http-bio-8080-exec-5-SendThread(localhost:2181)] (ClientCnxn.java:1061) -
Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181
{2014-05-18 15:00:37,815} ERROR
[http-bio-8080-exec-5-SendThread(localhost:2181)] (ClientCnxn.java:1076) -
Unable to open socket to localhost/0:0:0:0:0:0:0:1:2181
{2014-05-18 15:00:37,815} WARN 
[http-bio-8080-exec-5-SendThread(localhost:2181)] (ClientCnxn.java:1188) -
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:1071)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1104)

Code:
Configuration configuration =  HBaseConfiguration.create();
configuration.addResource("{catalina.base}/hadoop/hbase-site.xml");

Thank you in advance!



--
View this message in context: http://apache-hbase.679495.n3.nabble.com/How-to-override-the-hbase-site-xml-tp4059326.html
Sent from the HBase User mailing list archive at Nabble.com.

Mime
View raw message