我对Hadoop和Hbase非常陌生。我正在尝试从java代码创建一个表,并连接到我的远程服务器(Hbase),它是(172.80.72.86)。它是一台linux机器(172.80.72 86)。我尝试了上面的
我得到以下错误
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.3.5-1301095, built on 03/15/2012 19:48 GMT
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:host.name=user-8329a7141c
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_25
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:java.home=C:Program FilesJavajre6
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:java.class.path=D:workspaceHbasebin;C:Documents and SettingsuserDesktopHAdoopjarscommons-cli-1.2.jar;C:Documents and SettingsuserDesktopHAdoopjarscommons-logging-1.1.1.jar;C:Documents and SettingsuserDesktopHAdoopjarslog4j-1.2.16.jar;C:Documents and SettingsuserDesktopHAdoopjarslibhbase-dsl-0.1.2-SNAPSHOT.jar;C:Documents and SettingsuserDesktopHAdoopjarslibcommons-lang-2.5.jar;C:Documents and SettingsuserDesktopHAdoopjarslibcommons-logging-api-1.1.jar;C:Documents and SettingsuserDesktopHAdoopjarslibhadoop-core-0.20.2.jar;C:Documents and SettingsuserMy DocumentsDownloadsslf4j-1.6.6slf4j-api-1.6.6.jar;C:Documents and SettingsuserMy DocumentsDownloadsslf4j-1.6.6slf4j-log4j12-1.6.6.jar;C:Documents and SettingsuserDesktopHAdoopjarslibhbase-0.92.1.jar;C:Documents and SettingsuserDesktopHAdoopjarslibzookeeper-3.3.5.jar
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:java.library.path=C:Program FilesJavajre6bin;.;C:WINDOWSSunJavabin;C:WINDOWSsystem32;C:WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:WINDOWSsystem32;D:oracleproduct10.2.0db_1bin;C:Program FilesApache Software FoundationTomcat 6.0libservlet-api.jar;D:Pervasive StuffNew Training stuffdatarush-6.0.0-26bin;C:Program FilesJavajdk1.6.0_25bin;C:Program Filesgrails-2.0.4bin;.;
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=C:DOCUME~1userLOCALS~1Temp
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:os.name=Windows XP
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:os.arch=x86
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:os.version=5.1
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:user.name=user
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:user.home=C:Documents and Settingsuser
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Client environment:user.dir=D:workspaceHbase
12/08/22 14:06:49 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
12/08/22 14:06:50 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:06:50 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 3416@user-8329a7141c
12/08/22 14:06:50 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:06:51 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
12/08/22 14:06:51 INFO util.RetryCounter: The 1 times to retry after sleeping 2000 ms
12/08/22 14:06:52 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:06:53 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:06:53 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
12/08/22 14:06:53 INFO util.RetryCounter: The 2 times to retry after sleeping 4000 ms
12/08/22 14:06:54 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:06:55 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:06:57 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:06:58 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:06:58 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
12/08/22 14:06:58 INFO util.RetryCounter: The 3 times to retry after sleeping 8000 ms
12/08/22 14:07:00 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:01 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:02 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:03 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:05 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:06 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:06 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
12/08/22 14:07:06 ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries
12/08/22 14:07:06 WARN zookeeper.ZKUtil: hconnection Unable to set watcher on znode /hbase/master
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:580)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:06 ERROR zookeeper.ZooKeeperWatcher: hconnection Received unexpected KeeperException, re-throwing exception
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:580)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:06 FATAL client.HConnectionManager$HConnectionImplementation: Unexpected exception during initialization, aborting
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:580)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:08 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:09 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:09 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
12/08/22 14:07:09 INFO util.RetryCounter: The 1 times to retry after sleeping 2000 ms
12/08/22 14:07:10 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:11 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:11 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
12/08/22 14:07:11 INFO util.RetryCounter: The 2 times to retry after sleeping 4000 ms
12/08/22 14:07:12 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:13 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:15 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:16 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:16 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
12/08/22 14:07:16 INFO util.RetryCounter: The 3 times to retry after sleeping 8000 ms
12/08/22 14:07:18 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:19 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:20 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:21 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:23 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:24 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:25 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
12/08/22 14:07:26 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(Unknown Source)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
12/08/22 14:07:26 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
12/08/22 14:07:26 ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries
12/08/22 14:07:26 WARN zookeeper.ZKUtil: hconnection Unable to set watcher on znode /hbase/root-region-server
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:583)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:26 ERROR zookeeper.ZooKeeperWatcher: hconnection Received unexpected KeeperException, re-throwing exception
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:583)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
at HBaseConnector.main(HBaseConnector.java:20)
12/08/22 14:07:26 FATAL client.HConnectionManager$HConnectionImplementation: Unexpected exception during initialization, aborting
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:815)
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:583)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:194)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
at HBaseConnector.main(HBaseConnector.java:20)
Exception in thread "main" java.io.IOException: org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@b61fd1 closed
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:794)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:782)
at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:249)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:213)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
at HBaseConnector.main(HBaseConnector.java:20)
指定动物园管理员IP并继续。客户端Pc必须知道动物园管理员在哪里运行。
在程序中的"配置"旁边附加以下行
config.set("hbase.zookeeper.quorum", "172.80.72.86"); // Your remote Pc where the zookeeper is running. Mention the port if needed."172.80.72.86:60020"
更好的方法是加载配置文件,而不是手动放置。
当得到错误"Session 0x0 for server null"时,其中一个可能的问题是您的HBase代码不知道在哪里连接。解决这个问题的最佳方法是加载hbase-site.xml配置文件。
Configuration config = HBaseConfiguration.create();
config.addResource(new Path("/XXXX/hbase/hbase-0.98.9/conf/hbase-site.xml"));