This is an automated email from the ASF dual-hosted git repository.

diwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 9203e0392f [typo](docs) add mac local dev docs (#19342)
9203e0392f is described below

commit 9203e0392f213309471053b5197569bef1f16694
Author: yongkang.zhong <zhong...@qq.com>
AuthorDate: Sat May 6 22:58:40 2023 +0800

    [typo](docs) add mac local dev docs (#19342)
    
    * [typo](docs) add mac local dev docs
---
 .../developer-guide/mac-dev/be-clion-dev.md        |  78 +++++++++++
 .../developer-guide/mac-dev/dev-prepare.md         | 143 +++++++++++++++++++++
 .../developer-guide/mac-dev/fe-idea-dev.md         |  80 ++++++++++++
 .../docs/install/source-install/compilation-mac.md |   4 +-
 docs/images/mac-clion-deployment1.png              | Bin 0 -> 129426 bytes
 docs/images/mac-clion-deployment2.png              | Bin 0 -> 187708 bytes
 docs/images/mac-clion-deployment3.png              | Bin 0 -> 258431 bytes
 docs/images/mac-clion-deployment4.png              | Bin 0 -> 25342 bytes
 docs/images/mac-clion-deployment5.png              | Bin 0 -> 171195 bytes
 docs/images/mac-clion-deployment6.png              | Bin 0 -> 175101 bytes
 docs/images/mac-clion-deployment7.png              | Bin 0 -> 408439 bytes
 docs/images/mac-idea-deployment1.png               | Bin 0 -> 183478 bytes
 docs/images/mac-idea-deployment2.png               | Bin 0 -> 370468 bytes
 docs/images/mac-idea-deployment3.png               | Bin 0 -> 17394 bytes
 docs/images/mac-idea-deployment4.png               | Bin 0 -> 151080 bytes
 docs/images/mac-idea-deployment5.png               | Bin 0 -> 142210 bytes
 docs/images/mac-idea-deployment6.png               | Bin 0 -> 236799 bytes
 docs/sidebarsCommunity.json                        |   9 ++
 .../zh-CN/community/developer-guide/fe-idea-dev.md |   2 +-
 .../developer-guide/mac-dev/be-clion-dev.md        |  78 +++++++++++
 .../developer-guide/mac-dev/dev-prepare.md         | 143 +++++++++++++++++++++
 .../developer-guide/mac-dev/fe-idea-dev.md         |  78 +++++++++++
 .../docs/install/source-install/compilation-mac.md |   6 +-
 23 files changed, 615 insertions(+), 6 deletions(-)

diff --git a/docs/en/community/developer-guide/mac-dev/be-clion-dev.md 
b/docs/en/community/developer-guide/mac-dev/be-clion-dev.md
new file mode 100644
index 0000000000..6d1faad722
--- /dev/null
+++ b/docs/en/community/developer-guide/mac-dev/be-clion-dev.md
@@ -0,0 +1,78 @@
+---
+{
+    'title': 'Setting Up Dev Env on Mac for Doris BE - CLion', 
+    'language': 'en'
+}
+---
+
+<!--
+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.
+-->
+
+## Open the Doris code root directory
+
+![deployment1](/images/mac-clion-deployment1.png)
+
+## Configure CLion
+
+1. Configure Toolchain
+
+   Refer to the figure below, after configuring all the detections 
successfully, there will be no problem
+
+    ![deployment2](/images/mac-clion-deployment2.png)
+   
+2. Configure CMake
+
+    Refer to the configuration below
+
+    ![deployment3](/images/mac-clion-deployment3.png)
+
+   After the configuration is completed and confirmed, the CMake file will be 
automatically loaded for the first time. If it is not automatically loaded, you 
can manually right-click `$DORIS_HOME/be/CMakeLists.txt` and select Load
+
+## Configure Debug BE
+
+select edit configuration
+
+  ![deployment4](/images/mac-clion-deployment4.png)
+
+Add environment variables to doris_be
+
+Refer to the environment variables of export in `be/bin/start_be.sh` in the 
root directory of the Doris code to configure the environment variables.
+The Doris directory value of the environment variable points to the directory 
copied by myself in the preparation work.
+
+Environment variable reference:
+
+```
+JAVA_OPTS=-Xmx1024m -DlogPath=$DORIS_HOME/log/jni.log 
-Dsun.java.command=DorisBE -XX:-CriticalJNINatives -DJDBC_MIN_POOL=1 
-DJDBC_MAX_POOL=100 -DJDBC_MAX_IDEL_TIME=300000;
+LOG_DIR=~/DorisDev/doris-run/be/log;
+NLS_LANG=AMERICAN_AMERICA.AL32UTF8;
+ODBCSYSINI=~/DorisDev/doris-run/be/conf;
+PID_DIR=~/DorisDev/doris-run/be/log;
+UDF_RUNTIME_DIR=~/DorisDev/doris-run/be/lib/udf-runtime;
+DORIS_HOME=~/DorisDev/doris-run/be
+```
+
+![deployment5](/images/mac-clion-deployment5.png)
+![deployment6](/images/mac-clion-deployment6.png)
+
+
+## Start BE
+
+Click Run or Debug to start compiling, and be will start after compiling
+
+![deployment7](/images/mac-clion-deployment7.png)
diff --git a/docs/en/community/developer-guide/mac-dev/dev-prepare.md 
b/docs/en/community/developer-guide/mac-dev/dev-prepare.md
new file mode 100644
index 0000000000..54f59427c5
--- /dev/null
+++ b/docs/en/community/developer-guide/mac-dev/dev-prepare.md
@@ -0,0 +1,143 @@
+---
+{
+    'title': 'Dev & Debug prepare on Mac', 
+    'language': 'en'
+}
+---
+
+<!--
+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.
+-->
+
+## Install environment dependency
+
+    ```
+    brew install automake autoconf libtool pkg-config texinfo coreutils 
gnu-getopt \
+    python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@16 
openjdk@8 npm
+    ```
+   
+    **Dependency description:**
+        1. Java, Maven, etc. can be downloaded separately for easy management
+            - Mac recommend [Zulu 
JDK8](https://www.azul.com/downloads/?version=java-8-lts&os=macos&package=jdk#zulu)
+            - Maven Download from [Maven 
website](https://maven.apache.org/download.cgi) is ok
+            - Self-downloaded Java and Maven need to configure environment 
variables
+        2. Other dependent environment variables (example for Apple Silicon 
Macs)
+            - llvm: `export PATH="/opt/homebrew/opt/llvm/bin:$PATH"`
+            - bison: `export PATH = "/opt/homebrew/opt/bison/bin:$PATH`
+            - texinfo: `export PATH = "/opt/homebrew/opt/texinfo/bin:$PATH`
+            - python: `ln -s -f /opt/homebrew/bin/python3 
/opt/homebrew/bin/python`
+   
+## Install thrift
+
+    **Note:** Thrift needs to be installed only when debugging FE only. When 
debugging BE and FE at the same time, the three-party library of BE contains 
thrift
+
+    ```
+    MacOS: 
+       1. Download:`brew install thrift@0.16.0`
+       2. Create a soft link: 
+          `mkdir -p ./thirdparty/installed/bin`
+          # Apple Silicon 芯片 macOS
+          `ln -s /opt/homebrew/Cellar/thrift@0.16.0/0.16.0/bin/thrift 
./thirdparty/installed/bin/thrift`
+          # Intel 芯片 macOS
+          `ln -s /usr/local/Cellar/thrift@0.16.0/0.16.0/bin/thrift 
./thirdparty/installed/bin/thrift`
+    
+    Note:macOS implement `brew install thrift@0.16.0` it may report an error 
that the version cannot be found. The solution is as follows, execute in the 
terminal:
+       1. `brew tap-new $USER/local-tap`
+       2. `brew extract --version='0.16.0' thrift $USER/local-tap`
+       3. `brew install thrift@0.16.0`
+    reference link: 
`https://gist.github.com/tonydeng/02e571f273d6cce4230dc8d5f394493c`
+    ```
+
+## pull your own code
+
+    1. pull code
+
+        ``` 
+        cd ~
+        mkdir DorisDev
+        cd DorisDev
+        git clone https://github.com/GitHubID/doris.git
+        ```
+
+    2. set environment variables
+ 
+        ```
+        export DORIS_HOME=~/DorisDev/doris
+        export PATH=$DORIS_HOME/bin:$PATH
+        ```
+
+## Download Doris compilation dependencies
+
+   1. The [Apache Doris Third Party 
Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation) 
page contains the source code of all third-party libraries. You can download 
[doris-thirdparty-source.tgz](https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz)
 to obtain them.
+
+   2. You can download the _**precompiled**_ third party library from the 
[Apache Doris Third Party 
Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation) 
page. You may refer to the following commands:
+       ```shell
+       cd thirdparty
+       rm -rf installed
+
+       # Intel chips
+       curl -L 
https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-x86_64.tar.xz
 \
+           -o - | tar -Jxf -
+
+       # Apple Silicon chips
+       curl -L 
https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-arm64.tar.xz
 \
+           -o - | tar -Jxf -
+
+       # Make sure that protoc and thrift can run successfully.
+       cd installed/bin
+
+       ./protoc --version
+       ./thrift --version
+       ```
+   3. When running `protoc` or `thrift`, you may meet an error which says 
**the app can not be opened because the developer cannot be verified**. Go to 
`Security & Privacy`. Click the `Open Anyway` button in the `General` pane to 
confirm your intent to open the app. See 
[https://support.apple.com/en-us/HT202491](https://support.apple.com/en-us/HT202491).
+
+## Set `file descriptors`
+
+    ```
+    # bash
+    echo 'ulimit -n 65536' >>~/.bashrc
+    
+    # zsh
+    echo 'ulimit -n 65536' >>~/.zshrc
+    ```
+
+## compile Doris
+
+    ```
+    cd $DORIS_HOME
+    sh build.sh
+    ```
+
+## Configure Debug environment
+
+    ```
+    # cp out the compiled package
+    
+    cp -r output ../doris-run
+    
+    # Configure FE/BE's conf
+    1、IP、directory
+    2、BE additional configuration min_file_descriptor_number = 10000
+    ```
+
+## Start Debugging with IDE
+
+    [CLion Debug BE On Mac](./be-clion-dev.md)
+
+    [IntelliJ IDEA Debug FE On Mac](./fe-idea-dev.md)
+    
\ No newline at end of file
diff --git a/docs/en/community/developer-guide/mac-dev/fe-idea-dev.md 
b/docs/en/community/developer-guide/mac-dev/fe-idea-dev.md
new file mode 100644
index 0000000000..61d0114a94
--- /dev/null
+++ b/docs/en/community/developer-guide/mac-dev/fe-idea-dev.md
@@ -0,0 +1,80 @@
+---
+{
+  "title": "Setting Up Dev Env on Mac for Doris FE - IntelliJ IDEA",
+  "language": "en"
+}
+---
+
+<!-- 
+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.
+-->
+
+## Open the FE directory of the Doris code
+
+**Here we do not directly open the root directory of the Doris project, but 
open the FE directory (very important!! In order not to conflict with CLion**
+
+![deployment1](/images/mac-idea-deployment1.png)
+
+## Generate FE code
+
+1. Open the IDEA terminal and go to the root directory of the code to execute
+
+   `sh generated-source.sh`
+
+   Just wait for Done to be displayed
+    
+    ![deployment2](/images/mac-idea-deployment2.png)
+
+2. Copy help-resource.zip
+
+    ```
+    Enter the dorisdocs directory and execute the following command
+    cd doris/docs
+    sh build_help_zip.sh
+    cp -r build/help-resource.zip ../fe/fe-core/target/classes
+    ```
+
+## Configure Debug FE
+
+- select edit configuration
+
+  ![deployment3](/images/mac-idea-deployment3.png)
+
+- Add DorisFE configuration
+
+  Add an application configuration with the + sign in the upper left corner. 
For specific configuration, refer to the figure below
+
+  ![deployment4](/images/mac-idea-deployment4.png)
+
+  - Select the fe directory under the source code directory as the working 
directory
+  - Refer to the environment variables of export in `fe/bin/start_fe.sh` in 
the root directory of the Doris code to configure the environment variables.
+    The Doris directory value of the environment variable points to the 
directory copied by myself in the preparation work.
+    - Environment variable reference:
+    ```
+    JAVA_OPTS=-Xmx8092m;
+    LOG_DIR=~/DorisDev/doris-run/fe/log;
+    PID_DIR=~/DorisDev/doris-run/fe/log;
+    DORIS_HOME=~/DorisDev/doris-run/fe
+    ```
+    ![deployment5](/images/mac-idea-deployment5.png)
+
+## Start FE
+
+Click Run or Debug to start compiling, and fe will start after compiling
+
+![deployment6](/images/mac-idea-deployment6.png)
diff --git a/docs/en/docs/install/source-install/compilation-mac.md 
b/docs/en/docs/install/source-install/compilation-mac.md
index 7adea0e339..54f5359b78 100644
--- a/docs/en/docs/install/source-install/compilation-mac.md
+++ b/docs/en/docs/install/source-install/compilation-mac.md
@@ -38,7 +38,7 @@ This topic is about how to compile Doris from source with 
macOS (both x86_64 and
 1. Use [Homebrew](https://brew.sh/) to install dependencies.
     ```shell
     brew install automake autoconf libtool pkg-config texinfo coreutils 
gnu-getopt \
-        python@3 cmake ninja ccache bison byacc gettext wget pcre maven 
llvm@15 openjdk@11 npm
+        python@3 cmake ninja ccache bison byacc gettext wget pcre maven 
llvm@16 openjdk@8 npm
     ```
 
 2. Compile from source.
@@ -110,4 +110,4 @@ Fail to start BE up. The log shows: `fail to open 
StorageEngine, res=file descri
 To fix this, please refer to the "Start-up" section above and reset  `file 
descriptors`.
 
 ### Java Version
-Java 11 is recommended.
+Java 8 is recommended.
diff --git a/docs/images/mac-clion-deployment1.png 
b/docs/images/mac-clion-deployment1.png
new file mode 100644
index 0000000000..934f64f542
Binary files /dev/null and b/docs/images/mac-clion-deployment1.png differ
diff --git a/docs/images/mac-clion-deployment2.png 
b/docs/images/mac-clion-deployment2.png
new file mode 100644
index 0000000000..8ca4ff46d5
Binary files /dev/null and b/docs/images/mac-clion-deployment2.png differ
diff --git a/docs/images/mac-clion-deployment3.png 
b/docs/images/mac-clion-deployment3.png
new file mode 100644
index 0000000000..50b123525b
Binary files /dev/null and b/docs/images/mac-clion-deployment3.png differ
diff --git a/docs/images/mac-clion-deployment4.png 
b/docs/images/mac-clion-deployment4.png
new file mode 100644
index 0000000000..28a7defbe5
Binary files /dev/null and b/docs/images/mac-clion-deployment4.png differ
diff --git a/docs/images/mac-clion-deployment5.png 
b/docs/images/mac-clion-deployment5.png
new file mode 100644
index 0000000000..2a1fc6e40d
Binary files /dev/null and b/docs/images/mac-clion-deployment5.png differ
diff --git a/docs/images/mac-clion-deployment6.png 
b/docs/images/mac-clion-deployment6.png
new file mode 100644
index 0000000000..0a53b8089d
Binary files /dev/null and b/docs/images/mac-clion-deployment6.png differ
diff --git a/docs/images/mac-clion-deployment7.png 
b/docs/images/mac-clion-deployment7.png
new file mode 100644
index 0000000000..578198d30b
Binary files /dev/null and b/docs/images/mac-clion-deployment7.png differ
diff --git a/docs/images/mac-idea-deployment1.png 
b/docs/images/mac-idea-deployment1.png
new file mode 100644
index 0000000000..bdf003d6a0
Binary files /dev/null and b/docs/images/mac-idea-deployment1.png differ
diff --git a/docs/images/mac-idea-deployment2.png 
b/docs/images/mac-idea-deployment2.png
new file mode 100644
index 0000000000..a5d6128a46
Binary files /dev/null and b/docs/images/mac-idea-deployment2.png differ
diff --git a/docs/images/mac-idea-deployment3.png 
b/docs/images/mac-idea-deployment3.png
new file mode 100644
index 0000000000..8619f5c498
Binary files /dev/null and b/docs/images/mac-idea-deployment3.png differ
diff --git a/docs/images/mac-idea-deployment4.png 
b/docs/images/mac-idea-deployment4.png
new file mode 100644
index 0000000000..3480513afd
Binary files /dev/null and b/docs/images/mac-idea-deployment4.png differ
diff --git a/docs/images/mac-idea-deployment5.png 
b/docs/images/mac-idea-deployment5.png
new file mode 100644
index 0000000000..b064cfda11
Binary files /dev/null and b/docs/images/mac-idea-deployment5.png differ
diff --git a/docs/images/mac-idea-deployment6.png 
b/docs/images/mac-idea-deployment6.png
new file mode 100644
index 0000000000..5d00b5564c
Binary files /dev/null and b/docs/images/mac-idea-deployment6.png differ
diff --git a/docs/sidebarsCommunity.json b/docs/sidebarsCommunity.json
index c3ec35bd1a..c3094869e2 100644
--- a/docs/sidebarsCommunity.json
+++ b/docs/sidebarsCommunity.json
@@ -51,6 +51,15 @@
                 "developer-guide/fe-vscode-dev",
                 "developer-guide/be-vscode-dev",
                 "developer-guide/be-clion-dev",
+                {
+                    "type": "category",
+                    "label": "Mac Local Dev",
+                    "items": [
+                        "developer-guide/mac-dev/dev-prepare",
+                        "developer-guide/mac-dev/be-clion-dev",
+                        "developer-guide/mac-dev/fe-idea-dev"
+                    ]
+                },
                 "developer-guide/java-format-code",
                 "developer-guide/cpp-format-code",
                 "developer-guide/cpp-diagnostic-code",
diff --git a/docs/zh-CN/community/developer-guide/fe-idea-dev.md 
b/docs/zh-CN/community/developer-guide/fe-idea-dev.md
index f570b2c4e8..c1a9586b45 100644
--- a/docs/zh-CN/community/developer-guide/fe-idea-dev.md
+++ b/docs/zh-CN/community/developer-guide/fe-idea-dev.md
@@ -57,7 +57,7 @@ JDK1.8+, IntelliJ IDEA
 
         将其中的:
 
-        `#rl 
"https://www.apache.org/dyn/closer.lua?path=thrift/0.16.0/thrift-0.16.0.tar.gz"`
+        `url 
"https://www.apache.org/dyn/closer.lua?path=thrift/0.16.0/thrift-0.16.0.tar.gz"`
 
         修改为:
 
diff --git a/docs/zh-CN/community/developer-guide/mac-dev/be-clion-dev.md 
b/docs/zh-CN/community/developer-guide/mac-dev/be-clion-dev.md
new file mode 100644
index 0000000000..de27fdd0fc
--- /dev/null
+++ b/docs/zh-CN/community/developer-guide/mac-dev/be-clion-dev.md
@@ -0,0 +1,78 @@
+---
+{
+    'title': 'Doris BE Mac 开发环境搭建 - CLion', 
+    'language': 'zh-CN'
+}
+---
+
+<!--
+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.
+-->
+
+## 打开 Doris 代码根目录
+
+![deployment1](/images/mac-clion-deployment1.png)
+
+## 配置 CLion
+
+1. 配置工具链
+
+    参考下图,配置好全部检测成功就没问题了
+
+    ![deployment2](/images/mac-clion-deployment2.png)
+   
+2. 配置 CMake
+
+    参考下图配置
+
+    ![deployment3](/images/mac-clion-deployment3.png)
+
+    配置完成确认后第一次会自动加载 CMake 文件,若没有自动加载,可手动右键点击 `$DORIS_HOME/be/CMakeLists.txt` 
选择加载
+
+## 配置 Debug BE
+
+选择编辑配置
+
+  ![deployment4](/images/mac-clion-deployment4.png)
+
+给 doris_be 添加环境变量
+
+参照 Doris 代码根目录下的 `be/bin/start_be.sh` 中 export 的环境变量进行环境变量配置。 
+其中环境变量的Doris目录值指向准备工作里里自己copy出来的目录。
+
+环境变量参考:
+
+```
+JAVA_OPTS=-Xmx1024m -DlogPath=$DORIS_HOME/log/jni.log 
-Dsun.java.command=DorisBE -XX:-CriticalJNINatives -DJDBC_MIN_POOL=1 
-DJDBC_MAX_POOL=100 -DJDBC_MAX_IDEL_TIME=300000;
+LOG_DIR=~/DorisDev/doris-run/be/log;
+NLS_LANG=AMERICAN_AMERICA.AL32UTF8;
+ODBCSYSINI=~/DorisDev/doris-run/be/conf;
+PID_DIR=~/DorisDev/doris-run/be/log;
+UDF_RUNTIME_DIR=~/DorisDev/doris-run/be/lib/udf-runtime;
+DORIS_HOME=~/DorisDev/doris-run/be
+```
+
+![deployment5](/images/mac-clion-deployment5.png)
+![deployment6](/images/mac-clion-deployment6.png)
+
+
+## 启动Debug
+
+点击 Run 或者 Debug 就会开始编译,编译完 be 就会启动
+
+![deployment7](/images/mac-clion-deployment7.png)
diff --git a/docs/zh-CN/community/developer-guide/mac-dev/dev-prepare.md 
b/docs/zh-CN/community/developer-guide/mac-dev/dev-prepare.md
new file mode 100644
index 0000000000..e0a5f5cff6
--- /dev/null
+++ b/docs/zh-CN/community/developer-guide/mac-dev/dev-prepare.md
@@ -0,0 +1,143 @@
+---
+{
+    'title': 'Doris Mac 开发调试准备', 
+    'language': 'zh-CN'
+}
+---
+
+<!--
+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.
+-->
+
+## 安装环境依赖
+
+    ```
+    brew install automake autoconf libtool pkg-config texinfo coreutils 
gnu-getopt \
+    python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@16 
openjdk@8 npm
+    ```
+   
+    **依赖说明:**
+        1. Java、Maven 等可以单独下载,方便管理
+            - Mac 推荐 [Zulu 
JDK8](https://www.azul.com/downloads/?version=java-8-lts&os=macos&package=jdk#zulu)
+            - Maven 从 [Maven 官网下载](https://maven.apache.org/download.cgi)即可
+            - 自行下载的 Java 与 Maven 需要配置环境变量
+        2. 其他依赖的环境变量 (示例为 Apple Silicon 芯片 Mac)
+            - llvm: `export PATH="/opt/homebrew/opt/llvm/bin:$PATH"`
+            - bison: `export PATH = "/opt/homebrew/opt/bison/bin:$PATH`
+            - texinfo: `export PATH = "/opt/homebrew/opt/texinfo/bin:$PATH`
+            - python: `ln -s -f /opt/homebrew/bin/python3 
/opt/homebrew/bin/python`
+   
+## 安装 thrift
+
+    **注意:** 仅在只调试FE的情况下需要安装 thrift,同时调试 BE 和 FE 时,BE 的三方库包含 thrift
+
+    ```
+    MacOS: 
+       1. 下载:`brew install thrift@0.16.0`
+       2. 建立软链接: 
+          `mkdir -p ./thirdparty/installed/bin`
+          # Apple Silicon 芯片 macOS
+          `ln -s /opt/homebrew/Cellar/thrift@0.16.0/0.16.0/bin/thrift 
./thirdparty/installed/bin/thrift`
+          # Intel 芯片 macOS
+          `ln -s /usr/local/Cellar/thrift@0.16.0/0.16.0/bin/thrift 
./thirdparty/installed/bin/thrift`
+    
+    注:macOS 执行 `brew install thrift@0.16.0` 可能会报找不到版本的错误,解决方法如下,在终端执行:
+       1. `brew tap-new $USER/local-tap`
+       2. `brew extract --version='0.16.0' thrift $USER/local-tap`
+       3. `brew install thrift@0.16.0`
+    参考链接: `https://gist.github.com/tonydeng/02e571f273d6cce4230dc8d5f394493c`
+    ```
+
+## 拉取自己的代码
+
+    1. 拉取代码
+
+        ``` 
+        cd ~
+        mkdir DorisDev
+        cd DorisDev
+        git clone https://github.com/GitHubID/doris.git
+        ```
+
+    2. 设置环境变量
+ 
+        ```
+        export DORIS_HOME=~/DorisDev/doris
+        export PATH=$DORIS_HOME/bin:$PATH
+        ```
+
+## 下载 Doris 编译依赖
+
+    1. [Apache Doris Third Party 
Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation)页面有所有第三方库的源码,可以直接下载[doris-thirdparty-source.tgz](https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz)获得。
+
+    2. 可以在[Apache Doris Third Party 
Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation)页面直接下载预编译好的第三方库,省去编译第三方库的过程,参考下面的命令。
+        ```shell
+        cd thirdparty
+        rm -rf installed
+
+        # Intel 芯片
+        curl -L 
https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-x86_64.tar.xz
 \
+            -o - | tar -Jxf -
+
+        # Apple Silicon 芯片
+        curl -L 
https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-arm64.tar.xz
 \
+            -o - | tar -Jxf -
+
+        # 保证protoc和thrift能够正常运行
+        cd installed/bin
+
+        ./protoc --version
+        ./thrift --version
+        ```
+    3. 
运行`protoc`和`thrift`的时候可能会遇到**无法打开,因为无法验证开发者**的问题,可以到前往`安全性与隐私`。点按`通用`面板中的`仍要打开`按钮,以确认打算打开该二进制。参考[https://support.apple.com/zh-cn/HT202491](https://support.apple.com/zh-cn/HT202491)。
+
+## 修改系统最大文件句柄数
+
+    ```
+    # bash
+    echo 'ulimit -n 65536' >>~/.bashrc
+    
+    # zsh
+    echo 'ulimit -n 65536' >>~/.zshrc
+    ```
+
+## 编译 Doris
+
+    ```
+    cd $DORIS_HOME
+    sh build.sh
+    ```
+
+## 配置 Debug 环境
+
+    ```
+    # 将编译好的包cp出来
+    
+    cp -r output ../doris-run
+    
+    # 配置FE/BE的conf
+    1、IP、目录
+    2、BE 额外配置 min_file_descriptor_number = 10000
+    ```
+
+## 开始用 IDE 进行 Debug
+
+    [CLion Mac 调试 BE](./be-clion-dev.md)
+
+    [IntelliJ IDEA Mac 调试 FE](./fe-idea-dev.md)
+    
\ No newline at end of file
diff --git a/docs/zh-CN/community/developer-guide/mac-dev/fe-idea-dev.md 
b/docs/zh-CN/community/developer-guide/mac-dev/fe-idea-dev.md
new file mode 100644
index 0000000000..a79d2a9e95
--- /dev/null
+++ b/docs/zh-CN/community/developer-guide/mac-dev/fe-idea-dev.md
@@ -0,0 +1,78 @@
+---
+{
+  "title": "Doris FE Mac 开发环境搭建 - IntelliJ IDEA",
+  "language": "zh-CN"
+}
+---
+
+<!-- 
+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.
+-->
+
+## 打开 Doris 代码的 FE 目录
+
+**这里我们不要直接打开Doris项目根目录,要打开FE的目录(很重要!!为了不和CLion发生冲突**
+
+![deployment1](/images/mac-idea-deployment1.png)
+
+## 生成 FE 代码
+
+1. 打开 IDEA 终端,到代码根目录下执行
+   `sh generated-source.sh`
+
+    等待显示 Done 就可以了
+    
+    ![deployment2](/images/mac-idea-deployment2.png)
+2. Copy help-resource.zip 
+
+    ```
+    进入doris/docs目录,执行以下命令
+    cd doris/docs
+    sh build_help_zip.sh
+    cp -r build/help-resource.zip ../fe/fe-core/target/classes
+    ```
+
+## 配置 Debug FE
+
+- 选择编辑配置
+
+  ![deployment3](/images/mac-idea-deployment3.png)
+
+- 添加 DorisFE 配置
+
+  左上角 + 号添加一个应用程序的配置,具体配置参考下图
+
+  ![deployment4](/images/mac-idea-deployment4.png)
+
+  - 工作目录选择源码目录下的 fe 目录
+  - 参照 Doris 代码根目录下的 `fe/bin/start_fe.sh` 中 export 的环境变量进行环境变量配置。 
+    其中环境变量的Doris目录值指向准备工作里里自己copy出来的目录。
+    - 环境变量参考:
+    ```
+    JAVA_OPTS=-Xmx8092m;
+    LOG_DIR=~/DorisDev/doris-run/fe/log;
+    PID_DIR=~/DorisDev/doris-run/fe/log;
+    DORIS_HOME=~/DorisDev/doris-run/fe
+    ```
+    ![deployment5](/images/mac-idea-deployment5.png)
+
+## 启动 FE
+
+点击 Run 或者 Debug 就会开始编译,编译完 fe 就会启动
+
+![deployment6](/images/mac-idea-deployment6.png)
diff --git a/docs/zh-CN/docs/install/source-install/compilation-mac.md 
b/docs/zh-CN/docs/install/source-install/compilation-mac.md
index 2c16cff9db..fa66e55050 100644
--- a/docs/zh-CN/docs/install/source-install/compilation-mac.md
+++ b/docs/zh-CN/docs/install/source-install/compilation-mac.md
@@ -26,7 +26,7 @@ under the License.
 
 # 在macOS平台上编译
 
-本文介绍如何在macOS平台上编译源码。
+本文介绍如何在 macOS 平台上编译源码。
 
 ## 环境要求
 
@@ -38,7 +38,7 @@ under the License.
 1. 使用[Homebrew](https://brew.sh/)安装依赖
     ```shell
     brew install automake autoconf libtool pkg-config texinfo coreutils 
gnu-getopt \
-        python@3 cmake ninja ccache bison byacc gettext wget pcre maven 
llvm@15 openjdk@11 npm
+        python@3 cmake ninja ccache bison byacc gettext wget pcre maven 
llvm@16 openjdk@8 npm
     ```
 
 2. 编译源码
@@ -109,4 +109,4 @@ under the License.
 参考前面提到的设置`file descriptors`。
 
 ### Java版本
-推荐使用Java 11。
+推荐使用Java 8。


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to