ERROR:oracle.jdbc.driver.T4CPreparedStatement.isClosed()Z (sqoop从oralce向hive导数据)解决

[hadoop@mdhadoop ~]$ sqoop import -connect jdbc:oracle:thin:@192.168.8.228:1521:bonc -username AQ -password bonc1234 -table ORCL_TEST1 -hive-import -
hive-database test -hive-table ORCL_HIVE_TEST1 -null-string ‘ ‘ -null-non-string ‘‘ -m 1
15/06/11 17:05:58 INFO sqoop.Sqoop: Running Sqoop version: 1.4.4-cdh5.0.0
15/06/11 17:05:58 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
15/06/11 17:05:58 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override
15/06/11 17:05:58 INFO tool.BaseSqoopTool: delimiters with --fields-terminated-by, etc.
15/06/11 17:05:58 INFO manager.SqlManager: Using default fetchSize of 1000
15/06/11 17:05:58 INFO tool.CodeGenTool: Beginning code generation
15/06/11 17:05:59 INFO manager.OracleManager: Time zone has been set to GMT
15/06/11 17:05:59 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM ORCL_TEST1 t WHERE 1=0
15/06/11 17:05:59 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /opt/beh/core/hadoop
Note: /tmp/sqoop-hadoop/compile/7808ec7272d1b4eaa5af7d983f35fcd9/ORCL_TEST1.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
15/06/11 17:06:01 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-hadoop/compile/7808ec7272d1b4eaa5af7d983f35fcd9/ORCL_TEST1.jar
15/06/11 17:06:01 INFO manager.OracleManager: Time zone has been set to GMT
15/06/11 17:06:01 INFO manager.OracleManager: Time zone has been set to GMT
15/06/11 17:06:01 INFO mapreduce.ImportJobBase: Beginning import of ORCL_TEST1
15/06/11 17:06:02 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar
15/06/11 17:06:02 INFO manager.OracleManager: Time zone has been set to GMT
15/06/11 17:06:03 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
15/06/11 17:06:03 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
15/06/11 17:06:04 INFO db.DBInputFormat: Using read commited transaction isolation
15/06/11 17:06:04 INFO mapreduce.JobSubmitter: number of splits:1
15/06/11 17:06:05 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1432609090750_0032
15/06/11 17:06:05 INFO impl.YarnClientImpl: Submitted application application_1432609090750_0032
15/06/11 17:06:05 INFO mapreduce.Job: The url to track the job: http://mdhadoop:23188/proxy/application_1432609090750_0032/
15/06/11 17:06:05 INFO mapreduce.Job: Running job: job_1432609090750_0032
15/06/11 17:06:14 INFO mapreduce.Job: Job job_1432609090750_0032 running in uber mode : false
15/06/11 17:06:14 INFO mapreduce.Job: map 0% reduce 0%
15/06/11 17:06:20 INFO mapreduce.Job: Task Id : attempt_1432609090750_0032_m_000000_0, Status : FAILED
Error: oracle.jdbc.driver.T4CPreparedStatement.isClosed()Z
15/06/11 17:06:26 INFO mapreduce.Job: Task Id : attempt_1432609090750_0032_m_000000_1, Status : FAILED
Error: oracle.jdbc.driver.T4CPreparedStatement.isClosed()Z
15/06/11 17:06:32 INFO mapreduce.Job: Task Id : attempt_1432609090750_0032_m_000000_2, Status : FAILED
Error: oracle.jdbc.driver.T4CPreparedStatement.isClosed()Z
15/06/11 17:06:40 INFO mapreduce.Job: map 100% reduce 0%
15/06/11 17:06:41 INFO mapreduce.Job: Job job_1432609090750_0032 failed with state FAILED due to: Task failed task_1432609090750_0032_m_000000
Job failed as tasks failed. failedMaps:1 failedReduces:0

15/06/11 17:06:41 INFO mapreduce.Job: Counters: 8
Job Counters
Failed map tasks=4
Launched map tasks=4
Other local map tasks=4
Total time spent by all maps in occupied slots (ms)=18943
Total time spent by all reduces in occupied slots (ms)=0
Total time spent by all map tasks (ms)=18943
Total vcore-seconds taken by all map tasks=18943
Total megabyte-seconds taken by all map tasks=19397632
15/06/11 17:06:41 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
15/06/11 17:06:41 INFO mapreduce.ImportJobBase: Transferred 0 bytes in 38.4552 seconds (0 bytes/sec)
15/06/11 17:06:41 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
15/06/11 17:06:41 INFO mapreduce.ImportJobBase: Retrieved 0 records.
15/06/11 17:06:41 ERROR tool.ImportTool: Error during import: Import job failed!
[hadoop@mdhadoop ~]$

JDBC驱动是10g的,更新为11g的就解决了

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。