Single Node Development Cluster
This is the traditional way to start a development cluster from source code. Once the package is built, you can start Ozone services by going to the ozone/dist/target/ozone-*/
directory. Your Unix shell should expand the '*' wildcard to the correct Ozone version number.
Configuration
Save the minimal snippet to ozone/dist/target/ozone-*/etc/hadoop/ozone-site.xml
in the compiled distribution.
<configuration> <properties> <property><name>ozone.scm.datanode.id.dir</name><value>/tmp/ozone/data</value></property> <property><name>ozone.replication</name><value>1</value></property> <property><name>ozone.metadata.dirs</name><value>/tmp/ozone/data/metadata</value></property> <property><name>ozone.scm.names</name><value>localhost</value></property> <property><name>ozone.om.address</name><value>localhost</value></property> </properties> </configuration>
Start Services
To start ozone, you need to start SCM, OzoneManager and DataNode. In pseudo-cluster mode, all services will be started on localhost.
bin/ozone scm --init bin/ozone --daemon start scm bin/ozone om --init bin/ozone --daemon start om bin/ozone --daemon start datanode
Run Ozone Commands
Once you have ozone running you can use these Ozone shell commands to create a volume, bucket and keys. E.g.
bin/ozone sh volume create /vol1 bin/ozone sh bucket create /vol1/bucket1 dd if=/dev/zero of=/tmp/myfile bs=1024 count=1 bin/ozone sh key put /vol1/bucket1/key1 /tmp/myfile bin/ozone sh key list /vol1/bucket1
Stop Services
bin/ozone --daemon stop om bin/ozone --daemon stop scm bin/ozone --daemon stop datanode
Clean up your Dev Environment (Optional)
Remove the following directories to wipe the Ozone pseudo-cluster state. This will also delete all user data (volumes/buckets/keys) you added to the pseudo-cluster.
rm -fr /tmp/ozone rm -fr /tmp/hadoop-${USER}*
Note: This will also wipe state for any running HDFS services.
Add more content to complete your Multi-Page Journey