sqoop导入mysql到hbase报错 java.lang.NoSuchMethodError: org.apache.hadoop.hbase.client.HBaseAdmin.

sqoop导入mysql到hbase报错 java.lang.NoSuchMethodError: org.apache.hadoop.hbase.client.HBaseAdmin.

bin/sqoop import -D sqoop.hbase.add.row.key=true --connect jdbc:mysql://172.16.92.xx:3306/db_customer_risk --username spark --password spark123456 --table PRODUCT_RECOMMEND_ENUM --columns ID,TYPE_ID,REASON --hbase-create-table --hbase-table product_recommend_enum --column-family cf --hbase-row-key ID --where "ID >= 1" -m 1
报错:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.hbase.client.HBaseAdmin.(Lorg/apache/hadoop/conf/Configuration;)V
        at org.apache.sqoop.mapreduce.HBaseImportJob.jobSetup(HBaseImportJob.java:163)
        at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:268)
        at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:692)
        at org.apache.sqoop.manager.MySQLManager.importTable(MySQLManager.java:127)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:520)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:628)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
 

请教各位大神这个怎么处理?

版本情况:hadoop-2.8.5  hbase-2.0.5  sqoop-1.4.7

bin/sqoop import 导入hive时可成功不报错。

你可能感兴趣的:(大数据)