Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hadoop 将数据从MySQL加载到HDFS时发生Sqoop错误_Hadoop_Sqoop - Fatal编程技术网

Hadoop 将数据从MySQL加载到HDFS时发生Sqoop错误

Hadoop 将数据从MySQL加载到HDFS时发生Sqoop错误,hadoop,sqoop,Hadoop,Sqoop,我正在运行一个sqoop将数据从MySQL加载到HDFS。 代码如下: sqoop import \ --connect jdbc:mysql://test.xxx.net/LIVE \ --username pitt \ --password abcd \ --query "select * from tblMfg where 1=1 and \$CONDITIONS" \ --target-dir /user/pitt/tblMfg \ --fields-terminated-by '\t'

我正在运行一个sqoop将数据从MySQL加载到HDFS。 代码如下:

sqoop import \
--connect jdbc:mysql://test.xxx.net/LIVE \
--username pitt \
--password abcd \
--query "select * from tblMfg where 1=1 and \$CONDITIONS" \
--target-dir /user/pitt/tblMfg \
--fields-terminated-by '\t' \
--null-string '' \
--null-non-string '' \
-m 1
关于tblMfg:

Value of dateCreate column: 0000-00-00 00:00:00

Data type of dateCreate column: timestamp 
但是当我运行sqoop时,我得到了以下错误:

java.io.IOException: SQLException in nextKeyValue

0000-00-00 00:00:00�� 08:06:05��05����015-04-20 08:06:05�����5��5��' can not be represented as java.sql.Timestamp

有人能解释一下这里发生了什么吗?

java.sql.timestamp不能用值0000-00-00:00初始化。这就是错误的原因。尝试在dateCreate列中使用其他时间戳值导入,如2011-02-15 02:02:02。它应该会起作用