Starts 1 active NameNode (with JournalNode and ZKFC), 1 standby NN (+JN,ZKFC), 1 JN, and everything else is DataNodes.
./bin/build-hdfs
- Run
./bin/build-hdfs nocompile
to skip themvn clean package
step and just re-bundle the binaries. - To remove the project build output and downloaded binaries, run
./bin/build-hdfs clean
- Upload
hdfs-mesos-*.tgz
to a node in your Mesos cluster. - Extract it with
tar zxvf hdfs-mesos-*.tgz
- Customize configuration in
hdfs-mesos-*/etc/hadoop/*-site.xml
- Check that
hostname
on that node resolves to a non-localhost IP; update /etc/hosts if necessary
cd hdfs-mesos-*
./bin/hdfs-mesos
- Check the Mesos web console to wait until all tasks are RUNNING (monitor status in JN sandboxes)
See some of the many HDFS tutorials out there for more details and explore the web UI at http://<ActiveNameNode>:50070
.
Also here is a quick sanity check:
hadoop fs -ls hdfs://<ActiveNameNode>:50071/
should show nothing for startershadoop fs -put /path/to/src_file hdfs://<ActiveNameNode>:50071/
hadoop fs -ls hdfs://<ActiveNameNode>:50071/
should now list src_file
- In mesos-site.xml, change mesos.hdfs.role to hdfs.
- On master, add the role for HDFS, by running
echo hdfs > /etc/mesos-master/role
or by setting the—-role=hdfs
. - Then restart the master by running
sudo service mesos-master restart
. - On each slave where you want to reserve resources, add specific resource reservations for the HDFS role. Here is one example:
cpus(*):4;cpus(hdfs):2;mem(*):8192;mem(hdfs):4096 > /etc/mesos-slave/resources
or by setting—-resources=cpus(*):4;cpus(hdfs):2;mem(*):8192;mem(hdfs):4096
. - On each slave with the new settings, stop the mesos slave by running
sudo service mesos-slave stop
. - On each slave with the new settings, remove the old slave state by running
rm -f /tmp/mesos/meta/slaves/latest
.
Note: This will also remove task state, so you will want to manually kill any running tasks as a precaution. - On each slave with the new settings, start the mesos slave by running
sudo service mesos-slave start
.