1
我在Ubuntu 14.04上將Hadoop作爲僞分佈式集羣運行。我也安裝了HBase,一切正常。現在我想從我的本地MySQL服務器使用 「導入」 命令從SqoopSqoop HBase導入:java.lang.NoSuchMethodError:org.apache.hadoop.hbase.HTableDescriptor.addFamily
導入數據到HBase的- 的Hadoop版本:2.7.3
- HBase的版本:1.2.4
- Sqoop版本:1.4。 6(Hadoop的2.0.4-α)
Hadoop和HBase的是沒有問題工作正常,但在運行命令
./sqoop import --connect jdbc:mysql://localhost:3306/company --table people --username mysqluser -P --hbase-table people_import --column-family peoplecf --hbase-create-table
導致以下錯誤
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.MySQLManager.importTable(MySQLManager.java:118)
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)
有人可以幫我嗎?