当前位置: 代码迷 >> 综合 >> 【hadoop sqoop】运行sqoop 报 Could not find or load main class org.apache.sqoop.Sqoop
  详细解决方案

【hadoop sqoop】运行sqoop 报 Could not find or load main class org.apache.sqoop.Sqoop

热度:94   发布时间:2024-01-21 00:25:34.0
又是一个缺少JAR 包导致的错误。

从apache网站上下载sqoop-1.4.3.tar.gz 解压后 运行sqloop 报错。

[hadoop@hadoop1 jobTracker]$ sqoop 

Error: Could not find or load main class org.apache.sqoop.Sqoop

后来分析原因是缺少sqoop-1.4.3.jar 导致的。

不明白为何apache没有将此jar包含到sqoop-1.4.3.tar.gz中。

将此jar包放到$SQOOP_HOME/lib目录下,就可以正常运行sqoop工具了。

[hadoop@hadoop1 lib]$ sqoop help


usage: sqoop COMMAND [ARGS]


Available commands:
  codegen            Generate code to interact with database records
  create-hive-table  Import a table definition into Hive
  eval               Evaluate a SQL statement and display the results
  export             Export an HDFS directory to a database table
  help               List available commands
  import             Import a table from a database to HDFS
  import-all-tables  Import tables from a database to HDFS
  job                Work with saved jobs
  list-databases     List available databases on a server
  list-tables        List available tables in a database
  merge              Merge results of incremental imports
  metastore          Run a standalone Sqoop metastore
  version            Display version information


See 'sqoop help COMMAND' for information on a specific command.



原文地址:http://blog.chinaunix.net/uid-22948773-id-3563685.html

  相关解决方案