0

我想通过 sqoop 将数据表从。所以,我下载了它,解压它,并将文件添加到.sqoop-1.4.4.tar.gzjdbc.jar/lib

然后我设置SQOOP_HOME并将PATH它们保存在bash.bashrc. 当我跑的时候which sqoop回复我/usr/local/sqoop/bin/sqoop

但是当我写“sqoop help”时,我出现了以下错误:

 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/sqoop/Sqoop
 Caused by: java.lang.ClassNotFoundException: org.apache.sqoop.Sqoop
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.apache.sqoop.Sqoop. Program will exit.

请指导我如何解决它以及如何将数据表导入 hbase。谢谢。

4

1 回答 1

0

将 Sqoop 库添加到类路径中,看看是否有帮助。

export CLASSPATH=$CLASSPATH:$SQOOP_HOME/lib
于 2013-10-04T10:03:47.280 回答