我试图通过运行 HMaster 类在 IDEA 中启动 HBase,但出现此错误:
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)
仅供参考 /etc/hosts 文件仅包含
127.0.0.1 - 机器名称
这是core-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>