gpt4 book ai didi

java - Hbase java.lang.NoClassDefFoundError:org/apache/hadoop/hbase/MasterNotRunningException

转载 作者:行者123 更新时间:2023-12-02 21:23:35 26 4
gpt4 key购买 nike

我正在使用运行hbase程序

java -classpath run.jar com.mycompany.app.HBaseImporter test2 /home/rahulko/Downloads/my-app/xaa



我像这样在hadoop.env.sh中指定了HADOOP_CLASSPATH
 for f in $HADOOP_HOME/contrib/capacity-scheduler/*.jar; do
if [ "$HADOOP_CLASSPATH" ]; then
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$f
else
export HADOOP_CLASSPATH=$f
fi
done


export HADOOP_CLASSPATH="$HBASE_HOME/lib/hbase-client-0.98.18-hadoop2.jar:\
$HBASE_HOME/lib/hbase-common-0.98.18-hadoop2.jar:\
$HBASE_HOME/lib/protobuf-java-2.5.0.jar:\
$HBASE_HOME/lib/guava-12.0.1.jar:\
$HBASE_HOME/lib/zookeeper-3.4.6.jar:\
$HBASE_HOME/lib/hbase-protocol-0.98.18-hadoop2.jar"

我也在bashrc中指定了
export CLASSPATH=$CLASSPATH:/usr/local/hbase1/lib/*:/usr/local/hadoop/share/hadoop/common/*

但是我仍然收到java.lang.NoClassDefFoundError:org / apache / hadoop / hbase / MasterNotRunningException

但是当我从eclipse运行时,程序成功运行

最佳答案

解决了

java -cp "run.jar:/usr/local/hbase1/lib/*" com.mycompany.app.HBaseImporter test2 /home/rahulko/Downloads/my-app/xaa

关于java - Hbase java.lang.NoClassDefFoundError:org/apache/hadoop/hbase/MasterNotRunningException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36687670/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com