Skip to content

Commit

Permalink
[Improvement][Style] Fix remaining style errors and wildcard imports (a…
Browse files Browse the repository at this point in the history
…pache#12412)

* Fix remaining style errors and wildcard imports

* Upgrade spotless to the latest stable version, exclude .github folder from spotless check and fix dead link

* Fix spotless matching scope of markdown files
  • Loading branch information
EricGao888 authored and Chris-Arith committed Oct 26, 2022
1 parent 0ba9b54 commit f0ff451
Show file tree
Hide file tree
Showing 948 changed files with 5,893 additions and 4,725 deletions.
2 changes: 1 addition & 1 deletion docs/docs/en/about/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ there are no subsequent nodes. Examples are as follows:
manual start or scheduled scheduling. Each time the process definition runs, a process instance is generated

**Task instance**: The task instance is the instantiation of the task node in the process definition, which identifies
the specific task
the specific task

**Task type**: Currently supports SHELL, SQL, SUB_PROCESS (sub-process), PROCEDURE, MR, SPARK, PYTHON, DEPENDENT (
depends), and plans to support dynamic plug-in expansion, note: **SUB_PROCESS** need relation with another workflow definition which also a separate process
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/en/about/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ DolphinScheduler provides the following network port configurations for normal o
The minimum supported version of Google Chrome is version 85, but version 90 or above is recommended.

## Synchronize clocks
To avoid problems with internal cluster communications that can impact your task execution, make sure that the clocks on all of the cluster nodes are synchronized from a common clock source, such as using Chrony and/or NTP. Synchronizing the time ensures that every node in the cluster has the same time.

To avoid problems with internal cluster communications that can impact your task execution, make sure that the clocks on all of the cluster nodes are synchronized from a common clock source, such as using Chrony and/or NTP. Synchronizing the time ensures that every node in the cluster has the same time.
3 changes: 2 additions & 1 deletion docs/docs/en/contribute/join/become-a-committer.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In Dolphinscheduler, **new committer nomination** could only be officially start

The following steps are recommended (to be initiated only by an existing PMC member):
1. Send an email titled `[DISCUSS] Promote xxx as new committer` to `private@dolphinscheduler.apache.org`. List the important contributions of the candidate,
so you could gather support from other PMC members for your proposal.
so you could gather support from other PMC members for your proposal.
2. Keep the discussion open for more than 3 days but no more than 1 week, unless there is any express objection or concern.
3. If the PMC generally agrees to the proposal, send an email titled `[VOTE] Promote xxx as new committer` to `private@dolphinscheduler.apache.org`.
4. Keep the voting process open for more than 3 days, but no more than 1 week. Consider the result as `Consensus Approval` if there are `3 + 1` votes with `NO` vetos. Please note that +1 votes > -1 votes.
Expand All @@ -31,6 +31,7 @@ The following steps are recommended (to be initiated only by an existing PMC mem
The PMC member who starts the promotion is responsible for sending an invitation to the new committer and guiding him/her to set up the ASF env.

The PMC member should send an email using the following template to the new committer:

```
To: <invitee name>@gmail.com
Cc: private@dolphinscheduler.apache.org
Expand Down
24 changes: 12 additions & 12 deletions docs/docs/en/guide/datasource/oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

## Datasource Parameters

| **Datasource** | **Description** |
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| Datasource | Select Oracle. |
| Datasource Name | Enter the name of the datasource. |
| Description | Enter a description of the datasource. |
| IP/Host Name | Enter the Oracle service IP. |
| Port | Enter the Oracle service port. |
| Username | Set the username for Oracle connection. |
| Password | Set the password for Oracle connection. |
| Database Name | Enter the ServiceName or SID of the Oracle connection. |
| ServiceName or SID | Choose ServiceName or SID according to your entry in Database Name column. |
| jdbc connect parameters | Parameter settings for Oracle connection, in JSON format. For example, you can use {"schema": "abc"} to specify database abc for using. |
| **Datasource** | **Description** |
|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| Datasource | Select Oracle. |
| Datasource Name | Enter the name of the datasource. |
| Description | Enter a description of the datasource. |
| IP/Host Name | Enter the Oracle service IP. |
| Port | Enter the Oracle service port. |
| Username | Set the username for Oracle connection. |
| Password | Set the password for Oracle connection. |
| Database Name | Enter the ServiceName or SID of the Oracle connection. |
| ServiceName or SID | Choose ServiceName or SID according to your entry in Database Name column. |
| jdbc connect parameters | Parameter settings for Oracle connection, in JSON format. For example, you can use {"schema": "abc"} to specify database abc for using. |

## Native Supported

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/en/guide/installation/standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

Standalone only for quick experience for DolphinScheduler.

If you are a newbie and want to experience DolphinScheduler functions, we recommend you install follow [Standalone deployment](standalone.md).
If you want to experience more complete functions and schedule massive tasks, we recommend you install follow [pseudo-cluster deployment](pseudo-cluster.md).
If you are a newbie and want to experience DolphinScheduler functions, we recommend you install follow [Standalone deployment](standalone.md).
If you want to experience more complete functions and schedule massive tasks, we recommend you install follow [pseudo-cluster deployment](pseudo-cluster.md).
If you want to deploy DolphinScheduler in production, we recommend you follow [cluster deployment](cluster.md) or [Kubernetes deployment](kubernetes.md).

> **_Note:_** Standalone only recommends the usage of fewer than 20 workflows, because it uses in-memory H2 Database in default, ZooKeeper Testing Server, too many tasks may cause instability.
Expand Down
1 change: 1 addition & 0 deletions docs/docs/en/guide/upgrade/incompatible.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ This document records the incompatible updates between each version. You need to

* Copy and import workflow without 'copy' suffix [#10607](https://github.com/apache/dolphinscheduler/pull/10607)
* Use semicolon as default sql segment separator [#10869](https://github.com/apache/dolphinscheduler/pull/10869)

3 changes: 2 additions & 1 deletion docs/docs/zh/about/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ DolphinScheduler正常运行提供如下的网络端口配置:
DolphinScheduler 推荐 Chrome 以及使用 Chromium 内核的较新版本浏览器访问前端可视化操作界面

## 时钟同步
为避免可能影响任务执行的内部集群通信问题,请确保所有集群节点上的时钟与公共时钟源同步,例如使用 Chrony 和/或 NTP。 同步时间确保集群中的每个节点都有相同的时间

为避免可能影响任务执行的内部集群通信问题,请确保所有集群节点上的时钟与公共时钟源同步,例如使用 Chrony 和/或 NTP。 同步时间确保集群中的每个节点都有相同的时间
1 change: 1 addition & 0 deletions docs/docs/zh/contribute/join/become-a-committer.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ PMC会定期基于活跃贡献者们对Dolphinscheduler的贡献从他们中提
发起提名的PMC成员负责向新的committer发出邀请,并指导他/她建立ASF精神思想。

PMC成员应使用以下模板向新的committer发送一封电子邮件:

```
To: <invitee name>@gmail.com
Cc: private@dolphinscheduler.apache.org
Expand Down
1 change: 1 addition & 0 deletions docs/docs/zh/guide/datasource/oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
- 数据库名:输入连接 ORACLE 的 ServiceName 或 SID
- Jdbc 连接参数:用于 ORACLE 连接的参数设置,以 JSON 形式填写
- 比如 `{"schema": "abc"}` 指定使用 `username` 用户下的 `abc` 数据库

61 changes: 31 additions & 30 deletions docs/docs/zh/guide/parameter/built-in.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,34 @@

- 也可以通过以下两种方式:

1.使用add_months()函数,该函数用于加减月份,
第一个入口参数为[yyyyMMdd],表示返回时间的格式
第二个入口参数为月份偏移量,表示加减多少个月
* 后 N 年:$[add_months(yyyyMMdd,12*N)]
* 前 N 年:$[add_months(yyyyMMdd,-12*N)]
* 后 N 月:$[add_months(yyyyMMdd,N)]
* 前 N 月:$[add_months(yyyyMMdd,-N)]
*******************************************
2.直接加减数字
在自定义格式后直接“+/-”数字
* 后 N 周:$[yyyyMMdd+7*N]
* 前 N 周:$[yyyyMMdd-7*N]
* 后 N 天:$[yyyyMMdd+N]
* 前 N 天:$[yyyyMMdd-N]
* 后 N 小时:$[HHmmss+N/24]
* 前 N 小时:$[HHmmss-N/24]
* 后 N 分钟:$[HHmmss+N/24/60]
* 前 N 分钟:$[HHmmss-N/24/60]
*******************************************
3.业务属性方式
在自定义格式后直接“+/-”数字
支持日志格式:所有日期表达式,例如:yyyy-MM-dd/yyyyMMddHHmmss
* 当天:$[this_day(yyyy-MM-dd)],如:2022-08-26 => 2022-08-26
* 昨天:$[last_day(yyyy-MM-dd)],如:2022-08-26 => 2022-08-25
* 年的第N周,以周一为起点:$[year_week(yyyy-MM-dd)],如:2022-08-26 => 2022-34
* 年的第N周,以周N为起点:$[year_week(yyyy-MM-dd,N)],如:N=5时 2022-08-26 => 2022-35
* 前(-)/后(+) N 月第一天:$[month_first_day(yyyy-MM-dd,-N)],如:N=1时 2022-08-26 => 2022-07-01
* 前(-)/后(+) N 月最后一天:$[month_last_day(yyyy-MM-dd,-N)],如:N=1时 2022-08-28 => 2022-07-31
* 前(-)/后(+) N 周的周一:$[week_first_day(yyyy-MM-dd,-N)],如:N=1 2022-08-26 => 2022-08-15
* 前(-)/后(+) N 周的周日:$[week_last_day(yyyy-MM-dd,-N)],如:N=1 2022-08-26 => 2022-08-21
1.使用add_months()函数,该函数用于加减月份,
第一个入口参数为[yyyyMMdd],表示返回时间的格式
第二个入口参数为月份偏移量,表示加减多少个月
* 后 N 年:$[add_months(yyyyMMdd,12*N)]
* 前 N 年:$[add_months(yyyyMMdd,-12*N)]
* 后 N 月:$[add_months(yyyyMMdd,N)]
* 前 N 月:$[add_months(yyyyMMdd,-N)]
*******************************************
2.直接加减数字
在自定义格式后直接“+/-”数字
* 后 N 周:$[yyyyMMdd+7*N]
* 前 N 周:$[yyyyMMdd-7*N]
* 后 N 天:$[yyyyMMdd+N]
* 前 N 天:$[yyyyMMdd-N]
* 后 N 小时:$[HHmmss+N/24]
* 前 N 小时:$[HHmmss-N/24]
* 后 N 分钟:$[HHmmss+N/24/60]
* 前 N 分钟:$[HHmmss-N/24/60]
*******************************************
3.业务属性方式
在自定义格式后直接“+/-”数字
支持日志格式:所有日期表达式,例如:yyyy-MM-dd/yyyyMMddHHmmss
* 当天:$[this_day(yyyy-MM-dd)],如:2022-08-26 => 2022-08-26
* 昨天:$[last_day(yyyy-MM-dd)],如:2022-08-26 => 2022-08-25
* 年的第N周,以周一为起点:$[year_week(yyyy-MM-dd)],如:2022-08-26 => 2022-34
* 年的第N周,以周N为起点:$[year_week(yyyy-MM-dd,N)],如:N=5时 2022-08-26 => 2022-35
* 前(-)/后(+) N 月第一天:$[month_first_day(yyyy-MM-dd,-N)],如:N=1时 2022-08-26 => 2022-07-01
* 前(-)/后(+) N 月最后一天:$[month_last_day(yyyy-MM-dd,-N)],如:N=1时 2022-08-28 => 2022-07-31
* 前(-)/后(+) N 周的周一:$[week_first_day(yyyy-MM-dd,-N)],如:N=1 2022-08-26 => 2022-08-15
* 前(-)/后(+) N 周的周日:$[week_last_day(yyyy-MM-dd,-N)],如:N=1 2022-08-26 => 2022-08-21

1 change: 1 addition & 0 deletions docs/docs/zh/guide/upgrade/incompatible.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@

* Copy and import workflow without 'copy' suffix [#10607](https://github.com/apache/dolphinscheduler/pull/10607)
* Use semicolon as default sql segment separator [#10869](https://github.com/apache/dolphinscheduler/pull/10869)

11 changes: 5 additions & 6 deletions dolphinscheduler-alert/dolphinscheduler-alert-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,21 @@
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>dolphinscheduler-alert</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-alert</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-alert-api</artifactId>

<dependencies>
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-spi</artifactId> <!-- TODO should get rid off this -->
<artifactId>dolphinscheduler-spi</artifactId>
<!-- TODO should get rid off this -->
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* alert channel for sending alerts
*/
public interface AlertChannel {

/**
* process and send alert
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
package org.apache.dolphinscheduler.alert.api;

import org.apache.dolphinscheduler.spi.params.base.PluginParams;
import org.apache.dolphinscheduler.spi.plugin.SPIIdentify;
import org.apache.dolphinscheduler.spi.plugin.PrioritySPI;
import org.apache.dolphinscheduler.spi.plugin.SPIIdentify;

import java.util.List;

/**
* alert channel factory
*/
public interface AlertChannelFactory extends PrioritySPI {

/**
* Returns the name of the alert channel
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.apache.dolphinscheduler.alert.api;

public final class AlertConstants {

/**
* the field name of alert show type
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
@AllArgsConstructor
@Getter
public enum ShowType {

/**
* 0 TABLE;
* 1 TEXT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>dolphinscheduler-alert-plugins</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-alert-plugins</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-alert-dingtalk</artifactId>
<packaging>jar</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

@AutoService(AlertChannelFactory.class)
public final class DingTalkAlertChannelFactory implements AlertChannelFactory {

@Override
public String name() {
return "DingTalk";
Expand Down Expand Up @@ -67,22 +68,26 @@ public List<PluginParams> params() {

RadioParam msgTypeParam = RadioParam
.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_MSG_TYPE, DingTalkParamsConstants.DING_TALK_MSG_TYPE)
.addParamsOptions(new ParamsOptions(DingTalkParamsConstants.DING_TALK_MSG_TYPE_TEXT, DingTalkParamsConstants.DING_TALK_MSG_TYPE_TEXT, false))
.addParamsOptions(new ParamsOptions(DingTalkParamsConstants.DING_TALK_MSG_TYPE_MARKDOWN, DingTalkParamsConstants.DING_TALK_MSG_TYPE_MARKDOWN, false))
.addParamsOptions(new ParamsOptions(DingTalkParamsConstants.DING_TALK_MSG_TYPE_TEXT,
DingTalkParamsConstants.DING_TALK_MSG_TYPE_TEXT, false))
.addParamsOptions(new ParamsOptions(DingTalkParamsConstants.DING_TALK_MSG_TYPE_MARKDOWN,
DingTalkParamsConstants.DING_TALK_MSG_TYPE_MARKDOWN, false))
.setValue(DingTalkParamsConstants.DING_TALK_MSG_TYPE_TEXT)
.addValidate(Validate.newBuilder()
.setRequired(false)
.build())
.build();

InputParam atMobilesParam = InputParam
.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_AT_MOBILES, DingTalkParamsConstants.DING_TALK_AT_MOBILES)
.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_AT_MOBILES,
DingTalkParamsConstants.DING_TALK_AT_MOBILES)
.addValidate(Validate.newBuilder()
.setRequired(false)
.build())
.build();
InputParam atUserIdsParam = InputParam
.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_AT_USERIDS, DingTalkParamsConstants.DING_TALK_AT_USERIDS)
.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_AT_USERIDS,
DingTalkParamsConstants.DING_TALK_AT_USERIDS)
.addValidate(Validate.newBuilder()
.setRequired(false)
.build())
Expand All @@ -98,7 +103,8 @@ public List<PluginParams> params() {
.build();

RadioParam isEnableProxy = RadioParam
.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE, DingTalkParamsConstants.DING_TALK_PROXY_ENABLE)
.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE,
DingTalkParamsConstants.DING_TALK_PROXY_ENABLE)
.addParamsOptions(new ParamsOptions(STRING_YES, STRING_TRUE, false))
.addParamsOptions(new ParamsOptions(STRING_NO, STRING_FALSE, false))
.setValue(STRING_FALSE)
Expand Down Expand Up @@ -131,7 +137,8 @@ public List<PluginParams> params() {
.setPlaceholder("if enable use authentication, you need input password")
.build();

return Arrays.asList(webHookParam, keywordParam, secretParam, msgTypeParam, atMobilesParam, atUserIdsParam, isAtAll, isEnableProxy, proxyParam, portParam, userParam, passwordParam);
return Arrays.asList(webHookParam, keywordParam, secretParam, msgTypeParam, atMobilesParam, atUserIdsParam,
isAtAll, isEnableProxy, proxyParam, portParam, userParam, passwordParam);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.dolphinscheduler.plugin.alert.dingtalk;

public final class DingTalkParamsConstants {

static final String DING_TALK_PROXY_ENABLE = "$t('isEnableProxy')";
static final String NAME_DING_TALK_PROXY_ENABLE = "IsEnableProxy";

Expand Down
Loading

0 comments on commit f0ff451

Please sign in to comment.