fedora 15上出现sqoop安装错误 [英] sqoop installation error on fedora 15

查看:74
本文介绍了fedora 15上出现sqoop安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在计算机上安装sqoop,我从此处

I am trying to install sqoop on my machine,i downloaded tar file from here

并尝试通过此处

因此,当我尝试以下命令时,出现如下错误

So when i tried the below command i getting the error as below

[root@065 local]# (cd /usr/local/ && sudo tar \-zxvf _</home/local/user/Desktop/sqoop-1.4.2.bin__hadoop-0.20.tar.gz>_)

错误

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

上述命令有什么问题?

有人可以让我知道安装sqoop的最简单方法吗?

Can anyone please let me know the easiest way of installing sqoop ?

实际上,我有一个需要处理并保存到MYSQL数据库中的 1GB xml 文件,我使用hadoop和python进行了此操作,但要花 hrs 来完成处理并保存,所以我决定使用sqoop并处理xml文件并将数据保存到数据库中

Actually i had a 1GB xml file that need to be processed and saved in to MYSQL database, i used hadoop with python for doing this but it is taking hrs to process and save, so i decided to use sqoop and process the xml file and save the data in to database

也请让我知道使用sqoop的基本且简单的教程

Also please let me know the basic and easy tutorial to work with sqoop

还请向我提供处理xml文件并将数据保存到数据库的基本代码,因为我是sqoop的新手.

Also please provide me a basic code that process the xml file and saves data in to database as i am newbie to sqoop.

推荐答案

也请在您的〜/.bash_rc文件中添加$ HADOOP_HOME.

Please also add $HADOOP_HOME in your ~/.bash_rc file.

vim ~/.bash_rc

将此添加到您的bash_rc文件:

Add this to your bash_rc file :

export HADOOP_HOME=/home/local/user/name/Hadoop/hadoop-1.0.4/ 

保存文件,然后执行

source ~/.bash_rc . 

此外,您需要将sqoop-env-templat‌e.sh复制到sqoop-env.sh.顾名思义,它只是一个模板:

Also, you need to copy sqoop-env-templat‌​e.sh to sqoop-env.sh. As the name suggests, it is only a template :

cp /home/local/user/name/Desktop/sqoop-1.4.2.bin__hadoop-0.20/conf/sqoop-env-templat‌​e.sh /home/local/user/name/Desktop/sqoop-1.4.2.bin__hadoop-0.20/conf/sqoop-env.sh

编辑sqoop-env.sh:

Edit sqoop-env.sh:

vim /home/local/user/name/Desktop/sqoop-1.4.2.bin__hadoop-0.20/conf/sqoop-env.sh

将以下行添加到sqoop-env.sh:

Add the following line to sqoop-env.sh:

export HADOOP_HOME=/home/local/user/name/Hadoop/hadoop-1.0.4/

现在测试sqoop:

./bin/sqoop help

为简化生活,您还可以将sqoop添加到bashrc文件中

To make your life simpler , you can also add sqoop to your bashrc file

这篇关于fedora 15上出现sqoop安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