This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 1686d83 [Doc] Provide precautions for jdk version switching in the
compilation document (#6122)
1686d83 is described below
commit 1686d83302e9614ab525ca19f989d0c4120b1f72
Author: Mingyu Chen <[email protected]>
AuthorDate: Thu Jul 1 09:19:26 2021 +0800
[Doc] Provide precautions for jdk version switching in the compilation
document (#6122)
---
docker/README.md | 21 +++++----------------
docs/en/installing/compilation.md | 24 ++++++++++++++++++++++--
docs/zh-CN/installing/compilation.md | 24 ++++++++++++++++++++++--
3 files changed, 49 insertions(+), 20 deletions(-)
diff --git a/docker/README.md b/docker/README.md
index 8672f6c..576996a 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -38,15 +38,6 @@ under the License.
$ cp incubator-doris/docker/Dockerfile ./
```
-3. Download Oracle JDK(1.8+) RPM
-
- You need to download the Oracle JDK RPM, which can be found [here][1].
- And rename it to `jdk.rpm`.
-
-4. Download nodejs
-
- Download node-v14.8.0-linux-x64.tar.xz, which can be found [here][2].
-
After preparation, your workspace should like this:
```
@@ -63,8 +54,6 @@ After preparation, your workspace should like this:
│ ├── env.sh
│ ├── fe
│ ├── ...
-├── jdk.rpm
-├── node-v14.8.0-linux-x64.tar.xz
```
### Build docker image
@@ -74,8 +63,7 @@ $ cd /to/your/workspace/
$ docker build -t doris:v1.0 .
```
-> `doris` is docker image repository name and `v1.0` is tag name, you can
change
-> them to whatever you like.
+> `doris` is docker image repository name and `v1.0` is tag name, you can
change them to whatever you like.
### Use docker image
@@ -85,6 +73,7 @@ used to build this image before)
```console
$ docker run -it -v /your/local/path/incubator-doris/:/root/incubator-doris/
doris:v1.0
+$ $ docker run -it -v /your/local/.m2:/root/.m2 -v
/your/local/incubator-doris-DORIS-x.x.x-release/:/root/incubator-doris-DORIS-x.x.x-release/
doris:v1.0
```
Then you can build source code inside the container.
@@ -94,14 +83,14 @@ $ cd /root/incubator-doris/
$ sh build.sh
```
+**NOTICE**
+
The default JDK version is openjdk 11, if you want to use openjdk 8, you can
run the command:
```console
$ alternatives --set java java-1.8.0-openjdk.x86_64
$ alternatives --set javac java-1.8.0-openjdk.x86_64
$ export JAVA_HOME=/usr/lib/jvm/java-1.8.0
-
```
-[1]: https://www.oracle.com/technetwork/java/javase/downloads/index.html
-[2]: https://nodejs.org/dist/v14.8.0/
+The version of jdk you used to run FE must be the same version you used to
compile FE.
diff --git a/docs/en/installing/compilation.md
b/docs/en/installing/compilation.md
index 8dc4ade..0001ea8 100644
--- a/docs/en/installing/compilation.md
+++ b/docs/en/installing/compilation.md
@@ -45,7 +45,7 @@ This document focuses on how to code Doris through source
code.
apache/incubator-doris build-env-1.3 ca207367c09f 21
hours ago 3.28GB
```
-Note: For different versions of Oris, you need to download the corresponding
mirror version.
+Note: For different versions of Doris, you need to download the corresponding
mirror version.
| image version | commit id | release version |
|---|---|---|
@@ -54,7 +54,27 @@ Note: For different versions of Oris, you need to download
the corresponding mir
| apache/incubator-doris:build-env-1.2 |
[4ef5a8c](https://github.com/apache/incubator-doris/commit/4ef5a8c8560351d7fff7ff8fd51c4c7a75e006a8)
or later | 0.12.x - 0.14.0 |
| apache/incubator-doris:build-env-1.3 |
[ad67dd3](https://github.com/apache/incubator-doris/commit/ad67dd34a04c1ca960cff38e5b335b30fc7d559f)
or later | later |
-Warning: Doris 0.14.0 still used apache/incubator-doris:build-env-1.2 to
compile. After thie version, the code will use
apache/incubator-doris:build-env-1.3 to compile . **In the docker image of
build-env-1.3, the default JDK version is upgraded to 11. So FE will use
OPENJDK 11 to compile. If the docker image after build-env-1.3 is used for
compilation of FE, the Java version of FE running env also needs to be upgraded
to JDK11, Otherwise unexpected running errors may be caused. **
+**note**:
+
+> 1. Doris version 0.14.0 still uses apache/incubator-doris:build-env-1.2 to
compile, and the subsequent code will use apache/incubator-doris:build-env-1.3.
+
+> 2. In the docker image of build-env-1.3, both OpenJDK 8 and OpenJDK 11 are
included, and OpenJDK 11 is used for compilation by default. Please make sure
that the JDK version used for compiling is the same as the JDK version used at
runtime, otherwise it may cause unexpected operation errors. You can use the
following command to switch the default JDK version in container:
+>
+> Switch to JDK 8:
+>
+> ```
+> $ alternatives --set java java-1.8.0-openjdk.x86_64
+> $ alternatives --set javac java-1.8.0-openjdk.x86_64
+> $ export JAVA_HOME=/usr/lib/jvm/java-1.8.0
+> ```
+>
+> Switch to JDK 11:
+>
+> ```
+> $ alternatives --set java java-11-openjdk.x86_64
+> $ alternatives --set javac java-11-openjdk.x86_64
+> $ export JAVA_HOME=/usr/lib/jvm/java-11
+> ```
2. Running Mirror
diff --git a/docs/zh-CN/installing/compilation.md
b/docs/zh-CN/installing/compilation.md
index 2c8ff52..6806955 100644
--- a/docs/zh-CN/installing/compilation.md
+++ b/docs/zh-CN/installing/compilation.md
@@ -54,7 +54,27 @@ under the License.
| apache/incubator-doris:build-env-1.2 |
[4ef5a8c](https://github.com/apache/incubator-doris/commit/4ef5a8c8560351d7fff7ff8fd51c4c7a75e006a8)
| 0.12.x - 0.14.0 |
| apache/incubator-doris:build-env-1.3 |
[ad67dd3](https://github.com/apache/incubator-doris/commit/ad67dd34a04c1ca960cff38e5b335b30fc7d559f)
| 后续的发布版本 |
-注意: doris 0.14.0 版本仍然使用apache/incubator-doris:build-env-1.2
编译,之后的代码将使用apache/incubator-doris:build-env-1.3。**在build-env-1.3的docker镜像中,默认的JDK的版本升级到了11,所以FE将会使用OpenJDK
11进行编译。如果使用build-env-1.3之后的docker镜像进行FE编译的话,后续运行FE的Java版本也需要同时升级到JDK11,否则可能导致非预期的运行错误。**
+**注意**:
+
+> 1. doris 0.14.0 版本仍然使用apache/incubator-doris:build-env-1.2
编译,之后的代码将使用apache/incubator-doris:build-env-1.3。
+
+> 2. 在 build-env-1.3 的docker镜像中,同时包含了 OpenJDK 8 和 OpenJDK 11,并且默认使用 OpenJDK 11
编译。请确保编译使用的 JDK 版本和运行时使用的 JDK 版本一致,否则会导致非预期的运行错误。你可以使用在进入编译镜像的容器后,使用以下命令切换默认
JDK 版本:
+>
+> 切换到 JDK 8:
+>
+> ```
+> $ alternatives --set java java-1.8.0-openjdk.x86_64
+> $ alternatives --set javac java-1.8.0-openjdk.x86_64
+> $ export JAVA_HOME=/usr/lib/jvm/java-1.8.0
+> ```
+>
+> 切换到 JDK 11:
+>
+> ```
+> $ alternatives --set java java-11-openjdk.x86_64
+> $ alternatives --set javac java-11-openjdk.x86_64
+> $ export JAVA_HOME=/usr/lib/jvm/java-11
+> ```
2. 运行镜像
@@ -65,7 +85,7 @@ under the License.
同时,建议同时将镜像中 maven 的 `.m2` 目录挂载到宿主机目录,以防止每次启动镜像编译时,重复下载 maven 的依赖库。
```
- $ docker run -it -v /your/local/.m2:/root/.m2 -v
/your/local/incubator-doris-DORIS-x.x.x-release/:/root/incubator-doris-DORIS-x.x.x-release/
apachedoris/doris-dev:build-env-1.3
+ $ docker run -it -v /your/local/.m2:/root/.m2 -v
/your/local/incubator-doris-DORIS-x.x.x-release/:/root/incubator-doris-DORIS-x.x.x-release/
apache/incubator-doris:build-env-1.3
```
3. 下载源码
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]