当前位置: > Linux集群 > Hadoop >

Hadoop客户端环境配置

时间:2015-01-20 00:12来源:linux.it.net.cn 作者:IT

1.  安装客户端(通过端用户可以方便的和集群交互)

2. 修改客户端~/.bashrc
alias hadoop='/home/work/hadoop/client/hadoop-client/hadoop/bin/hadoop'  #hadoop 可执行文件位置
alias hls='hadoop fs -ls' 
alias hlsr='hadoop fs -lsr' 
alias hcp='hadoop fs -cp ' 
alias hmv='hadoop fs -mv' 
alias hget='hadoop fs -get' 
alias hput='hadoop fs -put' 
alias hrm='hadoop fs -rm' 
alias hmkdir='hadoop fs -mkdir' 
alias hcat='hadoop fs -cat' 
alias hrmr='hadoop fs -rmr' 
alias hstat='hadoop fs -stat' 
alias htest='hadoop fs -test' 
alias htext='hadoop fs -text' 
alias htouchz='hadoop fs -touchz' 
alias hdu='hadoop fs -du' 
alias hdus='hadoop fs -dus' 
alias hchmod='hadoop fs -chmod' 
alias hchgrp='hadoop fs -chgrp' 
alias hchown='hadoop fs -chown' 
alias htail='hadoop fs -tail'

3. 终端输入:source ~/.bashrc

4.使用hadoop短命令
eg:
# hls /app/

(责任编辑:IT)
------分隔线----------------------------