マイプラットフォーム:CDH 5.10クイックスタートVMおよびTeradata TDEXPRESS 16 VMバージョン。 SqoopとTeradata JDBCドライバを使用しています。 tdgssconfig.jar、teradata-connector-1.5.3.jar、terajdbc4.jar sqoopジョブが次のエラーで失敗しています。TeradataのSqoopの増分インポートが失敗する
提案がありますか?あなたが--append
と一緒に修正lastmodified
を使用していた
[[email protected] sqoop]$ sqoop job --create incjobtd1 -- import --connect jdbc:teradata://192.168.142.129/DATABASE=teradb --driver com.teradata.jdbc.TeraDriver --username dbc --password dbc --table ACCT --incremental lastmodified
--check-column ECF_XTRC_TS --target-dir /user/cloudera/teradb/acct2 -m 1 --as-parquetfile --append
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
17/08/09 01:44:49 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.10.0
17/08/09 01:44:54 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
[[email protected] sqoop]$ sqoop job --exec incjobtd1
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
17/08/09 01:45:14 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.10.0
Enter password:
17/08/09 01:45:25 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
17/08/09 01:45:25 INFO manager.SqlManager: Using default fetchSize of 1000
17/08/09 01:45:25 INFO tool.CodeGenTool: Beginning code generation
17/08/09 01:45:25 INFO tool.CodeGenTool: Will generate java class as codegen_ACCT
17/08/09 01:45:32 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM ACCT AS t WHERE 1=0
17/08/09 01:45:32 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM ACCT AS t WHERE 1=0
17/08/09 01:45:32 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/lib/hadoop-mapreduce
Note: /tmp/sqoop-cloudera/compile/fc68a3f34abd80bde713cf1709dbc330/codegen_ACCT.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
17/08/09 01:45:54 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-cloudera/compile/fc68a3f34abd80bde713cf1709dbc330/codegen_ACCT.jar
17/08/09 01:46:06 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM ACCT AS t WHERE 1=0
17/08/09 01:46:07 ERROR manager.SqlManager: SQL exception accessing current timestamp: java.sql.SQLException: [Teradata Database] [TeraJDBC 16.00.00.23] [Error 3706] [SQLState 42000] Syntax error: expected something between '(' and ')'.
java.sql.SQLException: [Teradata Database] [TeraJDBC 16.00.00.23] [Error 3706] [SQLState 42000] Syntax error: expected something between '(' and ')'.
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDatabaseSQLException(ErrorFactory.java:309)
at com.teradata.jdbc.jdbc_4.statemachine.ReceiveInitSubState.action(ReceiveInitSubState.java:103)
at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.subStateMachine(StatementReceiveState.java:311)
at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:200)
at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:137)
at com.teradata.jdbc.jdbc_4.statemachine.StatementController.run(StatementController.java:128)
at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:389)
at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:331)
at com.teradata.jdbc.jdbc_4.TDStatement.doNonPrepExecuteQuery(TDStatement.java:319)
at com.teradata.jdbc.jdbc_4.TDStatement.executeQuery(TDStatement.java:1121)
at org.apache.sqoop.manager.SqlManager.getCurrentDbTimestamp(SqlManager.java:987)
at org.apache.sqoop.tool.ImportTool.initIncrementalConstraints(ImportTool.java:328)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:498)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615)
at org.apache.sqoop.tool.JobTool.execJob(JobTool.java:213)
at org.apache.sqoop.tool.JobTool.run(JobTool.java:268)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
17/08/09 01:46:07 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not get current time from database
at org.apache.sqoop.tool.ImportTool.initIncrementalConstraints(ImportTool.java:330)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:498)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615)
at org.apache.sqoop.tool.JobTool.execJob(JobTool.java:213)
at org.apache.sqoop.tool.JobTool.run(JobTool.java:268)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
[[email protected] sqoop]$
バグです。同一の同一のステートメントがエラーなしでMySQL用にテストされました。 – Rana