从oozie运行时Sqoop操作失败但是当在命令行(边缘节点)中复制粘贴相同的命令时,它完全正常执行。从oozie运行时,会触发作业ID,然后我会收到以下错误
Error: com.teradata.connector.common.exception.ConnectorException: index outof boundary
at com.teradata.connector.teradata.converter.TeradataConverter.convert(TeradataConverter.java:161)
at com.teradata.connector.common.ConnectorOutputFormat$ConnectorFileRecordWriter.write(ConnectorOutputFormat.java:111)
at com.teradata.connector.common.ConnectorOutputFormat$ConnectorFileRecordWriter.write(ConnectorOutputFormat.java:70)
at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.write(MapTask.java:658)
at org.apache.hadoop.mapreduce.task.TaskInputOutputContextImpl.write(TaskInputOutputContextImpl.java:89)
at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.write(WrappedMapper.java:112)
at com.teradata.connector.common.ConnectorMMapper.map(ConnectorMMapper.java:134)
at com.teradata.connector.common.ConnectorMMapper.run(ConnectorMMapper.java:122)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1709)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
Container killed by the ApplicationMaster.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
Intercepting System.exit(1)
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SqoopMain], exit code [1]
以下是workflow.xml文件的一部分
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<command>export -Dhadoop.security.credential.provider.path=pathprovided --connect connectionstring --connection-manager org.apache.sqoop.teradata.TeradataConnManager --username name --password-alias password --table name --export-dir location --input-fields-terminated-by '|'</command>
</sqoop>
我在oozie中有2个其他动作(hive,pig)正确执行,我也启用了参数来使用oozie sharedlib(-D oozie.use.system.libpath = $ oozieusesystemlibpath)。有人可以帮助我吗
由于
答案 0 :(得分:0)
该错误具有误导性。当我删除字段中的单引号时它正在工作。以下是workflow.xml中的代码
<command>export -Dhadoop.security.credential.provider.path=pathprovided --connect connectionstring --connection-manager org.apache.sqoop.teradata.TeradataConnManager --username name --password-alias password --table name --export-dir location --input-fields-terminated-by |</command>