You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "kaka11chen (via GitHub)" <gi...@apache.org> on 2023/04/09 04:47:04 UTC

[GitHub] [doris] kaka11chen opened a new pull request, #18490: [docs] Add Clion remote development and debugging documents.

kaka11chen opened a new pull request, #18490:
URL: https://github.com/apache/doris/pull/18490

   # Proposed changes
   
   Add Clion remote development and debugging documents.
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18490: [docs](clion) Add Clion remote development and debugging documents.

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18490:
URL: https://github.com/apache/doris/pull/18490#issuecomment-1501287507

   PR approved by at least one committer and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] morningman commented on a diff in pull request #18490: [docs](clion) Add Clion remote development and debugging documents.

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on code in PR #18490:
URL: https://github.com/apache/doris/pull/18490#discussion_r1161211808


##########
docs/zh-CN/community/developer-guide/be-clion-dev.md:
##########
@@ -0,0 +1,83 @@
+---
+{ 'title': 'Doris BE 开发调试环境 -- 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.
+-->
+
+# 使用 Clion 进行 Apache Doris BE 远程开发调试
+
+## 远程服务器代码下载编译
+
+1. 在远程服务器上下载一份 Doris 代码。比如 Doris 根目录为 `/mnt/datadisk0/chenqi/doris`。
+```
+git clone https://github.com/apache/doris.git
+```
+2. 修改远程服务器上 Doris 代码根目录下的 env.sh 文件,在开头增加 `DORIS_HOME` 的配置,比如 `DORIS_HOME=/mnt/datadisk0/chenqi/doris`。
+
+3. 执行相关命令进行编译。其中详细编译过程可参考[编译文档](https://doris.apache.org/zh-CN/docs/dev/install/source-install/compilation-with-ldb-toolchain)。
+
+```
+cd /mnt/datadisk0/chenqi/doris
+./build.sh
+```
+
+## 本地 Clion 安装配置远程开发环境
+
+1. 在本地下载安装 Clion,导入 Doris BE 代码。
+
+2. 在本地设置远程开发环境。
+在 Clion 中打开 **Preferences -> Build, Execution, Deployment -> Deployment** 中添加远程开发环境。
+使用 **SFTP** 来添加一个远程开发服务器的相关连接登陆信息。设置 **Mappings** 路径。
+比如 Local Path 为本地路径 `/User/kaka/Programs/doris/be`,Deployment Path 为远程服务器路径 `/mnt/datadisk0/chenqi/clion/doris/be`。

Review Comment:
   图和文字直接插入一个空行。
   
   图和图之间也插入一个空行



##########
docs/zh-CN/community/developer-guide/be-clion-dev.md:
##########
@@ -0,0 +1,83 @@
+---
+{ 'title': 'Doris BE 开发调试环境 -- 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.
+-->
+
+# 使用 Clion 进行 Apache Doris BE 远程开发调试
+
+## 远程服务器代码下载编译
+
+1. 在远程服务器上下载一份 Doris 代码。比如 Doris 根目录为 `/mnt/datadisk0/chenqi/doris`。
+```
+git clone https://github.com/apache/doris.git
+```
+2. 修改远程服务器上 Doris 代码根目录下的 env.sh 文件,在开头增加 `DORIS_HOME` 的配置,比如 `DORIS_HOME=/mnt/datadisk0/chenqi/doris`。
+
+3. 执行相关命令进行编译。其中详细编译过程可参考[编译文档](https://doris.apache.org/zh-CN/docs/dev/install/source-install/compilation-with-ldb-toolchain)。
+
+```
+cd /mnt/datadisk0/chenqi/doris
+./build.sh
+```
+
+## 本地 Clion 安装配置远程开发环境
+
+1. 在本地下载安装 Clion,导入 Doris BE 代码。
+
+2. 在本地设置远程开发环境。
+在 Clion 中打开 **Preferences -> Build, Execution, Deployment -> Deployment** 中添加远程开发环境。
+使用 **SFTP** 来添加一个远程开发服务器的相关连接登陆信息。设置 **Mappings** 路径。
+比如 Local Path 为本地路径 `/User/kaka/Programs/doris/be`,Deployment Path 为远程服务器路径 `/mnt/datadisk0/chenqi/clion/doris/be`。
+![Deployment1](/images/clion-deployment1.png)
+![Deployment2](/images/clion-deployment2.png)
+
+3. 将远程服务器上编译完成的 `gensrc` 路径,比如 `/mnt/datadisk0/chenqi/doris/gensrc` 拷贝到 **Deployment Path** 的上一级目录。
+比如拷贝完最终的目录为远程服务器路径 `/mnt/datadisk0/chenqi/clion/doris/gensrc`。
+```
+cp -R /mnt/datadisk0/chenqi/doris/gensrc /mnt/datadisk0/chenqi/clion/doris/gensrc
+```
+
+4. 在 Clion 中打开 **Preferences -> Build, Execution, Deployment -> Toolchains** 中添加远程环境的相关 Toolchains,比如 cmake、gcc、g++、gdb 等。

Review Comment:
   标题和正文直接插入一个空行



##########
docs/zh-CN/community/developer-guide/be-clion-dev.md:
##########
@@ -0,0 +1,83 @@
+---
+{ 'title': 'Doris BE 开发调试环境 -- 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.
+-->
+
+# 使用 Clion 进行 Apache Doris BE 远程开发调试
+
+## 远程服务器代码下载编译
+
+1. 在远程服务器上下载一份 Doris 代码。比如 Doris 根目录为 `/mnt/datadisk0/chenqi/doris`。
+```
+git clone https://github.com/apache/doris.git
+```
+2. 修改远程服务器上 Doris 代码根目录下的 env.sh 文件,在开头增加 `DORIS_HOME` 的配置,比如 `DORIS_HOME=/mnt/datadisk0/chenqi/doris`。
+
+3. 执行相关命令进行编译。其中详细编译过程可参考[编译文档](https://doris.apache.org/zh-CN/docs/dev/install/source-install/compilation-with-ldb-toolchain)。
+
+```
+cd /mnt/datadisk0/chenqi/doris
+./build.sh
+```
+
+## 本地 Clion 安装配置远程开发环境
+
+1. 在本地下载安装 Clion,导入 Doris BE 代码。
+
+2. 在本地设置远程开发环境。
+在 Clion 中打开 **Preferences -> Build, Execution, Deployment -> Deployment** 中添加远程开发环境。
+使用 **SFTP** 来添加一个远程开发服务器的相关连接登陆信息。设置 **Mappings** 路径。
+比如 Local Path 为本地路径 `/User/kaka/Programs/doris/be`,Deployment Path 为远程服务器路径 `/mnt/datadisk0/chenqi/clion/doris/be`。
+![Deployment1](/images/clion-deployment1.png)
+![Deployment2](/images/clion-deployment2.png)
+
+3. 将远程服务器上编译完成的 `gensrc` 路径,比如 `/mnt/datadisk0/chenqi/doris/gensrc` 拷贝到 **Deployment Path** 的上一级目录。
+比如拷贝完最终的目录为远程服务器路径 `/mnt/datadisk0/chenqi/clion/doris/gensrc`。
+```
+cp -R /mnt/datadisk0/chenqi/doris/gensrc /mnt/datadisk0/chenqi/clion/doris/gensrc
+```
+
+4. 在 Clion 中打开 **Preferences -> Build, Execution, Deployment -> Toolchains** 中添加远程环境的相关 Toolchains,比如 cmake、gcc、g++、gdb 等。
+**其中最关键的一点是需要在** Environment file **中 填写远程服务器 Doris 代码中的** env.sh **文件路径。**
+![Toolchains](/images/clion-toolchains.png)
+
+5. 在 Clion 中修改 `be/CmakeLists.txt`,修改 `$ENV{JAVA_HOME}` 为远程服务器上的 `JAVA_HOME` 路径。 (否则会找不到 jni.h)
+
+6. 在 Clion 中右键点击 **Load Cmake Project**。此操作会同步代码到远程服务器上,并且调用生成相关 Cmake Build Files。
+
+## 本地 Clion 运行调试远程 BE
+
+1. 在 **Preferences -> Build, Execution, Deployment -> CMake** 中配置 CMake。可以配置类似于 Debug / Release 等不同的 Target, 其中 **ToolChain** 需要选择刚才配置的。

Review Comment:
   空行



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yiguolei commented on pull request #18490: [docs](clion) Add Clion remote development and debugging documents.

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on PR #18490:
URL: https://github.com/apache/doris/pull/18490#issuecomment-1501358572

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yiguolei merged pull request #18490: [docs](clion) Add Clion remote development and debugging documents.

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #18490:
URL: https://github.com/apache/doris/pull/18490


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18490: [docs] Add Clion remote development and debugging documents.

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18490:
URL: https://github.com/apache/doris/pull/18490#issuecomment-1501043714

   PR approved by at least one committer and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18490: [docs] Add Clion remote development and debugging documents.

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18490:
URL: https://github.com/apache/doris/pull/18490#issuecomment-1501043718

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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