我想将字符串数据从配置单元导出到oracle中的clob。
命令: sqoop export -Dsqoop.export.records.per.statement=1 --connect 'jdbc:oracle:thin:@192.168.41.67:1521:orcl' --username ILABUSER --password impetus --table ILABUSER.CDT_ORC_1 --export-dir /user/dev/db/123 --input-fields-terminated-by '\001' --input-null-string '\\N' --input-null-non-string '\\N' -m 2
例外情况:
错误:java.io.ioexception:无法导出数据,请检查org.apache.sqoop.mapreduce.textexportmapper.map(textexportmapper)上失败的Map任务日志。java:112)在org.apache.sqoop.mapreduce.textexportmapper.map(textexportmapper。java:39)在org.apache.hadoop.mapreduce.mapper.run(mapper。java:146)在org.apache.sqoop.mapreduce.autoprogressmapper.run(autoprogressmapper。java:64)在org.apache.hadoop.mapred.maptask.runnewmapper(maptask。java:787)在org.apache.hadoop.mapred.maptask.run(maptask。java:341)在org.apache.hadoop.mapred.yarnchild$2.run(yarnchild。java:164)位于javax.security.auth.subject.doas(subject)的java.security.accesscontroller.doprivileged(本机方法)。java:422)在org.apache.hadoop.security.usergroupinformation.doas(用户组信息。java:1657)在org.apache.hadoop.mapred.yarnchild.main(yarnchild。java:158)原因:java.io.ioexception:无法缓冲org.apache.sqoop.mapreduce.asyncsqlrecordwriter.write(asyncsqlrecordwriter)上的记录。java:218)在org.apache.sqoop.mapreduce.asyncsqlrecordwriter.write(异步SqlRecordWriter。java:46)在org.apache.hadoop.mapred.maptask$newdirectoutputcollector.write(maptask。java:658)在org.apache.hadoop.mapreduce.task.taskInputInputContextImpl.write(taskInputInputContextImpl。java:89)在org.apache.hadoop.mapreduce.lib.map.wrappedmapper$context.write(wrappedmapper。java:112)在org.apache.sqoop.mapreduce.textexportmapper.map(textexportmapper。java:84) ... 10个以上原因:java.lang.clonenotsupportedexception:com.cloudera.sqoop.lib.clobref at java.lang.object.clone(native method)at org.apache.sqoop.lib.lobref.clone(lobref)。java:109)在ilabuser\u cdt\u orc\u 1.clone(ilabuser\u cdt\u orc\u 1。java:322)位于org.apache.sqoop.mapreduce.asyncsqlrecordwriter.write(asyncsqlrecordwriter)。java:213) ... 还有15个
1条答案
按热度按时间slwdgvem1#
作为我使用的解决方法
--map-column-java
标签。我在java中将clob列(名为col\u clob)Map到字符串。
在上述命令中添加了以下代码:
--map-column-java tag col_clob=String