...
Build From Git Repo
Get the Apache Hadoop Ozone source code from the Apache Git repository. Then check out trunk and build it with the the hdds
Maven profile enabled.
Code Block | ||||
---|---|---|---|---|
| ||||
git clone https://gitboxgithub.com/apache.org/repos/asf/hadoop/ozone.git cd hadoop-ozone mvn clean install -Phdds -DskipTests=true -Dmaven.javadoc.skip=true -Pdist -Dtar -DskipShade |
...
Download and extract a source tarball from https://hadoopozone.apache.org/ozone/downloads/ E.g.
Code Block | ||||
---|---|---|---|---|
| ||||
tar xf hadoop-ozone-01.32.0-alpha1-src.tar.gz cd hadoop-ozone-01.32.01-alpha-src-with-hdds/ mvn clean install -Phdds -DskipTests=true -Dmaven.javadoc.skip=true -Pdist -Dtar -DskipShade |
Partial build
Ozone requires just a subset of the hadoop submodules (for example hdfs/common projects are needed but mapreduce/yarn projects are not). The build could be make faster with building just the ozone-dist project (-pl :hadoop-ozone-dist) and all of the dependencies (-am)
Code Block | ||||
---|---|---|---|---|
| ||||
mvn clean install -Phdds -DskipTests=true -Dmaven.javadoc.skip=true -Pdist -Dtar -DskipShade -am -pl :hadoop-ozone-dist |
Download Binary Release
Download and extract a binary release from https://hadoopozone.apache.org/ozone/downloads/ E.g.
Code Block | ||||
---|---|---|---|---|
| ||||
tar xf hadoop-ozone-01.32.0-alpha1.tar.gz cd hadoop-ozone-01.32.0-alpha1/ |
Start Cluster Using Docker
If you downloaded or and built a source release, run to start the docker cluster using the package you built, please add "-Ddocker.ozone-runner.version=dev" to the maven build command line. Run the following commands to start an Ozone cluster in docker containers with 3 datanodes.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<configuration>
<properties>
<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.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.scm.client.address</name><value>localhost</value></property>
<property><name>ozone.scm.block.client.address</name><value>localhost</value></property>
<property><name>ozone.om.address</name><value>localhost</value></property>
</properties>
</configuration> |
...
Replace SCM-HOSTNAME and OM-HOSTNAME with the names of the machines where you want to start the SCM and OM services respectively. It is okay to start these services on the same host. If you are unsure then just use any machine from your cluster.
...
ozone-env.sh
The only mandatory setting in hadoopozone-env.sh is JAVA_HOME. E.g.
...
Code Block | ||
---|---|---|
| ||
bin/ozone scm --init bin/ozone --daemon start sumscm |
Format the OM
Run the following commands on the OM host
Code Block | ||
---|---|---|
| ||
bin/ozone om --createObjectStoreinit bin/ozone --daemon start om |
...