2018-09-17 17:46:28 +00:00
|
|
|
---
|
2019-06-28 17:51:30 +00:00
|
|
|
title: From Source
|
2019-09-16 13:41:17 +00:00
|
|
|
weight: 30
|
2018-09-17 17:46:28 +00:00
|
|
|
---
|
2018-09-17 23:21:10 +00:00
|
|
|
<!---
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
2019-06-28 17:51:30 +00:00
|
|
|
{{< requirements >}}
|
|
|
|
* Java 1.8
|
|
|
|
* Maven
|
|
|
|
* Protoc (2.5)
|
|
|
|
{{< /requirements >}}
|
|
|
|
|
|
|
|
<div class="alert alert-info" role="alert">This is a guide on how to build the ozone sources. If you are <font
|
2018-09-17 17:46:28 +00:00
|
|
|
color="red">not</font>
|
2019-06-28 17:51:30 +00:00
|
|
|
planning to build sources yourself, you can safely skip this page.</div>
|
2018-09-17 17:46:28 +00:00
|
|
|
|
2019-06-28 17:51:30 +00:00
|
|
|
If you are a Hadoop ninja, and wise in the ways of Apache, you already know
|
2018-09-17 17:46:28 +00:00
|
|
|
that a real Apache release is a source release.
|
|
|
|
|
|
|
|
If you want to build from sources, Please untar the source tarball and run
|
|
|
|
the ozone build command. This instruction assumes that you have all the
|
|
|
|
dependencies to build Hadoop on your build machine. If you need instructions
|
|
|
|
on how to build Hadoop, please look at the Apache Hadoop Website.
|
|
|
|
|
2019-04-29 20:28:19 +00:00
|
|
|
```bash
|
|
|
|
mvn -f pom.ozone.xml clean package -DskipTests=true
|
|
|
|
```
|
2018-09-17 17:46:28 +00:00
|
|
|
|
2019-04-29 20:28:19 +00:00
|
|
|
This will build an ozone-\<version\>.tar.gz in your `hadoop-ozone/dist/target` directory.
|
2018-09-17 17:46:28 +00:00
|
|
|
|
|
|
|
You can copy this tarball and use this instead of binary artifacts that are
|
|
|
|
provided along with the official release.
|
|
|
|
|
|
|
|
## How to test the build
|
2019-06-28 17:51:30 +00:00
|
|
|
|
2018-09-17 17:46:28 +00:00
|
|
|
You can run the acceptance tests in the hadoop-ozone directory to make sure
|
|
|
|
that your build is functional. To launch the acceptance tests, please follow
|
2019-06-28 17:51:30 +00:00
|
|
|
the instructions in the **README.md** in the `smoketest` directory.
|
2019-04-29 20:28:19 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
cd smoketest
|
|
|
|
./test.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
You can also execute only a minimal subset of the tests:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
cd smoketest
|
|
|
|
./test.sh --env ozone basic
|
|
|
|
```
|
|
|
|
|
2019-06-28 17:51:30 +00:00
|
|
|
Acceptance tests will start a small ozone cluster and verify that ozone shell and ozone file
|
|
|
|
system is fully functional.
|