In order to check that the configuration has been set up correctly, start up HDFS and MapReduce and try to run some simple jobs.
On the NameNode host:
su $HDFS_USER /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start namenode
On the SecondaryNameNode host:
su $HDFS_USER /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start secondarynamenode
On each DataNode host:
su root /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start datanode
Note You must start DataNodes as
root
because they use a privileged port.On the JobTracker host:
su $MAPREDUCE_USER /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start jobtracker
On the History Server host:
su $MAPREDUCE_USER /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start historyserver
On each TaskTracker host:
su $MAPREDUCE_USER /usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start tasktracker
Open Kerberos administration. On the KDC:
/usr/sbin/kadmin.local
Create a test
hdfs
principal. At thekadmin.local
prompt:addprinc hdfs@EXAMPLE.COM
You are asked to enter and confirm a password for the principal.
Exit
kadmin.local
:exit
On a machine in the cluster, switch to the
hdfs
UNIX user and then log into Kerberos:su $HDFS_USER kinit
Run some sample MapReduce jobs, like teragen and terasort:
/usr/lib/hadoop/bin/hadoop jar /usr/lib/hadoop/hadoop-examples.jar teragen 100000 /test/10gsort/input /usr/lib/hadoop/bin/hadoop jar /usr/lib/hadoop/hadoop-examples.jar terasort /test/10gsort/input /test/10gsort/output