将所有表从MySQL导入到Hive。我的命令出了什么问题?

时间:2016-08-17 03:11:08

标签: mysql hadoop hive

以下命令有什么问题吗?它不适合我。

sqoop import-all-tables 
--connect jdbc:mysql://localhost/retail_db --username=retail_dba 
-- compression-codec=snappy 
--as-parquetfile --hive-import -m 1

16/08/17 08:34:07 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
16/08/17 08:34:07 INFO tool.BaseSqoopTool: 
Using Hive-specific delimiters   for output. You can override
16/08/17 08:34:07 INFO tool.BaseSqoopTool: 
delimiters with --fields- terminated-by, etc.
16/08/17 08:34:08 INFO manager.MySQLManager: 
Preparing to use a MySQL streaming resultset.
16/08/17 08:34:08 INFO tool.CodeGenTool: Beginning code generation
16/08/17 08:34:08 ERROR sqoop.Sqoop:
Got exception running Sqoop:  
java.lang.NullPointerException
java.lang.NullPointerException

1 个答案:

答案 0 :(得分:-1)

你能发布你得到的完整错误吗? 您是否包含错误 - 未找到类异常?如果是,请转到$ HADOOP_HOME / etc / hadoop查找mapred-site.xml并将属性mapreduce.framework.name的值更改/添加为yarn。保存文件并重新启动hadoop