错误org.apache.pig.tools.grunt.Grunt - 错误2998:未处理的内部错误。组织/阿帕奇/的Hadoop / HBase的/过滤/ WritableByteArrayComparable

时间:2014-01-09 19:29:22

标签: hadoop hbase apache-pig noclassdeffounderror

从搜索中,我发现了这个问题,按照说明我遇到了同样的问题。

  

CDH4 Hbase using Pig ERROR 2998 java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/filter/Filter

但是对我没用。此外,我使用的是Ubuntu和Hadoop-2.2.0,Hbase-0.96.1-hadoop2和Pig-0.12.0。

的.bashrc

export JAVA_HOME=/usr
export HADOOP_INSTALL=/home/ubuntu/hadoop-2.2.0
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL

export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_COMMON_HOME}/lib/native
export HADOOP_OPTS="-Djava.library.path=${HADOOP_COMMON_HOME}/lib"
export PIG_HOME=/home/ubuntu/pig-0.12.0
export HBASE_HOME=/home/ubuntu/hbase-0.96.1-hadoop2
export PIG_CLASSPATH="'${HADOOP_INSTALL}/bin/hbase classpath':$PIG_HOME/bin"

Log Pig

Pig Stack Trace
---------------
ERROR 2998: Unhandled internal error.     
org/apache/hadoop/hbase/filter/WritableByteArrayComparable

java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/filter/WritableByteArrayComparable

Pig.properties

fs.defaultFS=hdfs://hadoop-master/
mapred.job.tracker=hadoop-master:8021

1 个答案:

答案 0 :(得分:5)

我做对了

  

export PIG_CLASSPATH = $ PIG_HOME / pig-0.12.0-withouthadoop.jar:$ HBASE_HOME / hbase-0.94.1.jar:$ HBASE_HOME / lib / *:$ HADOOP_COMMON_LIB_NATIVE_DIR / lib / *:$ PIG_CLASSPATH