生成HFile文件后倒入数据出现Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.filter.Filter

数据导入的时候出现:
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:)
at java.lang.Class.getMethod0(Class.java:)
at java.lang.Class.getMethod(Class.java:)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.<init>(ProgramDriver.java:)
at org.apache.hadoop.util.ProgramDriver.addClass(ProgramDriver.java:)
at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.apache.hadoop.util.RunJar.run(RunJar.java:)
at org.apache.hadoop.util.RunJar.main(RunJar.java:)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.filter.Filter
at java.net.URLClassLoader$.run(URLClassLoader.java:)
at java.net.URLClassLoader$.run(URLClassLoader.java:)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:)
at java.lang.ClassLoader.loadClass(ClassLoader.java:)
at java.lang.ClassLoader.loadClass(ClassLoader.java:) 解决办法:在/etc/profile文件中添加
export HBASE_HOME=/opt/cloudera/parcels/CDH/lib/hbase
export HADOOP_CLASSPATH="$HADOOP_CLASSPATH:$HBASE_HOME/lib/*"
source 下文件即可。

数据导入的时候出现:

at
java.lang.Class.getDeclaredMethods0(Native Method)

at
java.lang.Class.privateGetDeclaredMethods(Class.java:2615)

at
java.lang.Class.getMethod0(Class.java:2856)

at
java.lang.Class.getMethod(Class.java:1668)

at
org.apache.hadoop.util.ProgramDriver$ProgramDescription.<init>(ProgramDriver.java:59)

at
org.apache.hadoop.util.ProgramDriver.addClass(ProgramDriver.java:103)

at
org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:42)

at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at
java.lang.reflect.Method.invoke(Method.java:606)

at
org.apache.hadoop.util.RunJar.run(RunJar.java:221)

at
org.apache.hadoop.util.RunJar.main(RunJar.java:136)

Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.hbase.filter.Filter

at
java.net.URLClassLoader$1.run(URLClassLoader.java:366)

at
java.net.URLClassLoader$1.run(URLClassLoader.java:355)

at
java.security.AccessController.doPrivileged(Native Method)

at
java.net.URLClassLoader.findClass(URLClassLoader.java:354)

at
java.lang.ClassLoader.loadClass(ClassLoader.java:425)

at
java.lang.ClassLoader.loadClass(ClassLoader.java:358)

解决办法:

上一篇:wemall doraemon中Android app商城系统工具集合类,包含各种程序中用到的静态方法


下一篇:spring – 从Maven Command Line获取HSQL连接时,JPA测试挂起