您好,登录后才能下订单哦!
在win上的eclipse进行配置hbase,然后编写一个简单的创建表的操作,使用ant的build.xml进行运行报错:
[sshexec] Connecting to 192.168.60.111:22
[sshexec] cmd : /opt/hadoop/bin/hadoop jar /home/hadoop_jar/HbaseApp1.jar hbasetest.HbaseApp1
[sshexec] Exception in thread "main"
[sshexec] java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration
[sshexec]
[sshexec] at hbasetest.HbaseApp1.main(Unknown Source)
[sshexec]
[sshexec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[sshexec]
[sshexec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
但是不使用build时,直接点击右键运行时,没有报错:
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
table exists
解决办法:
在hadoop-env.sh文件中增加如下代码
export HADOOP_CLASSPATH=/usr/local/hbase-0.98.8-hadoop2/lib/*
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。