hadoop on nitrous.io

Prepare SSH

1
2
3
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

Configuration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
vim /home/action/software/hadoop-1.2.1/conf/hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-7-oracle

bin/hadoop namenode -format

bin/hadoop fs -mkdir input
bin/hadoop fs -put conf input
bin/hadoop fs -cp conf/*.xml input

bin/start-all.sh

bin/hadoop jar hadoop-examples-1.2.1.jar grep input output 'dfs[a-z.]+'
bin/hadoop fs -rmr output

bin/hadoop jar hadoop-examples-1.2.1.jar wordcount input output
bin/hadoop fs -rmr output

bin/stop-all.sh

core-site.xml

1
2
3
4
5
6
7
8
9
10
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
  <property>
    <name>hadoop.tmp.dir</name>
    <value>/home/action/tmp</value>
  </property>
</configuration>

hdfs-site.xml

1
2
3
4
5
6
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>

mapred-site.xml

1
2
3
4
5
6
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
</configuration>

hadoop.tmp.dir must be set, or it will throw error

admin interface

Reference

angelosun.iteye.com
shaurong.blogspot.hk
blog.csdn.net