import org.apache.hadoop.conf.Configuration;
File file01 = new File("/home/hadoop/etc/core-site.xml");
Configuration conf = new Configuration();
conf.addResource(file01.toURL());
为什么一直没有生效?
报错ZK还是连接到localhost:2181
15/09/09 09:50:49 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=90000 watcher=hconnection-0x7d741f2d, quorum=localhost:2181, baseZNode=/hbase
15/09/09 09:50:50 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
15/09/09 09:50:50 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 拒绝连接
|
|