Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is the traditional method. Please follow the build instructions first (see Build Ozone).

Table of Contents
stylecircle

Once the package is built, you can start Ozone services by going to the hadoop-dist/target/ozone-0.?.?-SNAPSHOT directory. Your Unix shell will expand the '?.?.?' wildcard to the correct Ozone version number.

Configuration

Save the minimal snippet to hadoop-dist/target/ozone-?.?.?-SNAPSHOT/etc/hadoop/ozone-site.xml in the compiled distribution.

Code Block
languagexml
<configuration>
<properties>
<property><name>ozone.scm.block.client.address</name><value>localhost</value></property>
<property><name>ozone.handler.type</name><value>distributed</value></property>
<property><name>ozone.enabled</name><value>True</value></property>
<property><name>ozone.scm.datanode.id</name><value>/tmp/ozone/data/datanode.id</value></property>
<property><name>ozone.scm.client.address</name><value>localhost</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.

Code Block
languagebash
  bin/ozone scm -init
  bin/ozone --daemon start scm
  bin/ozone om -createObjectStore
  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.

Code Block
languagebash
bin/ozone oz volume create --user=$USER vol1
bin/ozone oz bucket create vol1/bucket1
dd if=/dev/zero of=/tmp/myfile bs=1024 count=1
bin/ozone oz key put vol1/bucket1/key1 /tmp/myfile

Stop Services

Code Block
ozone --daemon stop om
ozone --daemon stop scm
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.

Code Block
rm -fr /tmp/ozone
rm -fr /tmp/hadoop-${USER}*

...

Content moved to Try out Ozone#SingleNodeDevelopmentCluster