CDH-LINUX操作参考一、启用HDFS的HighAvailability练习查看用户的目录:more/etc/passwd执 行命令:hdfsdfs-ls/切换到到hdfs用户命令su-lhdfs在这路径下[hdfs@cdh3~]$pw d/var/lib/hadoop-hdfs创建一个参考文本名为hellovimhello内容为:helloyouhello mehellohe执行上传到HDFS上命令hdfsdfs-puthello/hello在linux下查看hell o内容hdfsdfs-text/hello在真实生产环境中不创建而是指定用户在hdfs下创建一个cdhhdfsdf s-mkdir/cdh/#这里将所有的目录指定为root用户hdfsdfs-chown-Rroot:supergrou p/删除hellohdfsdfs-rm/hellohdfsdfs-chown-Rcdh:supergroup/c dh#把cdh目录指定给cdh用户su-lcdh切换到cdh创建一个hello文件vimhello内容:Hello youHellomeHellohehdfsdfs–puthello/cdh上传hello到cdh使用M R跑数据cd/opt/cloudera/parcels/CDH-5.6.1-1.cdh5.6.1.p0. 3/lib/hadoop-mapreduce/操作hadoop-mapreduce-examples.jarHadoop访问端口: http://192.168.2.111:8088/clusterhttp://192.168.2.111:8088/cluste r执行这个Jaryarnjarhadoop-mapreduce-examples.jarwordcount/cdh1/he llo/root/output/wc |
|