Use of Sqoop (Mysql to HBase)

Source: Internet
Author: User
Tags sqoop hadoop fs

MySQL data is recently needed to be integrated into HBase, using MapReduce to create a job to import MySQL data.

In the process of accessing the data, we found the tools that open source tools Sqoop (relational database and hdfs,hbase,hive, etc.) import each other,

So you're ready to try and see if you can meet the current data transfer requirements.

Sqoop import--connect jdbc:mysql://192.168.100.**/database--username user-p--table Information--hbase-table Information--column-family Info--hbase-row-key market,label--columns market,label,name,py--hbase-create-table-m 1

--hbase-row-key Market,label This command can produce Rowkey in Market_label format


Question 1:

ERROR security. Usergroupinformation:priviledgedactionexception ...

This problem is caused primarily by permissions issues, and the user does not create a folder with permissions under the target path

Sudo-u HDFs Hadoop Fs-mkdir/user/user

Sudo-u HDFs Hadoop Fs-chown user:user/user/user

(The/user folder is the default path if Sqoop does not indicate a file path)

Question 2:

Could not insert row with null value for Row-key column:

This problem may be due to the use of the problem, in columns need to indicate the column Row-key used

Use of Sqoop (Mysql to HBase)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.