Using sqoop to move data from mysql to hive

Sqoop only works with CDH3, so we have to install CDH3.

To install CDH3 on a Red Hat system:

  1. Add the yum repository of your choice. Download this cloudera-cdh3.repo file for your RHEL/CentOS 5 system, or download this other cloudera-cdh3.repo file for your RHEL 6 system, and save it in your /etc/yum.repos.d/ directory.


    Note
    To install a different version of CDH on a Red Hat system, open the cloudera-cdh3.repo file and change the 3 in the repo file to the version number you want. For example, change the 3 to 3b4 to install CDH3 Beta 4.

  2. Update the yum package index by running:
    $ sudo yum update yum
    
  3. Find and install the Hadoop core package. For example:
$ yum search hadoop
$ sudo yum install hadoop-0.20


Note
In prior versions of CDH, the hadoop-0.20 package contained all of the service scripts in /etc/init.d/. In CDH3, the hadoop-0.20 package does not contain any service scripts – instead, those scripts are contained in the hadoop-0.20-<daemon> packages. Do the following step to install the daemon packages.

4. Install each type of daemon package on the appropriate machine. For example, install the NameNode package on your NameNode machine:

$ sudo yum install hadoop-0.20-<daemon type>

where <daemon type> is one of the following:

namenode

datanode

secondary namenode

jobtracker

tasktracker

5. Install the appropriate CDH component(s) that you want to use. SeeInstalling CDH3 Components

On Red Hat systems, type:

$ sudo yum install <CDH3-component-name>

To install this CDH3 component
Use this CDH3 component name

Flume
flume

Sqoop
sqoop

Hue
hue

Pig
hadoop-pig

Hive
hadoop-hive

HBase
hadoop-hbase

ZooKeeper
hadoop-zookeeper

Oozie server
oozie

Oozie client
oozie-client

Whirr
whirr

Then copy mysql-connector-java-5.1.10.jar to sqoop dir

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值