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

xxyu pushed a commit to branch doc5.0
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/doc5.0 by this push:
     new b895ea6461 KYLIN-5233 Add doc for How to debug in IDE
b895ea6461 is described below

commit b895ea6461651df4b444f503b347895309b5dbee
Author: XiaoxiangYu <x...@apache.org>
AuthorDate: Tue Aug 23 19:12:15 2022 +0800

    KYLIN-5233 Add doc for How to debug in IDE
---
 README.md                                          |  15 ++-
 website/docs/development/how_to_debug.md           |   5 -
 .../docs/development/how_to_debug_kylin_in_ide.md  | 136 +++++++++++++++++++++
 .../images/debug_kylin_by_docker_compose.png       | Bin 0 -> 413463 bytes
 .../docs/development/images/how-to-debug-01.png    | Bin 0 -> 40018 bytes
 .../docs/development/images/how-to-debug-02.png    | Bin 0 -> 85683 bytes
 .../docs/development/images/how-to-debug-03.png    | Bin 0 -> 77405 bytes
 .../docs/development/images/how-to-debug-04.png    | Bin 0 -> 69423 bytes
 .../docs/development/images/how-to-debug-05.png    | Bin 0 -> 63470 bytes
 .../docs/development/images/how-to-debug-06.png    | Bin 0 -> 934419 bytes
 .../docs/development/images/how-to-debug-07.png    | Bin 0 -> 301916 bytes
 .../docs/development/images/how-to-debug-08.png    | Bin 0 -> 46553 bytes
 .../docs/development/images/how-to-debug-09.png    | Bin 0 -> 94087 bytes
 website/sidebars.js                                |   2 +-
 14 files changed, 147 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index d5201a55ff..801e58a879 100644
