执行语句如下:
sqoop import --append --connect jdbc:oracle:thin:@192.168.97.201:1521:orcl --username wnpm --password wnpm --m 1 --table sysusr --columns userid,username --hbase-create-table --hbase-table sysusr_from_oracle --hbase-row-key userid --column-family username
报错内容:
15/11/11 14:38:46 INFO mapreduce.HBaseImportJob: Creating missing HBase table sysusr_from_oracle
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.hbase.HTableDescriptor.addFamily(Lorg/apache/hadoop/hbase/HColumnDescriptor;)V
at org.apache.sqoop.mapreduce.HBaseImportJob.jobSetup(HBaseImportJob.java:222)
at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:264)
at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:673)
at org.apache.sqoop.manager.OracleManager.importTable(OracleManager.java:444)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:497)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
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)
hadoop2.6.0不支持habse1.0.x的版本 具体的版本对应信息可看官网:https://hbase.apache.org/book.html#configuration