进入${SQOOP_HOME}/bin, 执行以下指令:
$ ./sqoopimport --connectjdbc:mysql://IP_ADDRESS:3306/DATABASE_NAME --tableTABLE_NAME --hbase-create-table--hbase-tableHBASE_TABLE_NAME --column-familyCOLUMN_NAME --hbase-row-keyKEY_ID
运行结果如下:
常见错误:
ERROR tool.ImportTool: Error during import: HBase jars are not present in classpath, cannot import to HBase!
解决方法
在/etc/profile中设置$HBASE_HOME环境变量

本文介绍如何使用Sqoop工具将MySQL数据库中的表数据导入到HBase中,并解决了在导入过程中出现的HBase JAR文件未找到的错误。
810

被折叠的 条评论
为什么被折叠?



