开源云计算技术系列(四)(Cloudera安装配置hadoop 0.20最新版配置)

本文介绍如何在Debian环境下安装并配置Cloudera 0.20版Hadoop,通过apt-get安装MySQL进行联合测试,提供详细步骤与配置说明。Cloudera的出现简化了Hadoop的配置过程,推动了开源云计算的发展。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

接上文,我们继续体验Cloudera 0.20最新版。

wgethadoop-0.20-conf-pseudo_0.20.0-1cloudera0.5.0~lenny_all.deb

wgethadoop-0.20_0.20.0-1cloudera0.5.0~lenny_all.deb

debian:~# dpkg –ihadoop-0.20-conf-pseudo_0.20.0-1cloudera0.5.0~lenny_all.deb

dpkg –ihadoop-0.20_0.20.0-1cloudera0.5.0~lenny_all.deb

就这么简单。ok

如果不清楚安装到哪里了,可以用

debian:~# dpkg -L hadoop-0.20

可以看到清晰的安装目录结构。

启动:

debian:~# cd /etc/init.d/hadoop-0.20-
hadoop-0.20-datanode hadoop-0.20-namenode hadoop-0.20-tasktracker
hadoop-0.20-jobtracker hadoop-0.20-secondarynamenode
debian:~# cd /etc/init.d/hadoop-0.20-

debian:~# /etc/init.d/hadoop-0.20-namenode start

debian:~# /etc/init.d/hadoop-0.20-namenode status
hadoop-0.20-namenode is running

debian:~# /etc/init.d/hadoop-0.20-datanode start

debian:~# /etc/init.d/hadoop-0.20-datanode status
hadoop-0.20-datanode is running

debian:~# /etc/init.d/hadoop-0.20-jobtracker start

debian:~# /etc/init.d/hadoop-0.20-jobtracker status
hadoop-0.20-jobtracker is running

debian:~# /etc/init.d/hadoop-0.20-tasktracker start

debian:~# /etc/init.d/hadoop-0.20-tasktracker status
hadoop-0.20-tasktracker is running

启动完成。

接着可以进行常规的example的测试了。

值得测试的是

debian:~# sqoop –help
Usage: hadoop sqoop.jar org.apache.hadoop.sqoop.Sqoop (options)

Database connection options:
–connect (jdbc-uri) Specify JDBC connect string
–driver (class-name) Manually specify JDBC driver class to use
–username (username) Set authentication username
–password (password) Set authentication password
–local Use local imp<wbr>ort fast path (mysql on<wbr>ly)</wbr></wbr>

Imp<wbr>ort control options:<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –table (tablename) Table to read<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –columns (col,col,col…) Columns to export from table<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –order-by (column-name) Column of the table used to order results<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –hadoop-home (dir) Override $HADOOP_HOME<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –warehouse-dir (dir) HDFS path for table destination<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –as-sequencefile Imp<wbr>orts da<wbr>ta to SequenceFiles<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –as-textfile Imp<wbr>orts da<wbr>ta as plain text (default)<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –all-tables Imp<wbr>ort all tables in database<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> (Ignores –table, –columns and –order-by)</wbr></wbr></wbr></wbr></wbr></wbr>

Co<wbr>de generation options:<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –outdir (dir) Output directory for generated co<wbr>de<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –bindir (dir) Output directory for compiled objects<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> –generate-on<wbr>ly Stop after co<wbr>de generation; do not imp<wbr>ort</wbr></wbr></wbr></wbr></wbr>

Additional commands:
–list-tables List tables in database and exit
–list-databases List all databases available and exit
–debug-sql (statement) Execute ’statement’ in SQL and exit

Generic Hadoop command-line options:
Generic options supported are
-conf <configuration file> specify an application configuration file
-D <property=value> use value for given property
-fs <local|namenode:port> specify a namenode
-jt <local|jobtracker:port> specify a job tracker
-files <comma separated list of files> specify comma separated files to be copied to the map reduce cluster
-libjars <comma separated list of jars> specify comma separated jar files to include in the classpath.
-archives <comma separated list of archives> specify comma separated archives to be unarchived on the compute machines.

The general command line syntax is
bin/hadoop command [genericOptions] [commandOptions]

At minimum, you must specify –connect and either –table or –all-tables.
Alternatively, you can specify –generate-on<wbr>ly or on<wbr>e of the additional<br style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; padding-top:0px"> commands.</wbr></wbr>

可以通过apt-get install mysql-server 安装debian下的mysql进行联合测试。

测试体验见前面的文章,到这里大家可以进行一个完整的体验了。Cloudera的出现的确对hadoop的配置进行了极大的简化,推动了开源云计算的发展。

转自:http://rdc.taobao.com/blog/dw/archives/417

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值