hbase启动找不到主类

2021-07-01 10:31:04 浏览数 (1)

首先来说说遇到的问题

: 错误: 找不到或无法加载主类 .Library.Java.JavaVirtualMachines.jdk1.8.0_291.jdk.Contents.Home.bin.java

下面来看一下配置

代码语言:javascript复制
//conf/hbase-env.sh
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Hom
# Tell HBase whether it should manage it's own instance of ZooKeeper or not
export HBASE_MANAGES_ZK=false

另一个配置是hbase-site.xml

代码语言:javascript复制
//hbase-site.xml
 <property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost:9000/hbase</value>
  </property>

  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>
  <property>
    <name>hbase.tmp.dir</name>
    <value>/apps/log/hbase</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>false</value>
  </property>
  <property>
    <name>hbase.zookeeper.quorum</name>
    <value>localhost:3181</value>
  </property>
  <property>
    <name>hbase.wal.provider</name>
    <value>filesystem</value>
  </property>

启动

bin/start-hbase.sh

查询了半天,最终发现注释掉环境变量中的hadoop相关的配置就OK了

代码语言:javascript复制
//vim ~/.zshrc
#export HADOOP_HOME=/apps/install/hadoop-2.10.1
#export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
#export YARN_CONF_DIR=$HADOOP_HOME/etc/hadoop

0 人点赞