You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hadoop-hdds/docs/content/start/FromSource.md
+80-11Lines changed: 80 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,15 @@ weight: 30
20
20
-->
21
21
22
22
{{< requirements >}}
23
-
* Java 1.8
24
-
* Maven
23
+
* x86 or ARM64
24
+
* Linux or MacOS
25
+
* JDK 1.8 or higher
26
+
*[Maven 3.6 or later](https://maven.apache.org/download.cgi)
27
+
* Internet connection for first build (to fetch all Maven and Ozone dependencies)
28
+
29
+
You will also need to install the following dependencies to build native code (optional):
30
+
* gcc
31
+
* cmake
25
32
{{< /requirements >}}
26
33
27
34
<divclass="alert alert-info"role="alert">
@@ -32,29 +39,91 @@ planning to build sources yourself, you can safely skip this page.
32
39
33
40
</div>
34
41
35
-
If you are a Hadoop ninja, and wise in the ways of Apache, you already know
36
-
that a real Apache release is a source release.
37
-
38
42
If you want to build from sources, Please untar the source tarball (or clone the latest code
39
-
from the [git repository](https://github.com/apache/ozone)) and run the ozone build command. This instruction assumes that you have all the
40
-
dependencies to build Hadoop on your build machine. If you need instructions
41
-
on how to build Hadoop, please look at the Apache Hadoop Website.
43
+
from the [git repository](https://github.com/apache/ozone)).
44
+
45
+
## ARM-based Linux
46
+
If you are using an ARM-based Linux, patch protobuf 2.5.0 and build it from source.
42
47
43
48
```bash
44
-
mvn clean package -DskipTests=true
49
+
sudo yum install -y make cmake gcc g++ patch
50
+
# or for Ubuntu and Debian:
51
+
# sudo apt-get install -y make cmake gcc g++ patch
52
+
53
+
# Download protobuf 2.5.0 tarball
54
+
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz | tar zx
This will build an `ozone-\<version\>` directory in your `hadoop-ozone/dist/target` directory.
48
107
49
108
You can copy this tarball and use this instead of binary artifacts that are
50
109
provided along with the official release.
51
110
52
-
To create tar file distribution, use the `-Pdist` profile:
111
+
Depending on the network speed, the build can take anywhere from 10 minutes to 20 minutes.
112
+
113
+
To create tarball file distribution, use the `-Pdist` profile:
53
114
54
115
```bash
55
116
mvn clean package -DskipTests=true -Pdist
56
117
```
57
118
119
+
## Other useful Maven build options
120
+
121
+
* Use `-DskipShade` to skip shaded Ozone FS jar file creation. Saves time, but you can't test integration with other software that uses Ozone as a Hadoop-compatible file system.
122
+
* Use `-DskipRecon` to skip building Recon Web UI. It saves about 2 minutes.
123
+
* Use `-Dmaven.javadoc.skip=true` to skip building javadocs.
124
+
* Use `-Drocks_tools_native` to build the RocksDB native code for the Ozone Snapshot feature. This is optional and not required for building Ozone. It is only needed if you want to build the RocksDB native code for Ozone.
125
+
126
+
58
127
## How to run Ozone from build
59
128
60
129
When you have the new distribution, you can start a local cluster [with docker-compose]({{< ref "start/RunningViaDocker.md">}}).
@@ -67,4 +136,4 @@ docker-compose up -d
67
136
68
137
## How to test the build
69
138
70
-
`compose` subfolder contains multiple type of example setup (secure, non-secure, HA, Yarn). They can be tested with the help of [robotframework](http://robotframework.org/) with executing `test.sh` in any of the directories.
139
+
`compose` subfolder contains multiple type of example setup (secure, non-secure, HA, Yarn). They can be tested with the help of [robotframework](http://robotframework.org/) with executing `test.sh` in any of the directories.
0 commit comments