Unverified Commit 07b74f41 authored by Zzm0809's avatar Zzm0809 Committed by GitHub

[Doc] Optimize some documents (#3531)

Signed-off-by: 's avatarZzm0809 <934230207@qq.com>
parent 3d85eb04
...@@ -6,10 +6,10 @@ This project uses [Ant Design Pro](https://pro.ant.design) for initialization. H ...@@ -6,10 +6,10 @@ This project uses [Ant Design Pro](https://pro.ant.design) for initialization. H
## Environment preparation ## Environment preparation
| Environment | Version | Remarks | | Environment | Version | Remarks |
| ----------- | -------- | ------- | |-------------|---------|---------|
| node | 14.19.0+ | | | node | 18+ | |
| npm | 7.19.0+ | | | npm | 10+ | |
> Configure related environment variables by yourself > Configure related environment variables by yourself
...@@ -19,6 +19,9 @@ This project uses [Ant Design Pro](https://pro.ant.design) for initialization. H ...@@ -19,6 +19,9 @@ This project uses [Ant Design Pro](https://pro.ant.design) for initialization. H
# Note: You need to enter the directory of this module to execute # Note: You need to enter the directory of this module to execute
npm i --force && npm start npm i --force && npm start
## 如果提示 npm ERR! code ERESOLVE
npm cache clean --force
``` ```
### Build ### Build
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
## 环境准备 ## 环境准备
| 环境 | 版本 | 备注 | | 环境 | 版本 | 备注 |
| ---- | -------- | ---- | |------|-----|----|
| node | 14.19.0+ | | | node | 18+ | |
| npm | 7.19.0+ | | | npm | 10+ | |
> 自行配置相关环境变量 > 自行配置相关环境变量
......
...@@ -93,20 +93,20 @@ ...@@ -93,20 +93,20 @@
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^9.3.0", "eslint": "^9.3.0",
"express": "^4.19.2", "express": "^4.19.2",
"husky": "^8", "husky": "^9.0.11",
"lint-staged": "^13", "lint-staged": "^15.2.4",
"prettier": "^2", "prettier": "^3.2.5",
"react-dev-inspector": "^2.0.1", "react-dev-inspector": "^2.0.1",
"react-inspector": "^6.0.2", "react-inspector": "^6.0.2",
"sql-formatter": "^13.0.1", "sql-formatter": "^15.3.1",
"swagger-ui-dist": "^5.17.12", "swagger-ui-dist": "^5.17.12",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^4", "typescript": "^4.9.5",
"umi-presets-pro": "^2.0.0" "umi-presets-pro": "^2.0.0"
}, },
"engines": { "engines": {
"node": ">=14.0.0", "node": ">=18",
"npm": ">=6.0.0", "npm": ">=10",
"umi": ">=3.0.0", "umi": ">=3.0.0",
"yarn": ">=1.0.0" "yarn": ">=1.0.0"
} }
......
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
<version>1.12.0</version> <version>1.12.0</version>
<configuration> <configuration>
<nodeVersion>v16.17.0</nodeVersion> <nodeVersion>v18.15.0</nodeVersion>
<npmVersion>8.19.0</npmVersion> <npmVersion>10.5.0</npmVersion>
<!-- 国内node下载加速 --> <!-- 国内node下载加速 -->
<!--<nodeDownloadRoot>https://mirrors.huaweicloud.com/nodejs/</nodeDownloadRoot>--> <!--<nodeDownloadRoot>https://mirrors.huaweicloud.com/nodejs/</nodeDownloadRoot>-->
<!--<npmDownloadRoot>https://repo.huaweicloud.com/npm-software/</npmDownloadRoot>--> <!--<npmDownloadRoot>https://repo.huaweicloud.com/npm-software/</npmDownloadRoot>-->
......
...@@ -94,7 +94,7 @@ git clone https://github.com/DataLinkDC/dinky.git ...@@ -94,7 +94,7 @@ git clone https://github.com/DataLinkDC/dinky.git
cd /opt/dinky-source-code cd /opt/dinky-source-code
# 编译打包 Profile, 注意 scala 支持 2.11 和 2.12, 请根据实际情况进行选择,jdk 支持 8/11,请根据实际情况进行选择,不选jdk11默认使用系统内的jdk8 # 编译打包 Profile, 注意 scala 支持 2.11 和 2.12, 请根据实际情况进行选择,jdk 支持 8/11,请根据实际情况进行选择,不选jdk11默认使用系统内的jdk8
mvn clean package -DskipTests=true -Pprod,jdk11,flink-single-version,scala-2.12,aliyun,flink-1.16,web mvn clean package -DskipTests=true -P prod,jdk11,flink-single-version,scala-2.12,aliyun,flink-1.16,web
``` ```
......
...@@ -109,7 +109,6 @@ spring: ...@@ -109,7 +109,6 @@ spring:
# If you use the h2 database, please configure the h2 database connection information in application-h2.yml, # If you use the h2 database, please configure the h2 database connection information in application-h2.yml,
# note: the h2 database is only for experience use, and the related data that has been created cannot be migrated, please use it with caution # note: the h2 database is only for experience use, and the related data that has been created cannot be migrated, please use it with caution
active: ${DB_ACTIVE:mysql} #[h2,mysql,pgsql] active: ${DB_ACTIVE:mysql} #[h2,mysql,pgsql]
include: jmx
``` ```
修改 Dinky 的 mysql 的配置文件。 修改 Dinky 的 mysql 的配置文件。
...@@ -130,13 +129,13 @@ spring: ...@@ -130,13 +129,13 @@ spring:
Dinky 需要具备内置的 Flink 环境,该 Flink 环境的实现需要用户自己在 Dinky 根目录下 extends/flink${FLINK_VERSION} 文件夹上传相关的 Flink 依赖,如 flink-dist, flink-table 等,具体见下文。当然也可在启动文件中指定 FLINK_HOME,但不建议这样做。 Dinky 需要具备内置的 Flink 环境,该 Flink 环境的实现需要用户自己在 Dinky 根目录下 extends/flink${FLINK_VERSION} 文件夹上传相关的 Flink 依赖,如 flink-dist, flink-table 等,具体见下文。当然也可在启动文件中指定 FLINK_HOME,但不建议这样做。
:::warning 注意事项 :::warning 注意事项
1. Dinky 并没有内置的 mysql/postgres 数据库驱动,需要用户自己上传 mysql-connector-java-xxx.jar/postgresql-xxx.jar 等jdbc 驱动到 lib 下/extends 下 1. Dinky 并没有内置的 mysql/postgres 数据库驱动,需要用户自己上传 mysql-connector-java-xxx.jar/postgresql-xxx.jar 等jdbc 驱动到 `lib 下`或者`extends 下`
2. Dinky 当前版本的 yarn 的 per-job 与 application 执行模式依赖 flink-shaded-hadoop ,需要额外添加 flink-shaded-hadoop-uber 包,如果您使用的是`flink-shaded-hadoop-uber-3`请手动删除该包内部的 javax.servlet 等冲突内容。 2. Dinky 当前版本的 yarn 的 per-job 与 application 执行模式依赖 flink-shaded-hadoop ,需要额外添加 flink-shaded-hadoop-uber 包,如果您使用的是`flink-shaded-hadoop-uber-3`请手动删除该包内部的 javax.servlet 等冲突内容。
当然如果你的 Hadoop 为 3+ 也可以自行编译对于版本的 dinky-client-hadoop.jar 以替代 uber 包, 当然如果你的 Hadoop 为 3+ 也可以自行编译对于版本的 dinky-client-hadoop.jar 以替代 uber 包,
3. Dinky所有监控相关功能目前强依赖hadoop,即使你不需要任何hadoop功能,也需要上传flink-shaded-hadoop-uber,否则会导致监控功能无法正常使用 3. Dinky所有监控相关功能目前强依赖hadoop,即使你不需要任何hadoop功能,也需要上传flink-shaded-hadoop-uber,否则会导致监控功能无法正常使用
::: :::
将 flink-shaded-hadoop 上传到到 plugins 文件目录下,使用 flink-shaded-hadoop-3 地址如下: 将 flink-shaded-hadoop 上传到到 extends 文件目录下,使用 flink-shaded-hadoop-3 地址如下:
``` ```
https://mvnrepository.com/artifact/org.apache.flink/flink-shaded-hadoop-3-uber?repo=cloudera-repos https://mvnrepository.com/artifact/org.apache.flink/flink-shaded-hadoop-3-uber?repo=cloudera-repos
...@@ -220,7 +219,7 @@ log4j-core-2.17.1.jar ...@@ -220,7 +219,7 @@ log4j-core-2.17.1.jar
log4j-slf4j-impl-2.17.1.jar log4j-slf4j-impl-2.17.1.jar
``` ```
:::tip :::tip
1.0.0 之前的版本 Flink 相关依赖是放在 plugins 目录下,1.0.0 及之后是放在 extends 目录下。(目前做了 plugins 目录的兼容,即放在 plugins 下也会生效) 1.0.0 之前的版本 Flink 相关依赖是放在 plugins 目录下,1.0.0 及之后是放在 extends 目录下。
推荐公共 jar 包放在 extends 目录下,Flink 版本的依赖放在 extends/flink${FLINK_VERSION} 下 推荐公共 jar 包放在 extends 目录下,Flink 版本的依赖放在 extends/flink${FLINK_VERSION} 下
::: :::
...@@ -236,10 +235,15 @@ sh auto.sh stop ...@@ -236,10 +235,15 @@ sh auto.sh stop
sh auto.sh restart sh auto.sh restart
#查看状态 #查看状态
sh auto.sh status sh auto.sh status
# 前台启动(调试使用,会输出日志,阻塞当前终端,结束请Ctrl+C,但是会直接退出服务,仅供启动时无日志输出且在排查问题时使用)
sh auto.sh startOnPending
``` ```
#### 版本适配 #### 版本适配
启动指令的第二个参数则是版本选择,支持 【1.14, 1.15, 1.16, 1.17, 1.18】,参考指令如下: 启动指令的第二个参数则是版本选择,支持 【1.14, 1.15, 1.16, 1.17, 1.18, 1.19】,参考指令如下:
> 自 1.0.2 版本开始加入了自动检测 Flink 版本的功能,如果不传入版本号,则会自动检测 Flink 版本作为启动版本(即检测 extends 目录下的 flink${FLINK_VERSION} 文件夹)
```shell ```shell
#启动 #启动
sh auto.sh start 1.16 sh auto.sh start 1.16
......
...@@ -12,7 +12,7 @@ title: 本地调试 ...@@ -12,7 +12,7 @@ title: 本地调试
- Flink, Java, Maven, Node, React, Ant Design Pro - Flink, Java, Maven, Node, React, Ant Design Pro
- MySQL/PostgreSQL/H2 - MySQL/PostgreSQL/H2
- IntelliJ IDEA - IntelliJ IDEA
::: :::
## 前置条件 ## 前置条件
...@@ -30,10 +30,10 @@ title: 本地调试 ...@@ -30,10 +30,10 @@ title: 本地调试
| 环境 | 版本 | | 环境 | 版本 |
|:----------------:|:------------------------:| |:----------------:|:------------------------:|
| npm | 7.19.0+ | | npm | 10+ |
| node.js | 14.17.0+ | | node.js | 18+ |
| jdk | Java8 或者 Java11 | | jdk | Java8 或者 Java11 |
| maven | 3.8.0+ | | maven | 3.8+ |
| lombok | IDEA插件安装 | | lombok | IDEA插件安装 |
| MySQL/PostgreSQL | MySQL5.7+ / PostgreSQL15 | | MySQL/PostgreSQL | MySQL5.7+ / PostgreSQL15 |
...@@ -54,7 +54,7 @@ git clone git://github.com/DataLinkDC/dlink.git ...@@ -54,7 +54,7 @@ git clone git://github.com/DataLinkDC/dlink.git
1. 启动 IDEA 并选择 Open。 1. 启动 IDEA 并选择 Open。
2. 选择已克隆的 Dinky 存储库的根文件夹。 2. 选择已克隆的 Dinky 存储库的根文件夹。
3. 等待项目加载完成。 3. 等待项目加载完成。
4. 设置 JDK 1.8 和 Maven 3.6.0。 4. 设置 JDK 1.8 和 Maven 3.8+。
## 前端环境 ## 前端环境
...@@ -99,24 +99,26 @@ Install/Package 过程中报错代码格式化问题,请参考 [代码格式化] ...@@ -99,24 +99,26 @@ Install/Package 过程中报错代码格式化问题,请参考 [代码格式化]
### Profile 说明 ### Profile 说明
| Profile | 说明 | | Profile | 说明 |
|:-------------:|:----------------------------------------------------------------------------------:| |:--------------------:|:----------------------------------------------------------------------------------:|
| dev | 开发环境/本地调试,默认不选中,此功能主要用于本地调试或者二次开发,用于加载相关依赖 | | dev | 开发环境/本地调试,默认不选中,此功能主要用于本地调试或者二次开发,用于加载相关依赖 |
| aliyun | 加速依赖下载 | | aliyun | 加速依赖下载 |
| fast | 主要用于跳过代码检查和代码格式化<br/>注意:如果 JDK 环境为 jdk8 需要勾选此 profile,否则会报错<br/>如果 JDK 环境为 11 无需勾选 | | fast | 主要用于跳过代码检查和代码格式化<br/>注意:如果 JDK 环境为 jdk8 需要勾选此 profile,否则会报错<br/>如果 JDK 环境为 11 无需勾选 |
| flink-1.14 | 用于指定 Flink 版本为 1.14,只能单选,需要勾选 flink-single-version | | flink-1.14 | 用于指定 Flink 版本为 1.14,只能单选,需要勾选 flink-single-version |
| flink-1.15 | 用于指定 Flink 版本为 1.15,只能单选,需要勾选 flink-single-version | | flink-1.15 | 用于指定 Flink 版本为 1.15,只能单选,需要勾选 flink-single-version |
| flink-1.16 | 用于指定 Flink 版本为 1.16,只能单选,需要勾选 flink-single-version | | flink-1.16 | 用于指定 Flink 版本为 1.16,只能单选,需要勾选 flink-single-version |
| flink-1.17 | 用于指定 Flink 版本为 1.17,只能单选,需要勾选 flink-single-version | | flink-1.17 | 用于指定 Flink 版本为 1.17,只能单选,需要勾选 flink-single-version |
| flink-1.18 | 用于指定 Flink 版本为 1.18,只能单选,需要勾选 flink-single-version | | flink-1.18 | 用于指定 Flink 版本为 1.18,只能单选,需要勾选 flink-single-version |
| flink-1.19 | 用于指定 Flink 版本为 1.19,只能单选,需要勾选 flink-single-version | | flink-1.19 | 用于指定 Flink 版本为 1.19,只能单选,需要勾选 flink-single-version |
| jdk 11 | 用于指定 JDK 版本为 11,前提是本地已经安装了 JDK 11,如果没有安装 jdk11,则默认使用本地的 jdk8 | | flink-all | 主要用于本地的 install 生成依赖到本地仓库,不适合用打包部署 |
| mac | 用于适配在 mac 系统上进行调试 | | flink-single-version | 配合单版本打包或者调试下勾选 |
| maven-central | 用于指定 maven 仓库为中央仓库 | | jdk11 | 用于指定 JDK 版本为 11,前提是本地已经安装了 JDK 11,如果没有安装 jdk11,则默认使用本地的 jdk8 |
| prod | 生产环境,默认选中,此功能主要用于编译打包,此 profile 会将部分依赖排除掉,不会打进最终 tar.gz 包内 | | mac | 用于适配在 mac 系统上进行调试 |
| scala-2.11 | 用于指定 Scala 版本为 2.11,只能单选 | | maven-central | 用于指定 maven 仓库为中央仓库 |
| scala-2.12 | 用于指定 Scala 版本为 2.12,只能单选 | | prod | 生产环境,默认选中,此功能主要用于编译打包,此 profile 会将部分依赖排除掉,不会打进最终 tar.gz 包内 |
| web | 打包前端资源,需要勾选 | | scala-2.11 | 用于指定 Scala 版本为 2.11,只能单选 |
| scala-2.12 | 用于指定 Scala 版本为 2.12,只能单选 |
| web | 打包前端资源,需要勾选 |
:::warning 注意 :::warning 注意
...@@ -183,7 +185,6 @@ spring: ...@@ -183,7 +185,6 @@ spring:
# If you use the h2 database, please configure the h2 database connection information in application-h2.yml, # If you use the h2 database, please configure the h2 database connection information in application-h2.yml,
# note: the h2 database is only for experience use, and the related data that has been created cannot be migrated, please use it with caution # note: the h2 database is only for experience use, and the related data that has been created cannot be migrated, please use it with caution
active: mysql #[h2,mysql,pgsql] active: mysql #[h2,mysql,pgsql]
include: jmx
``` ```
### 初始化数据库 ### 初始化数据库
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment