我有点陷入设置HBASE-STANDALONE。
基本上,我已经创建了一个Jar-with-Dependencies,我使用Cygwin启动它,但我想配置不正常。
我想我应该在HBASE-SITE.XML中设置某种设置,但我不知道将它放在JAR中的位置以及要指定的内容。你能帮忙吗?
我说的是因为我在JAR中运行脚本应该启动HMASTER但是当我启动服务器时出现了错误(我得到HMaster线程退出)。
然后我在Eclipse中运行一些Java代码,其中一些是:
Configuration config = HBaseConfiguration.create();
config.set("hbase.zookeeper.quorum", "localhost"+":"+zookeeperPort);
HBaseAdmin admin = new HBaseAdmin(config);
但是我收到了一个错误。
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.2-1221870, built on 12/21/2011 20:46 GMT
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:host.name=ELONW115381.emea.bankofamerica.com
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_26
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:java.home=C:\Program Files\Java\jre6
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=C:\DOCUME~1\NBKFIYP\LOCALS~1\temp\
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:os.name=Windows XP
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:os.arch=x86
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:os.version=5.1
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:user.name=NBKFIYP
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:user.home=H:\apps\xp
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Client environment:user.dir=H:\STS_WORKPROJECT\RenjinSimple
12/05/18 14:42:31 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
12/05/18 14:42:31 INFO zookeeper.ClientCnxn: Opening socket connection to server /127.0.0.1:2181
12/05/18 14:42:31 INFO zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session
12/05/18 14:42:31 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 2248@ELONW115381
12/05/18 14:42:31 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x137602e3b720002, negotiated timeout = 40000
12/05/18 14:42:31 INFO client.HConnectionManager$HConnectionImplementation: ZooKeeper available but no active master location found
12/05/18 14:42:31 INFO client.HConnectionManager$HConnectionImplementation: getMaster attempt 0 of 10 failed; retrying after sleep of 1000
org.apache.hadoop.hbase.MasterNotRunningException
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:634)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:106)
at com.Store.HBaseBase.<init>(HBaseBase.java:28)
at com.Store.HBaseBase.<init>(HBaseBase.java:22)
at com.Store.HBaseBase.main(HBaseBase.java:46)
12/05/18 14:42:32 INFO client.HConnectionManager$HConnectionImplementation: ZooKeeper available but no active master location found
12/05/18 14:42:32 INFO client.HConnectionManager$HConnectionImplementation: getMaster attempt 1 of 10 failed; retrying after sleep of 1000
org.apache.hadoop.hbase.MasterNotRunningException
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:634)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:106)
at com.Store.HBaseBase.<init>(HBaseBase.java:28)
at com.Store.HBaseBase.<init>(HBaseBase.java:22)
at com.Store.HBaseBase.main(HBaseBase.java:46)
12/05/18 14:42:33 INFO client.HConnectionManager$HConnectionImplementation: ZooKeeper available but no active master location found
12/05/18 14:42:33 INFO client.HConnectionManager$HConnectionImplementation: getMaster attempt 2 of 10 failed; retrying after sleep of 1000