--- a/README.md
+++ b/README.md
@@ -54,9 +54,14 @@ npm start
 npm deploy
 ```
 
-### TODO List
+### Website TODO List
 
-- Search in document
-- SEO
-- Multi Version
-- i18n
\ No newline at end of file
+- [x] Search in document
+- [ ] SEO
+- [ ] Multi Version
+- [ ] i18n
+
+### Tech Article
+- [ ] MetadataStore and Job Engine
+- [ ] New Frontend and New Modeling Process
+- [ ] Index Management
\ No newline at end of file
diff --git a/website/docs/development/how_to_debug.md 
b/website/docs/development/how_to_debug.md
deleted file mode 100644
index 926e10debb..0000000000
--- a/website/docs/development/how_to_debug.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-sidebar_position: 1
----
-
-# How to debug
\ No newline at end of file
diff --git a/website/docs/development/how_to_debug_kylin_in_ide.md 
b/website/docs/development/how_to_debug_kylin_in_ide.md
new file mode 100644
index 0000000000..1883bf37c7
--- /dev/null
+++ b/website/docs/development/how_to_debug_kylin_in_ide.md
@@ -0,0 +1,136 @@
+---
+title: How to debug Kylin in IDEA
+language: en
+sidebar_label: How to debug
+pagination_label: How to debug
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+- developer
+- debug
+draft: false
+last_update:
+date: 08/23/2022
+---
+
+# How to debug Kylin in IDEA using docker
+
+### Prepare IDEA and build source code
+#### Build source code
+- Build back-end source code before your start debug.
+```shell
+mvn clean install -DskipTests
+```
+
+- Build front-end source code. 
+(Please use node.js v12.14.0, for how to use specific version of node.js, 
please check [how to package](./how_to_package.md) )
+```shell
+cd kystudio
+npm install
+```
+
+#### Prepare IDEA configuration
+- Download spark and create running IDEA configuration for debug purpose.
+```shell
+./dev-support/sandbox/sandbox.sh init
+```
+
+- Following is the shell output.
+
+![sandbox.sh init](images/how-to-debug-01.png)
+
+### Prepare the Hadoop Cluster
+
+#### Deploy Hadoop Cluster
+- Install latest docker desktop in your laptop
+- [**Optional**] Install docker engine on remote machine 
(https://docs.docker.com/engine/install/)
+- [**Optional**] If you want to deploy hadoop cluster on remote machine, 
please set correct `DOCKER_HOST`
+
+```shell
+# see more detail at : 
https://docs.docker.com/compose/reference/envvars/#docker_host
+export DOCKER_HOST=ssh://${USER}@${DOCKER_HOST}
+```
+
+- Deploy hadoop cluster via docker compose on laptop(or on remote machine)
+
+```shell
+./dev-support/sandbox/sandbox.sh up
+```
+
+![sandbox.sh up](images/how-to-debug-02.png)
+
+
+#### Check status of hadoop cluster
+- Wait 1-2 minutes, check health of hadoop, you can use following command to 
check status
+
+```shell
+./dev-support/sandbox/sandbox.sh ps
+```
+
+Following output content shows all hadoop component are in health state.
+
+![sandbox.sh ps](images/how-to-debug-03.png)
+
+- Edit `/etc/hosts`. (if you deployed Hadoop cluster on remote machine, please 
use correct ip address other than `127.0.0.1` .)
+```shell
+127.0.0.1 namenode datanode resourcemanager nodemanager historyserver mysql 
zookeeper hivemetastore hiveserver 
+```
+
+- Load sample SSB data into HDFS and Hive
+```shell
+./dev-support/sandbox/sandbox.sh sample
+```
+
+- Check hive table
+
+![hive table](images/how-to-debug-04.png)
+
+### Debug Kylin in IDEA
+
+#### Deployment architecture
+- Following is architecture of current deployment.
+
+![debug_in_laptop](images/debug_kylin_by_docker_compose.png)
+
+
+#### Start backend in IDEA
+
+- Select "BootstrapServer[docker-sandbox]" on top of IDEA and click **Run** .
+
+![click BootstrapServer[docker-sandbox]](images/how-to-debug-05.png)
+
+- Wait and check if Sparder is start succeed.
+
+![Spark is submitted](images/how-to-debug-06.png)
+
+- Check if SparkUI of Sparder is started.
+
+![Spark UI](images/how-to-debug-07.png)
+
+
+#### Start frontend in IDEA
+
+- Set up dev proxy
+```shell
+cd kystudio
+npm run devproxy
+```
+
+![steup front end](images/how-to-debug-08.png)
+
+- Visit Kylin WEB UI in your laptop.
+
+![steup front end](images/how-to-debug-09.png)
+
+
+### Command manual
+1. Use `./dev-support/sandbox/sandbox.sh stop` to stop all containers
+2. Use `./dev-support/sandbox/sandbox.sh start` to start all containers
+3. Use `./dev-support/sandbox/sandbox.sh ps` to check status of all containers
+4. Use `./dev-support/sandbox/sandbox.sh down` to stop all containers and 
delete them
+
+## Q&A
+
+// todo
diff --git a/website/docs/development/images/debug_kylin_by_docker_compose.png 
b/website/docs/development/images/debug_kylin_by_docker_compose.png
new file mode 100644
index 0000000000..635e0f9994
Binary files /dev/null and 
b/website/docs/development/images/debug_kylin_by_docker_compose.png differ
diff --git a/website/docs/development/images/how-to-debug-01.png 
b/website/docs/development/images/how-to-debug-01.png
new file mode 100644
index 0000000000..a34d05cfc0
Binary files /dev/null and 
b/website/docs/development/images/how-to-debug-01.png differ
diff --git a/website/docs/development/images/how-to-debug-02.png 
b/website/docs/development/images/how-to-debug-02.png
new file mode 100644
index 0000000000..efae08393b
Binary files /dev/null and 
b/website/docs/development/images/how-to-debug-02.png differ
diff --git a/website/docs/development/images/how-to-debug-03.png 
b/website/docs/development/images/how-to-debug-03.png
new file mode 100644
index 0000000000..d3eed731df
Binary files /dev/null and 
b/website/docs/development/images/how-to-debug-03.png differ
diff --git a/website/docs/development/images/how-to-debug-04.png 
b/website/docs/development/images/how-to-debug-04.png
new file mode 100644
index 0000000000..f4a6528b1a
Binary files /dev/null and 
b/website/docs/development/images/how-to-debug-04.png differ
diff --git a/website/docs/development/images/how-to-debug-05.png 
b/website/docs/development/images/how-to-debug-05.png
new file mode 100644
index 0000000000..82fc6fbf22
Binary files /dev/null and 
b/website/docs/development/images/how-to-debug-05.png differ
diff --git a/website/docs/development/images/how-to-debug-06.png 
b/website/docs/development/images/how-to-debug-06.png
new file mode 100644
index 0000000000..3a0fa27433
Binary files /dev/null and 
b/website/docs/development/images/how-to-debug-06.png differ
diff --git a/website/docs/development/images/how-to-debug-07.png 
b/website/docs/development/images/how-to-debug-07.png
new file mode 100644
index 0000000000..b3a48afa1f
Binary files /dev/null and 
b/website/docs/development/images/how-to-debug-07.png differ
diff --git a/website/docs/development/images/how-to-debug-08.png 
b/website/docs/development/images/how-to-debug-08.png
new file mode 100644
index 0000000000..d5c6c78aba
Binary files /dev/null and 
b/website/docs/development/images/how-to-debug-08.png differ
diff --git a/website/docs/development/images/how-to-debug-09.png 
b/website/docs/development/images/how-to-debug-09.png
new file mode 100644
index 0000000000..6653cf0b52
Binary files /dev/null and 
b/website/docs/development/images/how-to-debug-09.png differ
diff --git a/website/sidebars.js b/website/sidebars.js
index 7307aa5b33..a1c0f9ab2c 100644
--- a/website/sidebars.js
+++ b/website/sidebars.js
@@ -867,7 +867,7 @@ const sidebars = {
                 },
                 {
                     type: 'doc',
-                    id: 'development/how_to_debug'
+                    id: 'development/how_to_debug_kylin_in_ide'
                 },
                 {
                     type: 'doc',

Reply via email to