Skip to content

Commit 962fe4f

Browse files
authored
[Doc] Modify doc i18n and Added some docs (#2864)
* Spotless Apply * modify doc label to i18n and added some docs and faq * modify faq position * change repo url * fix jump url * fix * fix * fix --------- Co-authored-by: Zzm0809 <[email protected]>
1 parent f5ce9bb commit 962fe4f

File tree

47 files changed

+426
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+426
-379
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "安装部署",
2+
"label": "deploy_guide",
33
"position": 2
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "开发者指南",
2+
"label": "developer_guide",
33
"position": 12
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "参与贡献",
2+
"label": "contribution",
33
"position": 1
44
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
sidebar_position: 7
3+
position: 7
4+
id: code_format
5+
title: 代码格式化
6+
---
7+
8+
:::info 简介
9+
10+
如果你在 Dinky 基础上进行了二次开发/bugfix/实现了新功能,并打算贡献到社区,基于代码格式化要求,你必须执行格式化代码,满足规范后方可被合并.
11+
12+
但是在 Dinky 1.0.0 之后,格式化插件升级后要求 JDK 环境为 JDK 11,如果你的 JDK 环境为 JDK 8,那么则需要升级 JDK 环境/配置服务端格式化,否则无法使用格式化插件.你的 Pull Request 的代码检查结果将会失败,从而无法被合并
13+
14+
基于上述说明,下面介绍多种方式,如何执行格式化并满足格式化要求.
15+
:::
16+
17+
## 升级 JDK 环境
18+
19+
> 此为单个 JDK 环境的升级
20+
21+
Dinky 1.0.0 之后,全面支持 JDK 11,如果你的 JDK 环境为 JDK 8,那么可以选择升级 JDK 环境,具体 JDK11 的安装方式自行搜索即可.
22+
23+
## JDK 环境并存
24+
25+
如果你需要有多个 JDK 环境,那么你可以通过以下方式来实现 JDK 环境并存:
26+
27+
1. 下载 JDK 11 并安装.不需要配置环境变量,只需要在 IDEA 中配置即可.前提是你所需的 JDK 主版本非 JDK11, 如果你想要设置 JDK 11 为默认,那么可以自行配置环境变量.
28+
2. 在 IDEA 打开的 Dinky 工程中配置 JDK 11,并勾选 Maven Profile 中的 `jdk11`,并刷新 Maven Profile,使其重新加载.
29+
3. 找到 Maven => Dinky 根下的 插件 => 展开 spotless, 双击 spotless:apply ,等待格式化完成.
30+
31+
## 无需多 JDK 环境
32+
33+
如果你只需要单个 JDK 环境,并且本地的 JDK 环境版本为 JDK 8, 不想升级 JDK 环境,那么你可以通过以下方式来实现:
34+
35+
> 注意: 此操作需要在你提交本地代码到你的仓库前进行.
36+
37+
1. 登录你的 GitHub 账号,转到 https://github.com/settings/tokens
38+
2. 点击下图路径, 创建 token,并指定名称为 `FORMAT`,请注意大小写,创建完成之后请牢记该 Token 值, 后续将会用到
39+
![create_token](http://pic.dinky.org.cn/dinky/docs/zh-CN/developer_guide/contribution/code_format/create_token.png)
40+
3. 打开你的 GitHub 中 Fork 的 Dinky 仓库 -> Settings -> Secrets and variables -> Actions
41+
![secrets_url](http://pic.dinky.org.cn/dinky/docs/zh-CN/developer_guide/contribution/code_format/secrets_url.png)
42+
4. 点击 Secrets Tag -> New repository secret -> 名称指定为 `TOKEN` , 粘贴你在第一步中创建的 token 值, 点击 Add secret
43+
5. 点击 Variables -> New repository variable -> 名称指定为 `FORMAT` , 值为`true`, 点击 Add variable
44+
![variables_url](http://pic.dinky.org.cn/dinky/docs/zh-CN/developer_guide/contribution/code_format/variables_url.png)
45+
46+
6. 基于此方式,可以一劳永逸,无需在 IDEA 中手动执行格式化,并无需安装 JDK 11 环境. 只需要正常修改/新增代码 -> 提交到你的 Dinky 仓库即可,服务端会自动执行格式化,并将结果反馈在 下图所示的 Actions 界面中.
47+
![show_actions](http://pic.dinky.org.cn/dinky/docs/zh-CN/developer_guide/contribution/code_format/show_actions.png)
48+
49+
:::tip 提示
50+
51+
以上为几种如何实现格式化的方案, 请根据你的实际情况选择合适的方式.推荐使用 [无需多 JDK 环境](#无需多-jdk-环境) 的方式,因为它更加方便,而且不会影响你的本地环境.
52+
53+
:::

docs/docs/developer_guide/contribution/commit_code.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: 提交代码须知
99

1010
# 提交代码
1111

12-
* 首先从远端仓库 *https://github.com/DataLinkDC/dlink.git* fork 一份代码到自己的仓库中
12+
* 首先从远端仓库 *https://github.com/DataLinkDC/dinky.git* fork 一份代码到自己的仓库中
1313

1414
* 远端仓库中分支:
1515
* dev 日常开发分支: 日常 dev 开发分支,新提交的代码都可以 pull request 到这个分支上。
@@ -19,13 +19,13 @@ title: 提交代码须知
1919
* 把自己仓库 clone 到本地
2020

2121
```sh
22-
git clone https://github.com/DataLinkDC/dlink.git
22+
git clone https://github.com/DataLinkDC/dinky.git
2323
```
2424

2525
* 添加远端仓库地址,命名为 upstream
2626

2727
```sh
28-
git remote add upstream https://github.com/DataLinkDC/dlink.git
28+
git remote add upstream https://github.com/DataLinkDC/dinky.git
2929
```
3030

3131

docs/docs/developer_guide/contribution/commit_message.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
sidebar_position: 3
3-
position: 3
2+
sidebar_position: 4
3+
position: 4
44
id: commit_message
55
title: Commit Message 须知
66
---

docs/docs/developer_guide/contribution/how_contribute.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
sidebar_position: 4
3-
position: 4
2+
sidebar_position: 6
3+
position: 6
44
id: how_contribute
55
title: 如何贡献
66
---
@@ -13,8 +13,8 @@ title: 如何贡献
1313

1414
我们鼓励任何形式的参与社区,如:
1515

16-
- 将遇到的问题通过 github 上 [issue](https://github.com/DataLinkDC/dlink/issues) 的形式反馈出来
17-
- 回答别人遇到的 [issue](https://github.com/DataLinkDC/dlink/issues) 问题
16+
- 将遇到的问题通过 github 上 [issue](https://github.com/DataLinkDC/dinky/issues) 的形式反馈出来
17+
- 回答别人遇到的 [issue](https://github.com/DataLinkDC/dinky/issues) 问题
1818
- 讨论新 Feature 的实现方案
1919
- 帮助完善文档及官网
2020
- 帮助项目增加测试用例

docs/docs/developer_guide/contribution/issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Issue 是引出一个 Feature 或 Bug 等的重要步骤,在单个 Issue 中
5151

5252
### Issue 内容模板
5353

54-
[Issue 模板](https://github.com/DataLinkDC/dlink/tree/dev/.github/ISSUE_TEMPLATE)
54+
[Issue 模板](https://github.com/DataLinkDC/dinky/tree/dev/.github/ISSUE_TEMPLATE)
5555

5656
### Bug 类 Issue
5757

docs/docs/developer_guide/local_debug.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ title: 本地调试
4343
```shell
4444
mkdir workspace
4545
cd workspace
46-
git clone https://github.com/DataLinkDC/dlink.git
46+
git clone https://github.com/DataLinkDC/dinky.git
4747
#或者
4848
git clone git://github.com/DataLinkDC/dlink.git
4949
```
5050

5151
### 导入 Dinky
5252

5353
1. 启动 IDEA 并选择 Open。
54-
2. 选择已克隆的 Dlink 存储库的根文件夹。
54+
2. 选择已克隆的 Dinky 存储库的根文件夹。
5555
3. 等待项目加载完成。
5656
4. 设置 JDK 1.8 和 Maven 3.6.0。
5757

@@ -90,7 +90,7 @@ npm run dev
9090

9191
由于目前 Dinky 各个模块未发布到 Maven 中央仓库,所以需要先进行 Install 编译。从而在本地仓库中生成相应的依赖。
9292

93-
如果你是第一次编译 Dinky,那么请勾选以下 Maven Profile,然后双击下图中的`生命周期 -> Install`进行编译。
93+
如果你是第一次编译 Dinky,那么请勾选以下 Maven Profile,然后双击下图中的`生命周期 -> Install`进行编译。如果在 Install/Package 过程中报错代码格式化问题,请参考 [代码格式化](contribution/code_format)章节
9494
:::
9595

9696
![localdebug_profile](http://pic.dinky.org.cn/dinky/docs/zh-CN/developer_guide/local_debug/localdebug_profile.png)
@@ -129,7 +129,7 @@ npm run dev
129129
Dinky开发环境配置有两种模式,分别是 provided 环境和 compile 环境
130130

131131
- provided:即上述 Profile 中的 `prod` ,此环境适合打包部署,或者二次开发后打包部署
132-
- compile: 即上述 Profile 中的 `dev`,此环境适合二次开发或者熟悉源码,此模式不需要额外安装Flink,通过Flink自带的local模式变可调试开发
132+
- compile: 即上述 Profile 中的 `dev`,此环境适合二次开发或者熟悉源码,此模式不需要额外安装Flink,通过Flink自带的local模式便可调试开发
133133

134134
### 本地调试 Profile
135135

@@ -220,3 +220,7 @@ spring:
220220

221221
如果你在 Dinky 的基础上进行了二次开发,并有意向将代码贡献给 Dinky,请参考 [代码贡献](./contribution/how_contribute) 文档。
222222
:::
223+
224+
## 常见问题
225+
226+
请参考 [本地调试 FAQ](../faq#本地调试FAQ) 文档。

docs/docs/extend/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "扩展",
2+
"label": "extend",
33
"position": 13
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "扩展语法",
2+
"label": "extended_grammar",
33
"position": 2
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "功能扩展",
2+
"label": "function_extension",
33
"position": 2
44
}

docs/docs/faq.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Caused by: java.lang.IllegalArgumentException: java.net.UnknownHostException: na
1515
```
1616

1717
提供 3 种方式解决这个问题:
18-
- 升级 Dinky 至 0.6.2 及后续版本。详见:[https://github.com/DataLinkDC/dlink/issues/310](https://github.com/DataLinkDC/dlink/issues/310)
18+
- 升级 Dinky 至 0.6.2 及后续版本。详见:[https://github.com/DataLinkDC/dinky/issues/310](https://github.com/DataLinkDC/dinky/issues/310)
1919

2020
- 修改 `/etc/profile`,添加 HADOOP_HOME 环境变量
2121
```shell
@@ -175,4 +175,42 @@ Cannot map checkpoint/savepoint state for operator xxx to the new program, becau
175175
If you want to allow to skip this, you can set the --allowNonRestoredState option on the CLI.
176176
```
177177
178-
添加参数 execution.savepoint.ignore-unclaimed-state:true,跳过无法还原的算子
178+
添加参数 execution.savepoint.ignore-unclaimed-state:true,跳过无法还原的算子
179+
180+
181+
## 本地调试FAQ
182+
183+
184+
Q1: 为什么不支持除了 Java8 和 Java11 以外的其他版本呢?
185+
186+
> A1: 因为 Flink 目前仅支持 Java8 和 Java11。
187+
188+
---
189+
190+
Q2: 为什么 Maven Profile 切换了不生效呢?? 提交任务时还是报各种依赖问题,Profile 像是不生效呢?????
191+
192+
> A2-1: 因为你没刷新 Maven Profile,导致不生效
193+
194+
> A2-2: 因为虽然你刷新了 Maven Profile, 没重启 Dinky 服务(不要问为什么需要重启,这是一个开发人员的基本认知),导致依赖没包含在当前已启动的服务中.
195+
196+
> A2-3: Profile 切的不对,注意灰色的 Profile 选项.请仔细仔细仔细仔细的看看.
197+
198+
> A2-4: 查看你的 IDEA 的版本,不要太旧,尽量保持在 2022.x 以上(别问为什么,上边已经说了)
199+
200+
> A2-5: Profile 切换加载,基于依赖的 `<scope></scope>`标签属性声明 ,如果不懂,自行百度/谷歌/CSDN/StackOverFlow/ChatGPT
201+
202+
---
203+
204+
Q3: 我在 IDEA 中启动 Dinky 后, 前端页面访问不了, 报错找不到页面??????
205+
206+
> A3-1: 可以在执行 Install 阶段勾选 `web` Profile,不然 dinky-admin/src/main/resources/ 下没有静态资源文件目录 `static`.
207+
208+
> A3-2: 可以单独启动前端,参考 [本地调试-启动前端](developer_guide/local_debug#启动前端) 部分
209+
210+
---
211+
212+
Q4: 为什么在 IDEA 中启动 Dinky 后,Profile 也加载了,我用到了一个 connector 仍然报错找不到类?????
213+
214+
> A4-1: Dinky 只加载了 Dinky 在开发中过程中用到的相关 Flink 依赖以及 Flink 的基本环境依赖.如报此类错误,请检查你的 pom.xml 文件,是否包含了 connector 所依赖的 jar 包
215+
216+
> A4-2: 如上述问题未解决,请检查你的 `dinky-flink` 模块下的与你Flink 版本一致的 `pom.xml` 文件,是否包含了 connector 所依赖的 jar 包

docs/docs/get_started/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "快速开始",
2+
"label": "get_started",
33
"position": 1
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "SQL 快速入门",
2+
"label": "quick_start",
33
"position": 3
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "Dinky 介绍",
2+
"label": "platform_intro",
33
"position": 0
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "集成实践",
2+
"label": "Integration_practice",
33
"position": 4
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "实践指南",
2+
"label": "practical_guide",
33
"position": 9
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "整库同步实践",
2+
"label": "cdcsource_practice",
33
"position": 1
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "Flink模式提交实践",
2+
"label": "run_mode_practice",
33
"position": 2
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "场景实践",
2+
"label": "scenario_practice",
33
"position": 3
44
}

docs/docs/thanks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ title: 致谢
4444
- Sa-Token 是一款简单易用、功能强大的Java权限认证框架。它提供了一套简单、灵活、高效的权限认证方案,帮助开发者更方便地进行权限认证。Dinky 项目的登录认证功能/权限控制基于 Sa-Token 实现。
4545

4646

47-
[![JetBrains](http://pic.dinky.org.cn/dinky/docs/zh-CN/thanks/jetbrains.svg)](https://www.jetbrains.com/?from=dlink)
48-
此外,特别感谢 [JetBrains](https://www.jetbrains.com/?from=dlink) 提供的免费开源 License 赞助,JetBrains是一家软件开发工具提供商,提供了许多受欢迎的集成开发环境,如 IntelliJ IDEA。他们支持开源社区,为一些开源项目提供免费的开源许可证,以促进软件开发的进步
47+
[![JetBrains](http://pic.dinky.org.cn/dinky/docs/zh-CN/thanks/jetbrains.svg)](https://www.jetbrains.com/?from=dinky)
48+
此外,特别感谢 [JetBrains](https://www.jetbrains.com/?from=dinky) 提供的免费开源 License 赞助,JetBrains是一家软件开发工具提供商,提供了许多受欢迎的集成开发环境,如 IntelliJ IDEA。他们支持开源社区,为一些开源项目提供免费的开源许可证,以促进软件开发的进步
4949

5050
### 贡献者
5151

docs/docs/user_guide/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "使用手册",
2+
"label": "user_guide",
33
"position": 10
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "认证中心",
2+
"label": "auth_center",
33
"position": 4
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "运维中心",
2+
"label": "devops_center",
33
"position": 2
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "注册中心",
2+
"label": "register_center",
33
"position": 3
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "告警",
2+
"label": "alert",
33
"position": 3
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "数据开发",
2+
"label": "studio",
33
"position": 1
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "基本介绍",
2+
"label": "development_control",
33
"position": 1
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "配置中心",
2+
"label": "system_setting",
33
"position": 5
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "全局配置",
2+
"label": "global_settings",
33
"position": 1
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"label": "函数开发",
2+
"label": "udf_develop",
33
"position": 10
44
}

0 commit comments

Comments
 (0)