我正在尝试使用sqoop将表格从Teradata导入HDFS作为avrodata文件,但是我遇到了问题。
导入为textfile时,一切正常。但是,当我在我的sqoop命令的末尾添加--as-avrodatafile时,我得到一个NPE,即:
ERROR sqoop.Sqoop: Got exception running Sqoop java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:763)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:786)
at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:289)
at org.apache.sqoop.manager.SqlManager.getColumnInfo(SqlManager.java:275)
at org.apache.sqoop.manager.ConnManager.getColumnInfo(ConnManager.java:393)
at org.apache.sqoop.orm.ClassWriter.getColumnInfo(ClassWriter.java:1854)
at org.apache.sqoop.orm.AvroSchemaGenerator.generate(AvroSchemaGenerator.java:71)
at org.apache.sqoop.orm.AvroSchemaGenerator.generate(AvroSchemaGenerator.java:65)
at com.cloudera.connector.teradata.imports.BaseImportJob.configureInputFormat(BaseImportJob.java:165)
at com.cloudera.connector.teradata.imports.TableImportJob.configureInputFormat(TableImportJob.java:32)
at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:258)
at com.cloudera.connector.teradata.TeradataManager.importTable(TeradataManager.java:273)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:507)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615)
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)"
不确定出了什么问题