我試圖通過運行HMASTER類開始HBase的在想法,但我得到這個錯誤:HBase的 - FS關機無法抑制鉤
java.lang.RuntimeException: Failed suppression of fs shutdown hook: Thread[Thread-8,5,main]
at org.apache.hadoop.hbase.regionserver.ShutdownHook.suppressHdfsShutdownHook(ShutdownHook.java:196)
at org.apache.hadoop.hbase.regionserver.ShutdownHook.install(ShutdownHook.java:83)
at org.apache.hadoop.hbase.util.JVMClusterUtil.startup(JVMClusterUtil.java:191)
at org.apache.hadoop.hbase.LocalHBaseCluster.startup(LocalHBaseCluster.java:420)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:149)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:104)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2100)
FYI/etc/hosts文件僅包含
127.0.0.1 - machine name
這是核心的site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:8020</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/ubuntu/Desktop/hdfs/tmp</value>
</property>
</configuration>
和
HBase的-site.xml中
<configuration>
<property>
<name>hbase.rootdir</name>
<value>/usr/lib/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/usr/lib/zookeeper</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
</configuration>
感謝您的回答,但我嘗試從IntelliJ IDEA運行HBase而不使用腳本,因此它不適用於我。 –