import --connect jdbc:oracle:thin:@192.168.88.233:1521:ITSPDB2 --username ITSP --password itsp --verbose -m 1 --table HADOOP_TEST
-------------
用sqoop将数据从oracle导出至hive表,报错如下:
14/02/18 15:02:18 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.sqoop.manager.OracleManager.getPrimaryKey(OracleManager.java:951)
at org.apache.sqoop.manager.SqlManager.getSplitColumn(SqlManager.java:543)
at org.apache.sqoop.manager.SqlManager.checkTableImportOptions(SqlManager.java:562)
at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:597)
at org.apache.sqoop.manager.OracleManager.importTable(OracleManager.java:384)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:413)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:502)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
操作系统rhel6.3 64位,用ambari安装的hadoop、hive、sqoop
扣版本如下:
hadoop 2.2.0.2.0.6.0-101
hive 0.12.0.2.0.6.1-101
sqoop 1.4.4.2.0.6.1-101
确认sqoop可以正常连接到oracle,用list-tables测试下,连接用的jdbc lib包的名字是什么?
权限问题,hdfs目录是什么用户建立的就用什么用户跑sqoop