前些日子想試一試hbase,剛開始安裝了單擊版的,可是到最後建立表的時候出了錯誤,中間有一段時間作其餘的事情了,今天有空就把之前的hbase拿出來回憶回憶,html
我安裝的單擊版hbase是0.92.1的,下載完直接解壓,hbase-env文件中加了java
export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
hbase-site中shell
<configuration> <property> <name>hbase.rootdir</name> <value>file:///home/bigfish/myhbase1/</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/home/bigfish/myhbase1/zookeeper</value> </property> </configuration>
list命令能夠 status命令也能夠 可是建立表的時候出錯了apache
查看log文件下的日誌:oop
2014-08-28 10:28:06,791 WARN org.apache.hadoop.hbase.master.AssignmentManager: Unable to find a viable location to assign region -ROOT-,,0.70236052spa
org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed setting up proxy interface org.apache.hadoop.hbase.ipc.HRegionInterface to localhost/127.0.0.1:43673 after attempts=1
at org.apache.hadoop.hbase.ipc.HBaseRPC.waitForProxy(HBaseRPC.java:242)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1278)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1235)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getHRegionConnection(HConnectionManager.java:1222)
at org.apache.hadoop.hbase.master.ServerManager.getServerConnection(ServerManager.java:496)
at org.apache.hadoop.hbase.master.ServerManager.sendRegionOpen(ServerManager.java:429)
at org.apache.hadoop.hbase.master.AssignmentManager.assign(AssignmentManager.java:1592)
at org.apache.hadoop.hbase.master.AssignmentManager.assign(AssignmentManager.java:1329)
at org.apache.hadoop.hbase.master.AssignCallable.call(AssignCallable.java:44)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection refused.net
說的是ip地址不能正確映射,gedit /etc/hosts查看 發現
日誌
localhost 127.0.0.1code
bigfish 127.0.1.1htm
二者不一值,都改成 127.0.0.1 而後重啓hbase 而後就能搞建立表了。