sqoop 导入mysql数据到hbase报错

wwx HBase 数据的导入 06月04日提问

  • 0 回答
  • 105 浏览

hadoop:3.1.0hbase:2.0

sqoop1.4.6

[root@hadoop1 sqoop]# bin/sqoop import --connect jdbc:mysql://localhost:3306/hbase --table hly_temp_normal --hbase-table hly_temp --column-family cf1 --hbase-row-key id --username root -password root -m 1

Warning: /root/sqoop/bin/../../hcatalog does not exist! HCatalog jobs will fail.

Please set $HCAT_HOME to the root of your HCatalog installation.

Warning: /root/sqoop/bin/../../accumulo does not exist! Accumulo imports will fail.

Please set $ACCUMULO_HOME to the root of your Accumulo installation.

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/root/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/root/hbase/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

2018-06-04 22:13:54,932 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6

2018-06-04 22:13:55,003 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.

2018-06-04 22:13:55,423 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.

2018-06-04 22:13:55,423 INFO tool.CodeGenTool: Beginning code generation

2018-06-04 22:13:56,330 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `hly_temp_normal` AS t LIMIT 1

2018-06-04 22:13:56,432 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `hly_temp_normal` AS t LIMIT 1

2018-06-04 22:13:56,446 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /root/hadoop

注: /tmp/sqoop-root/compile/e6877ed66434c74e9329ad6419a22e52/hly_temp_normal.java使用或覆盖了已过时的 API。

注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。

2018-06-04 22:14:01,569 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/e6877ed66434c74e9329ad6419a22e52/hly_temp_normal.jar

2018-06-04 22:14:01,618 WARN manager.MySQLManager: It looks like you are importing from mysql.

2018-06-04 22:14:01,619 WARN manager.MySQLManager: This transfer can be faster! Use the --direct

2018-06-04 22:14:01,619 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path.

2018-06-04 22:14:01,619 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)

2018-06-04 22:14:01,670 INFO mapreduce.ImportJobBase: Beginning import of hly_temp_normal

2018-06-04 22:14:01,671 INFO Configuration.deprecation: mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address

2018-06-04 22:14:02,027 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar

2018-06-04 22:14:02,071 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.hbase.client.HBaseAdmin.<init>(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: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:76)

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)