用户组:游客
sudo dpkg -i cdh5-repository_1.0_all.deb复制代码
curl -s http://archive.cloudera.com/cdh5/ubuntu/precise/amd64/cdh/archive.key | sudo apt-key add -复制代码
sudo apt-get update复制代码
sudo apt-get install hadoop-conf-pseudo复制代码
dpkg -L hadoop-conf-pseudo复制代码
/etc/hadoop/conf.复制代码
sudo -u hdfs hdfs namenode -format复制代码
for x in `cd /etc/init.d ; ls hadoop-hdfs-*` ; do sudo service $x start ; done复制代码
sudo -u hdfs hadoop fs -rm -r /tmp复制代码
sudo -u hdfs hadoop fs -mkdir -p /tmp/hadoop-yarn/staging/history/done_intermediate sudo -u hdfs hadoop fs -chown -R mapred:mapred /tmp/hadoop-yarn/staging sudo -u hdfs hadoop fs -chmod -R 1777 /tmp sudo -u hdfs hadoop fs -mkdir -p /var/log/hadoop-yarn sudo -u hdfs hadoop fs -chown yarn:mapred /var/log/hadoop-yarn复制代码
drwxrwxrwt - hdfs supergroup 0 2012-05-31 15:31 /tmp drwxr-xr-x - hdfs supergroup 0 2012-05-31 15:31 /tmp/hadoop-yarn drwxrwxrwt - mapred mapred 0 2012-05-31 15:31 /tmp/hadoop-yarn/staging drwxr-xr-x - mapred mapred 0 2012-05-31 15:31 /tmp/hadoop-yarn/staging/history drwxrwxrwt - mapred mapred 0 2012-05-31 15:31 /tmp/hadoop-yarn/staging/history/done_intermediate drwxr-xr-x - hdfs supergroup 0 2012-05-31 15:31 /var drwxr-xr-x - hdfs supergroup 0 2012-05-31 15:31 /var/log drwxr-xr-x - yarn mapred 0 2012-05-31 15:31 /var/log/hadoop-yarn复制代码
sudo service hadoop-yarn-resourcemanager start sudo service hadoop-yarn-nodemanager start sudo service hadoop-mapreduce-historyserver start复制代码
sudo -u hdfs hadoop fs -mkdir /user/aboutyun sudo -u hdfs hadoop fs -chown aboutyun/user/aboutyun复制代码
sudo -u hdfs hadoop fs -mkdir /user/aboutyun复制代码
sudo -u hdfs hadoop fs -chown aboutyun /user/aboutyun复制代码
hadoop fs -mkdir input复制代码
hadoop fs -put /etc/hadoop/conf/*.xml input复制代码
hadoop fs -ls input Found 3 items: -rw-r--r-- 1 joe supergroup 1348 2012-02-13 12:21 input/core-site.xml -rw-r--r-- 1 joe supergroup 1913 2012-02-13 12:21 input/hdfs-site.xml -rw-r--r-- 1 joe supergroup 1001 2012-02-13 12:21 input/mapred-site.xml复制代码
export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce复制代码
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar grep input output23 'dfs[a-z.]+'复制代码
hadoop fs -ls复制代码
hadoop fs -ls output23 Found 2 items -rw-r--r-- 1 aboutyun aboutyun 0 2014-10-05 05:45 output23/_SUCCESS -rw-r--r-- 1 aboutyun aboutyun 244 2014-10-05 05:45 output23/part-r-00000复制代码
$ hadoop fs -cat output23/part-r-00000 | head 1 dfs.safemode.min.datanodes 1 dfs.safemode.extension 1 dfs.replication 1 dfs.permissions.enabled 1 dfs.namenode.name.dir 1 dfs.namenode.checkpoint.dir 1 dfs.datanode.data.dir复制代码
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
经常参与各类话题的讨论,发帖内容较有主见
经常帮助其他会员答疑
积极宣传本站,为本站带来更多注册会员
积极宣传本站,为本站带来更多的用户访问量
长期对论坛的繁荣而不断努力,或多次提出建设性意见
活跃且尽责职守的版主
为论坛做出突出贡献的会员
版主
666
主题
1249
帖子
322
粉丝
查看 »