设为首页 收藏本站
查看: 792|回复: 0

[经验分享] 开源云计算技术系列(四)(Cloudera安装配置hadoop 0.20最新版配置)

[复制链接]

尚未签到

发表于 2016-12-11 11:22:22 | 显示全部楼层 |阅读模式
接上文,我们继续体验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

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-312759-1-1.html 上篇帖子: Hadoop技术内幕_深入解析Hadoop Common和HDFS架构设计与实现原理——读书笔记(2) 下篇帖子: Hadoop中两表JOIN的处理方法
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表