当前位置: 动力学知识库 > 问答 > 编程问答 >

hbase - Exception in thread "main" java.lang.ClassNotFoundException: importtsv

问题描述:

I am trying to load a csv file to Hbase table using bulkloader utility and receiving below error continuously. I did search in the site for effective answer but failed to find so.

I am not sure about what exactly value the env variables $HBASE_HOME and $HADOOP_CLASSPATH should contain in CDH 5.4 VM.

Exception in thread "main" java.lang.ClassNotFoundException: importtsv

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)

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

at java.lang.Class.forName(Class.java:270)

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

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

网友答案:

I was stuck with the above problem for a while but, have my luck at working solution for it. Basically I've set
$HBASE_HOME=/usr/lib/hbase

and from home dir do following:
/usr/bin/hbase org.apache.hadoop.hbase.mapreduce.ImportTsv

Thus, I get to load the csv files to Hbase tables directly! :)

分享给朋友:
您可能感兴趣的文章:
随机阅读: