Browse Source

[Feature][Task Plugin] Support hive cli task plugin (#11651)

* Add hive cli task plugin

* Add docs for hive-cli task plugin

* Fix hive-cli task related front-end nits and checkstyle

* Fix exception handling logic
3.1.0-release
Eric Gao 2 years ago committed by GitHub
parent
commit
4a37345436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      docs/configs/docsdev.js
  2. 56
      docs/docs/en/guide/task/hive-cli.md
  3. 57
      docs/docs/zh/guide/task/hive-cli.md
  4. BIN
      docs/img/tasks/demo/hive_cli_from_file.png
  5. BIN
      docs/img/tasks/demo/hive_cli_from_script.png
  6. BIN
      docs/img/tasks/icons/hivecli.png
  7. 13
      dolphinscheduler-task-plugin/dolphinscheduler-task-all/pom.xml
  8. 40
      dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/pom.xml
  9. 33
      dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliConstants.java
  10. 59
      dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliParameters.java
  11. 133
      dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTask.java
  12. 49
      dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTaskChannel.java
  13. 45
      dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTaskChannelFactory.java
  14. 105
      dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/test/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTaskTest.java
  15. 8
      dolphinscheduler-task-plugin/pom.xml
  16. BIN
      dolphinscheduler-ui/public/images/task-icons/hivecli.png
  17. BIN
      dolphinscheduler-ui/public/images/task-icons/hivecli_hover.png
  18. 4
      dolphinscheduler-ui/src/layouts/content/use-dataList.ts
  19. 20
      dolphinscheduler-ui/src/locales/en_US/project.ts
  20. 7
      dolphinscheduler-ui/src/locales/zh_CN/project.ts
  21. 8
      dolphinscheduler-ui/src/views/data-quality/rule/index.tsx
  22. 10
      dolphinscheduler-ui/src/views/data-quality/task-result/index.tsx
  23. 11
      dolphinscheduler-ui/src/views/data-quality/task-result/use-table.ts
  24. 12
      dolphinscheduler-ui/src/views/datasource/list/detail.tsx
  25. 14
      dolphinscheduler-ui/src/views/datasource/list/index.tsx
  26. 9
      dolphinscheduler-ui/src/views/login/index.tsx
  27. 8
      dolphinscheduler-ui/src/views/monitor/statistics/audit-log/index.tsx
  28. 8
      dolphinscheduler-ui/src/views/profile/index.tsx
  29. 10
      dolphinscheduler-ui/src/views/projects/list/components/project-modal.tsx
  30. 8
      dolphinscheduler-ui/src/views/projects/list/index.tsx
  31. 1
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/index.ts
  32. 10
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-emr.ts
  33. 62
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-hive-cli.ts
  34. 4
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-mlflow-models.ts
  35. 3
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-pytorch.ts
  36. 4
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resource-limit.ts
  37. 3
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-sagemaker.ts
  38. 7
      dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts
  39. 4
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/index.ts
  40. 80
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts
  41. 1
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pytorch.ts
  42. 3
      dolphinscheduler-ui/src/views/projects/task/components/node/types.ts
  43. 5
      dolphinscheduler-ui/src/views/projects/task/constants/task-type.ts
  44. 4
      dolphinscheduler-ui/src/views/projects/task/definition/components/start-modal.tsx
  45. 4
      dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-context-menu.tsx
  46. 6
      dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag.module.scss
  47. 26
      dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx
  48. 15
      dolphinscheduler-ui/src/views/projects/workflow/definition/index.tsx
  49. 11
      dolphinscheduler-ui/src/views/projects/workflow/instance/components/process-instance-condition.tsx
  50. 9
      dolphinscheduler-ui/src/views/resource/file/index.tsx
  51. 8
      dolphinscheduler-ui/src/views/resource/file/rename/index.tsx
  52. 9
      dolphinscheduler-ui/src/views/resource/task-group/option/index.tsx
  53. 12
      dolphinscheduler-ui/src/views/resource/task-group/queue/components/form-modal.tsx
  54. 9
      dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx
  55. 10
      dolphinscheduler-ui/src/views/resource/udf/function/components/function-modal.tsx
  56. 12
      dolphinscheduler-ui/src/views/resource/udf/function/index.tsx
  57. 10
      dolphinscheduler-ui/src/views/resource/udf/resource/index.tsx
  58. 8
      dolphinscheduler-ui/src/views/security/alarm-group-manage/components/alarm-group-modal.tsx
  59. 8
      dolphinscheduler-ui/src/views/security/alarm-group-manage/index.tsx
  60. 9
      dolphinscheduler-ui/src/views/security/alarm-instance-manage/detail.tsx
  61. 21
      dolphinscheduler-ui/src/views/security/alarm-instance-manage/index.tsx
  62. 8
      dolphinscheduler-ui/src/views/security/cluster-manage/components/cluster-modal.tsx
  63. 8
      dolphinscheduler-ui/src/views/security/cluster-manage/index.tsx
  64. 8
      dolphinscheduler-ui/src/views/security/environment-manage/components/environment-modal.tsx
  65. 8
      dolphinscheduler-ui/src/views/security/environment-manage/index.tsx
  66. 14
      dolphinscheduler-ui/src/views/security/k8s-namespace-manage/components/k8s-namespace-modal.tsx
  67. 8
      dolphinscheduler-ui/src/views/security/k8s-namespace-manage/index.tsx
  68. 8
      dolphinscheduler-ui/src/views/security/tenant-manage/components/tenant-modal.tsx
  69. 8
      dolphinscheduler-ui/src/views/security/tenant-manage/index.tsx
  70. 8
      dolphinscheduler-ui/src/views/security/user-manage/components/user-detail-modal.tsx
  71. 6
      dolphinscheduler-ui/src/views/security/user-manage/index.tsx
  72. 8
      dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx
  73. 8
      dolphinscheduler-ui/src/views/security/worker-group-manage/index.tsx
  74. 8
      dolphinscheduler-ui/src/views/security/yarn-queue-manage/components/yarn-queue-modal.tsx
  75. 8
      dolphinscheduler-ui/src/views/security/yarn-queue-manage/index.tsx

8
docs/configs/docsdev.js

@ -161,6 +161,10 @@ export default {
title: 'Jupyter',
link: '/en-us/docs/dev/user_doc/guide/task/jupyter.html',
},
{
title: 'Hive CLI',
link: '/en-us/docs/dev/user_doc/guide/task/hive-cli.html',
},
{
title: 'Kubernetes',
link: '/en-us/docs/dev/user_doc/guide/task/kubernetes.html',
@ -781,6 +785,10 @@ export default {
title: 'Jupyter',
link: '/zh-cn/docs/dev/user_doc/guide/task/jupyter.html',
},
{
title: 'Hive CLI',
link: '/zh-cn/docs/dev/user_doc/guide/task/hive-cli.html',
},
{
title: 'Kubernetes',
link: '/zh-cn/docs/dev/user_doc/guide/task/kubernetes.html',

56
docs/docs/en/guide/task/hive-cli.md

@ -0,0 +1,56 @@
# Hive CLI
## Overview
Use `Hive Cli Task` to create a `Hive Cli` type task and execute hive SQL from scripts or files.
The workers run `hive -e` to execute hive sql from scripts or `hive -f` to execute from files in `Resource Center`.
## Hive CLI Task vs SQL Task With Hive Datasource
In DolphinScheduler, we have both `Hive CLI Task` and `SQL Task With Hive Datasource` for different scenarios.
You could choose between these two based on your needs.
- The `Hive CLI` task plugin connects directly to `HDFS` and the `Hive Metastore` for hive task executions,
which requires your workers to have access to those services, such as related `Hive` libs, `Hive` and `HDFS` configuration files.
However, `Hive CLI Task` provides better stability for scheduling in production.
- `SQL Task With Hive Datasource` does not require access to `Hive` libs, `Hive` and
`HDFS` configuration files and supports `Kerberos` for authentication. However, you may encounter `HiveServer2` failures
if your hive sql task scheduling puts significant pressure on it.
## Create Task
- Click `Project Management-Project Name-Workflow Definition`, and click the `Create Workflow` button to enter the DAG editing page.
- Drag <img src="../../../../img/tasks/icons/hivecli.png" width="15"/> from the toolbar to the canvas.
## Task Parameters
| **Parameter** | **Description** |
|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Node Name | The name of the task. Node names within the same workflow must be unique. |
| Run Flag | Indicating whether to schedule the task. If you do not need to execute the task, you can turn on the `Prohibition execution` switch. |
| Description | Describing the function of this node. |
| Task Priority | When the number of the worker threads is insufficient, the worker executes task according to the priority. When two tasks have the same priority, the worker will execute them in `first come first served` fashion. |
| Worker Group | Machines which execute the tasks. If you choose `default`, scheduler will send the task to a random worker. |
| Task Group Name | Resource group of tasks. It will not take effect if not configured. |
| Environment Name | Environment to execute the task. |
| Number of Failed Retries | The number of task retries for failures. You could select it by drop-down menu or fill it manually. |
| Failure Retry Interval | Interval of task retries for failures. You could select it by drop-down menu or fill it manually. |
| CPU Quota | Assign the specified CPU time quota to the task executed. Takes a percentage value. Default -1 means unlimited. For example, the full CPU load of one core is 100%, and that of 16 cores is 1600%. You could configure it by [task.resource.limit.state](../../architecture/configuration.md). |
| Max Memory | Assign the specified max memory to the task executed. Exceeding this limit will trigger oom to be killed and will not automatically retry. Takes an MB value. Default -1 means unlimited. You could configure it by [task.resource.limit.state](../../architecture/configuration.md). |
| Timeout Alarm | Alarm for task timeout. When the task exceeds the "timeout threshold", an alarm email will send. |
| Hive Cli Task Execution Type | The type of hive cli task execution, choose either `FROM_SCRIPT` or `FROM_FILE`. |
| Hive SQL Script | If you choose `FROM_SCRIPT` for `Hive Cli Task Execution Type`, you need to fill in your SQL script. |
| Hive Cli Options | Extra options for hive cli, such as `--verbose` |
| Resources | If you choose `FROM_FILE` for `Hive Cli Task Execution Type`, you need to select your SQL file. |
## Task Example
### Hive Cli Task Example
This example below illustrates how to create a `Hive CLI` task node and execute hive SQL from script:
![demo-hive-cli-from-script](../../../../img/tasks/demo/hive_cli_from_script.png)
This example below illustrates how to create a `Hive CLI` task node and execute hive SQL from file:
![demo-hive-cli-from-file](../../../../img/tasks/demo/hive_cli_from_file.png)

57
docs/docs/zh/guide/task/hive-cli.md

@ -0,0 +1,57 @@
# Hive CLI
## 综述
使用`Hive Cli任务插件`创建`Hive Cli`类型的任务执行SQL脚本语句或者SQL任务文件。
执行任务的worker会通过`hive -e`命令执行hive SQL脚本语句或者通过`hive -f`命令执行`资源中心`中的hive SQL文件。
## Hive CLI任务 VS 连接Hive数据源的SQL任务
在DolphinScheduler中,我们有`Hive CLI任务插件`和`使用Hive数据源的SQL插件`提供用户在不同场景下使用,您可以根据需要进行选择。
- `Hive CLI任务插件`直接连接`HDFS`和`Hive Metastore`来执行hive类型的任务,所以需要能够访问到对应的服务。
执行任务的worker节点需要有相应的`Hive` jar包以及`Hive`和`HDFS`的配置文件。
但是在生产调度中,`Hive CLI任务插件`能够提供更可靠的稳定性。
- `使用Hive数据源的SQL插件`不需要您在worker节点上有相应的`Hive` jar包以及`Hive`和`HDFS`的配置文件,而且支持 `Kerberos`认证。
但是在生产调度中,若调度压力很大,使用这种方式可能会遇到`HiveServer2`服务过载失败等问题。
## 创建任务
- 点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。
- 工具栏中拖动 <img src="../../../../img/tasks/icons/hivecli.png" width="15"/> 到画板中,即可完成创建。
## 任务参数
- 前置任务:选择当前任务的前置任务,会将被选择的前置任务设置为当前任务的上游。
| **任务参数** | **描述** |
|---------------|-------------------------------------------------------------------------------------------------------------------------------------|
| 任务名称 | 设置任务的名称。一个工作流定义中的节点名称是唯一的。 |
| 运行标志 | 标识这个节点是否需要正常调度,如果不需要执行,可以打开禁止执行开关。 |
| 描述 | 描述该节点的功能。 |
| 任务优先级 | worker线程数不足时,根据优先级从高到低依次执行,优先级一样时根据先进先出原则执行。 |
| Worker分组 | 任务分配给worker组的机器机执行,选择Default,会随机选择一台worker机执行。 |
| 任务组名称 | 任务资源组,如果没有配置的话就不会生效。 |
| 环境名称 | 配置任务执行的环境。 |
| 失败重试次数 | 任务失败重新提交的次数,支持下拉和手填。 |
| 失败重试间隔 | 任务失败重新提交任务的时间间隔,支持下拉和手填。 |
| CPU 配额 | 为执行的任务分配指定的CPU时间配额,单位百分比,默认-1代表不限制,例如1个核心的CPU满载是100%,16个核心的是1600%。 [task.resource.limit.state](../../architecture/configuration.md) |
| 最大内存 | 为执行的任务分配指定的内存大小,超过会触发OOM被Kill同时不会进行自动重试,单位MB,默认-1代表不限制。这个功能由 [task.resource.limit.state](../../architecture/configuration.md) 控制。 |
| 超时告警 | 勾选超时告警、超时失败,当任务超过"超时时长"后,会发送告警邮件并且任务执行失败.这个功能由 [task.resource.limit.state](../../architecture/configuration.md) 控制。 |
| Hive Cli 任务类型 | Hive Cli任务执行方式,可以选择`FROM_SCRIPT`或者`FROM_FILE`。 |
| Hive SQL 脚本 | 手动填入您的Hive SQL脚本语句。 |
| Hive Cli 选项 | Hive Cli的其他选项,如`--verbose`。 |
| 资源 | 如果您选择`FROM_FILE`作为Hive Cli任务类型,您需要在资源中选择Hive SQL文件。 |
## 任务样例
### Hive CLI任务样例
下面的样例演示了如何使用`Hive CLI`任务节点执行Hive SQL脚本语句:
![demo-hive-cli-from-script](../../../../img/tasks/demo/hive_cli_from_script.png)
下面的样例演示了如何使用`Hive CLI`任务节点从资源中心的Hive SQL
![demo-hive-cli-from-file](../../../../img/tasks/demo/hive_cli_from_file.png)

BIN
docs/img/tasks/demo/hive_cli_from_file.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

BIN
docs/img/tasks/demo/hive_cli_from_script.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

BIN
docs/img/tasks/icons/hivecli.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

13
dolphinscheduler-task-plugin/dolphinscheduler-task-all/pom.xml

@ -15,15 +15,14 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<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-task-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-task-plugin</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-task-all</artifactId>
@ -201,6 +200,12 @@
<artifactId>dolphinscheduler-task-pytorch</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-task-hivecli</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

40
dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/pom.xml

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<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>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-task-plugin</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
<artifactId>dolphinscheduler-task-hivecli</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-spi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-task-api</artifactId>
</dependency>
</dependencies>
</project>

33
dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliConstants.java

@ -0,0 +1,33 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.plugin.task.hivecli;
import lombok.experimental.UtilityClass;
@UtilityClass
public class HiveCliConstants {
public static final String TYPE_SCRIPT = "SCRIPT";
public static final String TYPE_FILE = "FILE";
public static final String HIVE_CLI_EXECUTE_FILE = "hive -f";
public static final String HIVE_CLI_EXECUTE_SCRIPT = "hive -e \"%s\"";
}

59
dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliParameters.java

@ -0,0 +1,59 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.plugin.task.hivecli;
import org.apache.dolphinscheduler.plugin.task.api.model.ResourceInfo;
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
import org.apache.dolphinscheduler.spi.utils.StringUtils;
import java.util.List;
import lombok.Data;
@Data
public class HiveCliParameters extends AbstractParameters {
private String hiveSqlScript;
private String hiveCliTaskExecutionType;
private String hiveCliOptions;
private List<ResourceInfo> resourceList;
@Override
public boolean checkParameters() {
if (!StringUtils.isNotEmpty(hiveCliTaskExecutionType)) {
return false;
}
if (HiveCliConstants.TYPE_SCRIPT.equals(hiveCliTaskExecutionType)) {
return StringUtils.isNotEmpty(hiveSqlScript);
} else if (HiveCliConstants.TYPE_FILE.equals(hiveCliTaskExecutionType)) {
return (resourceList != null) && (resourceList.size() > 0);
} else {
return false;
}
}
@Override
public List<ResourceInfo> getResourceFilesList() {
return this.resourceList;
}
}

133
dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTask.java

@ -0,0 +1,133 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.plugin.task.hivecli;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.EXIT_CODE_FAILURE;
import org.apache.dolphinscheduler.plugin.task.api.AbstractTaskExecutor;
import org.apache.dolphinscheduler.plugin.task.api.ShellCommandExecutor;
import org.apache.dolphinscheduler.plugin.task.api.TaskException;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
import org.apache.dolphinscheduler.plugin.task.api.model.ResourceInfo;
import org.apache.dolphinscheduler.plugin.task.api.model.TaskResponse;
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils;
import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils;
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class HiveCliTask extends AbstractTaskExecutor {
private HiveCliParameters hiveCliParameters;
private final ShellCommandExecutor shellCommandExecutor;
private final TaskExecutionContext taskExecutionContext;
public HiveCliTask(TaskExecutionContext taskExecutionContext) {
super(taskExecutionContext);
this.taskExecutionContext = taskExecutionContext;
this.shellCommandExecutor = new ShellCommandExecutor(this::logHandle,
taskExecutionContext,
logger);
}
@Override
public void init() {
logger.info("hiveCli task params {}", taskExecutionContext.getTaskParams());
hiveCliParameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), HiveCliParameters.class);
if (!hiveCliParameters.checkParameters()) {
throw new TaskException("hiveCli task params is not valid");
}
}
@Override
public void handle() throws TaskException {
try {
final TaskResponse taskResponse = shellCommandExecutor.run(buildCommand());
setExitStatusCode(taskResponse.getExitStatusCode());
setAppIds(taskResponse.getAppIds());
setProcessId(taskResponse.getProcessId());
setVarPool(shellCommandExecutor.getVarPool());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
logger.error("The current HiveCLI Task has been interrupted", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException("The current HiveCLI Task has been interrupted", e);
} catch (Exception e) {
logger.error("hiveCli task failure", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException("run hiveCli task error", e);
}
}
protected String buildCommand() {
final List<String> args = new ArrayList<>();
final String type = hiveCliParameters.getHiveCliTaskExecutionType();
// TODO: make sure type is not unknown
if (HiveCliConstants.TYPE_FILE.equals(type)) {
args.add(HiveCliConstants.HIVE_CLI_EXECUTE_FILE);
final List<ResourceInfo> resourceInfos = hiveCliParameters.getResourceList();
if (resourceInfos.size() > 1) {
logger.warn("more than 1 files detected, use the first one by default");
}
args.add(StringUtils.stripStart(resourceInfos.get(0).getResourceName(), "/"));
} else {
final String script = hiveCliParameters.getHiveSqlScript();
args.add(String.format(HiveCliConstants.HIVE_CLI_EXECUTE_SCRIPT, script));
}
final String hiveCliOptions = hiveCliParameters.getHiveCliOptions();
if (StringUtils.isNotEmpty(hiveCliOptions)) {
args.add(hiveCliOptions);
}
final Map<String, Property> paramsMap = taskExecutionContext.getPrepareParamsMap();
final String command =
ParameterUtils.convertParameterPlaceholders(String.join(" ", args), ParamUtils.convert(paramsMap));
logger.info("hiveCli task command: {}", command);
return command;
}
@Override
public AbstractParameters getParameters() {
return hiveCliParameters;
}
@Override
public void cancelApplication(boolean cancelApplication) throws Exception {
shellCommandExecutor.cancelApplication();
}
}

49
dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTaskChannel.java

@ -0,0 +1,49 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.plugin.task.hivecli;
import org.apache.dolphinscheduler.plugin.task.api.AbstractTask;
import org.apache.dolphinscheduler.plugin.task.api.TaskChannel;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
import org.apache.dolphinscheduler.plugin.task.api.parameters.ParametersNode;
import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.ResourceParametersHelper;
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
public class HiveCliTaskChannel implements TaskChannel {
@Override
public void cancelApplication(boolean status) {
}
@Override
public AbstractTask createTask(TaskExecutionContext taskExecutionContext) {
return new HiveCliTask(taskExecutionContext);
}
@Override
public AbstractParameters parseParameters(ParametersNode parametersNode) {
return JSONUtils.parseObject(parametersNode.getTaskParams(), HiveCliParameters.class);
}
@Override
public ResourceParametersHelper getResources(String parameters) {
return null;
}
}

45
dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTaskChannelFactory.java

@ -0,0 +1,45 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.plugin.task.hivecli;
import org.apache.dolphinscheduler.plugin.task.api.TaskChannel;
import org.apache.dolphinscheduler.plugin.task.api.TaskChannelFactory;
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
import java.util.List;
import com.google.auto.service.AutoService;
@AutoService(TaskChannelFactory.class)
public class HiveCliTaskChannelFactory implements TaskChannelFactory {
@Override
public TaskChannel create() {
return new HiveCliTaskChannel();
}
@Override
public String getName() {
return "HIVECLI";
}
@Override
public List<PluginParams> getParams() {
return null;
}
}

105
dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/test/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTaskTest.java

@ -0,0 +1,105 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.plugin.task.hivecli;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.model.ResourceInfo;
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
public class HiveCliTaskTest {
public static final String EXPECTED_HIVE_CLI_TASK_EXECUTE_FROM_SCRIPT_COMMAND =
"hive -e \"SHOW DATABASES;\"";
public static final String EXPECTED_HIVE_CLI_TASK_EXECUTE_FROM_FILE_COMMAND =
"hive -f sql_tasks/hive_task.sql";
public static final String EXPECTED_HIVE_CLI_TASK_EXECUTE_WITH_OPTIONS =
"hive -e \"SHOW DATABASES;\" --verbose";
@Test
public void hiveCliTaskExecuteSqlFromScript() throws Exception {
String hiveCliTaskParameters = buildHiveCliTaskExecuteSqlFromScriptParameters();
HiveCliTask hiveCliTask = prepareHiveCliTaskForTest(hiveCliTaskParameters);
hiveCliTask.init();
Assert.assertEquals(hiveCliTask.buildCommand(), EXPECTED_HIVE_CLI_TASK_EXECUTE_FROM_SCRIPT_COMMAND);
}
@Test
public void hiveCliTaskExecuteSqlFromFile() throws Exception {
String hiveCliTaskParameters = buildHiveCliTaskExecuteSqlFromFileParameters();
HiveCliTask hiveCliTask = prepareHiveCliTaskForTest(hiveCliTaskParameters);
hiveCliTask.init();
Assert.assertEquals(hiveCliTask.buildCommand(), EXPECTED_HIVE_CLI_TASK_EXECUTE_FROM_FILE_COMMAND);
}
@Test
public void hiveCliTaskExecuteWithOptions() throws Exception {
String hiveCliTaskParameters = buildHiveCliTaskExecuteWithOptionsParameters();
HiveCliTask hiveCliTask = prepareHiveCliTaskForTest(hiveCliTaskParameters);
hiveCliTask.init();
Assert.assertEquals(hiveCliTask.buildCommand(), EXPECTED_HIVE_CLI_TASK_EXECUTE_WITH_OPTIONS);
}
private HiveCliTask prepareHiveCliTaskForTest(final String hiveCliTaskParameters) {
TaskExecutionContext taskExecutionContext = Mockito.mock(TaskExecutionContext.class);
when(taskExecutionContext.getTaskParams()).thenReturn(hiveCliTaskParameters);
HiveCliTask hiveCliTask = spy(new HiveCliTask(taskExecutionContext));
return hiveCliTask;
}
private String buildHiveCliTaskExecuteSqlFromScriptParameters() {
final HiveCliParameters hiveCliParameters = new HiveCliParameters();
hiveCliParameters.setHiveCliTaskExecutionType("SCRIPT");
hiveCliParameters.setHiveSqlScript("SHOW DATABASES;");
return JSONUtils.toJsonString(hiveCliParameters);
}
private String buildHiveCliTaskExecuteSqlFromFileParameters() {
final HiveCliParameters hiveCliParameters = new HiveCliParameters();
hiveCliParameters.setHiveCliTaskExecutionType("FILE");
List<ResourceInfo> resources = new ArrayList<>();
ResourceInfo sqlResource = new ResourceInfo();
sqlResource.setResourceName("/sql_tasks/hive_task.sql");
resources.add(sqlResource);
hiveCliParameters.setResourceList(resources);
return JSONUtils.toJsonString(hiveCliParameters);
}
private String buildHiveCliTaskExecuteWithOptionsParameters() {
final HiveCliParameters hiveCliParameters = new HiveCliParameters();
hiveCliParameters.setHiveCliTaskExecutionType("SCRIPT");
hiveCliParameters.setHiveSqlScript("SHOW DATABASES;");
hiveCliParameters.setHiveCliOptions("--verbose");
return JSONUtils.toJsonString(hiveCliParameters);
}
}

8
dolphinscheduler-task-plugin/pom.xml

@ -15,15 +15,14 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<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</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-task-plugin</artifactId>
<packaging>pom</packaging>
@ -61,6 +60,7 @@
<module>dolphinscheduler-task-chunjun</module>
<module>dolphinscheduler-task-flink-stream</module>
<module>dolphinscheduler-task-pytorch</module>
<module>dolphinscheduler-task-hivecli</module>
</modules>
<dependencyManagement>

BIN
dolphinscheduler-ui/public/images/task-icons/hivecli.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
dolphinscheduler-ui/public/images/task-icons/hivecli_hover.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

4
dolphinscheduler-ui/src/layouts/content/use-dataList.ts

@ -341,7 +341,9 @@ export function useDataList() {
label: t('user_dropdown.password'),
key: 'password',
icon: renderIcon(KeyOutlined),
disabled: (userStore.getUserInfo as UserInfoRes).securityConfigType !== 'PASSWORD'
disabled:
(userStore.getUserInfo as UserInfoRes).securityConfigType !==
'PASSWORD'
},
{
label: t('user_dropdown.logout'),

20
dolphinscheduler-ui/src/locales/en_US/project.ts

@ -646,11 +646,20 @@ export default {
zeppelin_paragraph_id_tips:
'Please enter the paragraph id of your zeppelin paragraph',
zeppelin_parameters: 'parameters',
zeppelin_parameters_tips: 'Please enter the parameters for zeppelin dynamic form',
zeppelin_parameters_tips:
'Please enter the parameters for zeppelin dynamic form',
zeppelin_rest_endpoint: 'zeppelinRestEndpoint',
zeppelin_rest_endpoint_tips: 'Please enter the rest endpoint of your Zeppelin server',
zeppelin_production_note_directory: 'Directory for cloned zeppelin note in production mode',
zeppelin_production_note_directory_tips: 'Please enter the production note directory to enable production mode',
zeppelin_rest_endpoint_tips:
'Please enter the rest endpoint of your Zeppelin server',
zeppelin_production_note_directory:
'Directory for cloned zeppelin note in production mode',
zeppelin_production_note_directory_tips:
'Please enter the production note directory to enable production mode',
hive_cli_task_execution_type: 'Hive Cli Task Execution Type',
hive_sql_script: 'Hive SQL Script',
hive_cli_options: 'Hive Cli Options',
hive_cli_options_tips:
'Please enter the options for hive cli, e.g. --verbose',
jupyter_conda_env_name: 'condaEnvName',
jupyter_conda_env_name_tips:
'Please enter the conda environment name of papermill',
@ -764,6 +773,7 @@ export default {
pytorch_python_env_tool: 'Python Environment Manager Tool',
pytorch_requirements: 'Requirement File',
pytorch_conda_python_version: 'Python Version',
pytorch_conda_python_version_tips: 'Please enter the version number, such as 3.6, 3.7, 3.x'
pytorch_conda_python_version_tips:
'Please enter the version number, such as 3.6, 3.7, 3.x'
}
}

7
dolphinscheduler-ui/src/locales/zh_CN/project.ts

@ -638,12 +638,17 @@ export default {
zeppelin_note_id_tips: '请输入zeppelin note id',
zeppelin_paragraph_id: 'zeppelinParagraphId',
zeppelin_production_note_directory: '生产模式下存放克隆note的目录',
zeppelin_production_note_directory_tips: '请输入生产环境note目录以启用生产模式',
zeppelin_production_note_directory_tips:
'请输入生产环境note目录以启用生产模式',
zeppelin_paragraph_id_tips: '请输入zeppelin paragraph id',
zeppelin_parameters: 'parameters',
zeppelin_parameters_tips: '请输入zeppelin dynamic form参数',
zeppelin_rest_endpoint: 'zeppelinRestEndpoint',
zeppelin_rest_endpoint_tips: '请输入zeppelin server的rest endpoint',
hive_cli_task_execution_type: 'Hive Cli 任务类型',
hive_sql_script: 'Hive SQL 脚本',
hive_cli_options: 'Hive Cli 选项',
hive_cli_options_tips: '请输入您的Hive Cli选项,如--verbose等',
jupyter_conda_env_name: 'condaEnvName',
jupyter_conda_env_name_tips: '请输入papermill所在的conda环境名',
jupyter_input_note_path: 'inputNotePath',

8
dolphinscheduler-ui/src/views/data-quality/rule/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, ref, toRefs } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
ref,
toRefs
} from 'vue'
import {
NSpace,
NInput,

10
dolphinscheduler-ui/src/views/data-quality/task-result/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import {
NSpace,
NInput,
@ -24,7 +30,7 @@ import {
NButton,
NIcon,
NDataTable,
NPagination,
NPagination
} from 'naive-ui'
import { SearchOutlined } from '@vicons/antd'
import { useTable } from './use-table'

11
dolphinscheduler-ui/src/views/data-quality/task-result/use-table.ts

@ -30,9 +30,9 @@ import type {
ResultListRes
} from '@/service/modules/data-quality/types'
import { parseTime } from '@/common/common'
import ButtonLink from "@/components/button-link";
import { NEllipsis, NTag } from "naive-ui";
import { useRouter } from "vue-router";
import ButtonLink from '@/components/button-link'
import { NEllipsis, NTag } from 'naive-ui'
import { useRouter } from 'vue-router'
export function useTable() {
const { t } = useI18n()
@ -76,7 +76,10 @@ export function useTable() {
onClick: () =>
void router.push({
name: 'workflow-instance-detail',
params: { projectCode: row.projectCode, id: row.processInstanceId },
params: {
projectCode: row.projectCode,
id: row.processInstanceId
},
query: { code: row.processDefinitionCode }
})
},

12
dolphinscheduler-ui/src/views/datasource/list/detail.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import {
NButton,
NSpin,
@ -91,10 +97,10 @@ const DetailModal = defineComponent({
async () => {
props.show &&
state.detailForm.type &&
await changeType(
(await changeType(
state.detailForm.type,
datasourceType[state.detailForm.type]
)
))
props.show && props.id && setFieldsValue(await queryById(props.id))
}
)

14
dolphinscheduler-ui/src/views/datasource/list/index.tsx

@ -15,7 +15,14 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, ref, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
ref,
toRefs,
watch
} from 'vue'
import {
NButton,
NInput,
@ -113,10 +120,7 @@ const list = defineComponent({
>
{t('datasource.create_datasource')}
</NButton>
<NSpace
justify='end'
wrap={false}
>
<NSpace justify='end' wrap={false}>
<NInput
allowInput={this.trim}
v-model={[this.searchVal, 'value']}

9
dolphinscheduler-ui/src/views/login/index.tsx

@ -51,7 +51,14 @@ const login = defineComponent({
cookies.set('language', localesStore.getLocales, { path: '/' })
return { t, handleChange, handleLogin, ...toRefs(state), localesStore, trim }
return {
t,
handleChange,
handleLogin,
...toRefs(state),
localesStore,
trim
}
},
render() {
return (

8
dolphinscheduler-ui/src/views/monitor/statistics/audit-log/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import {
NSpace,
NInput,

8
dolphinscheduler-ui/src/views/profile/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, ref, toRefs } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
ref,
toRefs
} from 'vue'
import { useForm } from './use-form'
import { NButton, NForm, NFormItem, NInput } from 'naive-ui'
import { useUserinfo } from './use-userinfo'

10
dolphinscheduler-ui/src/views/projects/list/components/project-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import { NForm, NFormItem, NInput } from 'naive-ui'
import { useForm } from './use-form'
import Modal from '@/components/modal'
@ -90,7 +96,7 @@ const ProjectModal = defineComponent({
}
)
return { ...toRefs(variables), t, cancelModal, confirmModal, trim}
return { ...toRefs(variables), t, cancelModal, confirmModal, trim }
},
render() {
const { t } = this

8
dolphinscheduler-ui/src/views/projects/list/index.tsx

@ -24,7 +24,13 @@ import {
NPagination,
NSpace
} from 'naive-ui'
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import { useI18n } from 'vue-i18n'
import { useTable } from './use-table'
import Card from '@/components/card'

1
dolphinscheduler-ui/src/views/projects/task/components/node/fields/index.ts

@ -77,3 +77,4 @@ export { useSagemaker } from './use-sagemaker'
export { useChunjun } from './use-chunjun'
export { useChunjunDeployMode } from './use-chunjun-deploy-mode'
export { usePytorch } from './use-pytorch'
export { useHiveCli } from './use-hive-cli'

10
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-emr.ts

@ -17,14 +17,18 @@
import { useI18n } from 'vue-i18n'
import { useCustomParams } from '.'
import type { IJsonItem } from '../types'
import {computed} from "vue";
import { computed } from 'vue'
export function useEmr(model: { [field: string]: any }): IJsonItem[] {
const { t } = useI18n()
const jobFlowDefineJsonSpan = computed(() => (model.programType === 'RUN_JOB_FLOW' ? 24 : 0))
const jobFlowDefineJsonSpan = computed(() =>
model.programType === 'RUN_JOB_FLOW' ? 24 : 0
)
const stepsDefineJsonSpan = computed(() => (model.programType === 'ADD_JOB_FLOW_STEPS' ? 24 : 0))
const stepsDefineJsonSpan = computed(() =>
model.programType === 'ADD_JOB_FLOW_STEPS' ? 24 : 0
)
return [
{

62
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-hive-cli.ts

@ -0,0 +1,62 @@
/*
* 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.
*/
import { useI18n } from 'vue-i18n'
import { useCustomParams, useResources } from '.'
import type { IJsonItem } from '../types'
export function useHiveCli(model: { [field: string]: any }): IJsonItem[] {
const { t } = useI18n()
return [
{
type: 'select',
field: 'hiveCliTaskExecutionType',
span: 12,
name: t('project.node.hive_cli_task_execution_type'),
options: HIVE_CLI_TASK_EXECUTION_TYPES
},
{
type: 'editor',
field: 'hiveSqlScript',
name: t('project.node.hive_sql_script'),
props: {
language: 'sql'
}
},
{
type: 'input',
field: 'hiveCliOptions',
name: t('project.node.hive_cli_options'),
props: {
placeholder: t('project.node.hive_cli_options_tips')
}
},
useResources(),
...useCustomParams({ model, field: 'localParams', isSimple: false })
]
}
export const HIVE_CLI_TASK_EXECUTION_TYPES = [
{
label: 'FROM_SCRIPT',
value: 'SCRIPT'
},
{
label: 'FROM_FILE',
value: 'FILE'
}
]

4
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-mlflow-models.ts

@ -47,8 +47,8 @@ export function useMlflowModels(model: { [field: string]: any }): IJsonItem[] {
watch(
() => [model.deployType],
() => {
cpuLimitSpan.value = model.deployType === "DOCKER COMPOSE" ? 12 : 0
memoryLimitSpan.value = model.deployType === "DOCKER COMPOSE" ? 12 : 0
cpuLimitSpan.value = model.deployType === 'DOCKER COMPOSE' ? 12 : 0
memoryLimitSpan.value = model.deployType === 'DOCKER COMPOSE' ? 12 : 0
}
)

3
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-pytorch.ts

@ -46,7 +46,8 @@ export function usePytorch(model: { [field: string]: any }): IJsonItem[] {
isCreateEnvironmentSpan.value = model.otherParams ? 12 : 0
pythonPathSpan.value = model.otherParams ? 24 : 0
pythonEnvToolSpan.value = model.showCreateEnvironment ? 12 : 0
pythonCommandSpan.value = ~model.showCreateEnvironment & model.otherParams ? 12 : 0
pythonCommandSpan.value =
~model.showCreateEnvironment & model.otherParams ? 12 : 0
requirementsSpan.value = model.showCreateEnvironment ? 24 : 0
condaPythonVersionSpan.value = model.showCreateConda ? 24 : 0
}

4
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resource-limit.ts

@ -29,7 +29,7 @@ export function useResourceLimit(): IJsonItem[] {
slots: {
suffix: () => '%'
},
props: {min: -1}
props: { min: -1 }
},
{
type: 'input-number',
@ -39,7 +39,7 @@ export function useResourceLimit(): IJsonItem[] {
slots: {
suffix: () => t('project.node.mb')
},
props: {min: -1}
props: { min: -1 }
}
]
}

3
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-sagemaker.ts

@ -18,12 +18,11 @@ import type { IJsonItem } from '../types'
import { useCustomParams } from '.'
export function useSagemaker(model: { [field: string]: any }): IJsonItem[] {
return [
{
type: 'editor',
field: 'sagemakerRequestJson',
name: "SagemakerRequestJson",
name: 'SagemakerRequestJson',
props: {
language: 'json'
},

7
dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts

@ -421,6 +421,12 @@ export function formatParams(data: INodeData): {
taskParams.targetJobName = data.targetJobName
}
if (data.taskType === 'HIVECLI') {
taskParams.hiveCliTaskExecutionType = data.hiveCliTaskExecutionType
taskParams.hiveSqlScript = data.hiveSqlScript
taskParams.hiveCliOptions = data.hiveCliOptions
}
let timeoutNotifyStrategy = ''
if (data.timeoutNotifyStrategy) {
if (data.timeoutNotifyStrategy.length === 1) {
@ -658,5 +664,6 @@ export function formatModel(data: ITaskData) {
if (data.taskParams?.jobType) {
params.isCustomTask = data.taskParams.jobType === 'CUSTOM'
}
return params
}

4
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/index.ts

@ -44,6 +44,7 @@ import { useDinky } from './use-dinky'
import { userSagemaker } from './use-sagemaker'
import { useChunjun } from './use-chunjun'
import { usePytorch } from './use-pytorch'
import { useHiveCli } from './use-hive-cli'
export default {
SHELL: useShell,
@ -74,5 +75,6 @@ export default {
SAGEMAKER: userSagemaker,
CHUNJUN: useChunjun,
FLINK_STREAM: useFlinkStream,
PYTORCH: usePytorch
PYTORCH: usePytorch,
HIVECLI: useHiveCli
}

80
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts

@ -0,0 +1,80 @@
/*
* 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.
*/
import { reactive } from 'vue'
import * as Fields from '../fields/index'
import type { IJsonItem, INodeData, ITaskData } from '../types'
export function useHiveCli({
projectCode,
from = 0,
readonly,
data
}: {
projectCode: number
from?: number
readonly?: boolean
data?: ITaskData
}) {
const model = reactive({
name: '',
taskType: 'HIVECLI',
flag: 'YES',
description: '',
timeoutFlag: false,
localParams: [],
environmentCode: null,
failRetryInterval: 1,
failRetryTimes: 0,
workerGroup: 'default',
delayTime: 0,
timeout: 30
} as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return {
json: [
Fields.useName(from),
...extra,
Fields.useRunFlag(),
Fields.useDescription(),
Fields.useTaskPriority(),
Fields.useWorkerGroup(),
Fields.useEnvironmentName(model, !model.id),
...Fields.useTaskGroup(model, projectCode),
...Fields.useFailed(),
Fields.useDelayTime(model),
...Fields.useTimeoutAlarm(model),
...Fields.useHiveCli(model),
Fields.usePreTasks()
] as IJsonItem[],
model
}
}

1
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pytorch.ts

@ -85,4 +85,3 @@ export function usePytorch({
model
}
}

3
dolphinscheduler-ui/src/views/projects/task/components/node/types.ts

@ -306,6 +306,9 @@ interface ITaskParams {
restEndpoint?: string
zeppelinProductionNoteDirectory?: string
productionNoteDirectory?: string
hiveCliOptions?: string
hiveSqlScript?: string
hiveCliTaskExecutionType?: string
noteId?: string
paragraphId?: string
condaEnvName?: string

5
dolphinscheduler-ui/src/views/projects/task/constants/task-type.ts

@ -44,6 +44,7 @@ export type TaskType =
| 'CHUNJUN'
| 'FLINK_STREAM'
| 'PYTORCH'
| 'HIVECLI'
export type TaskExecuteType = 'STREAM' | 'BATCH'
@ -151,6 +152,10 @@ export const TASK_TYPES_MAP = {
PYTORCH: {
alias: 'Pytorch',
helperLinkDisable: true
},
HIVECLI: {
alias: 'HIVECLI',
helperLinkDisable: true
}
} as {
[key in TaskType]: {

4
dolphinscheduler-ui/src/views/projects/task/definition/components/start-modal.tsx

@ -160,9 +160,7 @@ export default defineComponent({
>
<NForm ref='startFormRef' model={this.startForm}>
<NFormItem label={t('project.task.task_name')} path='task_name'>
<div title={this.row.taskName}>
{this.row.taskName}
</div>
<div title={this.row.taskName}>{this.row.taskName}</div>
</NFormItem>
<NFormItem
label={t('project.task.notification_strategy')}

4
dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-context-menu.tsx

@ -133,8 +133,8 @@ export default defineComponent({
onClick={this.startRunning}
>
{t('project.node.start')}
</NButton>)
}
</NButton>
)}
{this.menuDisplay && (
<>
<NButton

6
dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag.module.scss

@ -159,6 +159,9 @@ $bgLight: #ffffff;
&.icon-zeppelin {
background-image: url('/images/task-icons/zeppelin.png');
}
&.icon-hivecli {
background-image: url('/images/task-icons/hivecli.png');
}
&.icon-k8s {
background-image: url('/images/task-icons/k8s.png');
}
@ -248,6 +251,9 @@ $bgLight: #ffffff;
&.icon-zeppelin {
background-image: url('/images/task-icons/zeppelin_hover.png');
}
&.icon-hivecli {
background-image: url('/images/task-icons/hivecli_hover.png');
}
&.icon-k8s {
background-image: url('/images/task-icons/k8s_hover.png');
}

26
dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx

@ -27,7 +27,7 @@ import {
computed
} from 'vue'
import { useI18n } from 'vue-i18n'
import { useRoute } from "vue-router"
import { useRoute } from 'vue-router'
import Modal from '@/components/modal'
import { useForm } from './use-form'
import { useModal } from './use-modal'
@ -147,7 +147,9 @@ export default defineComponent({
}
]
const showTaskDependType = computed(() => route.name === 'workflow-definition-detail')
const showTaskDependType = computed(
() => route.name === 'workflow-definition-detail'
)
const renderLabel = (option: any) => {
return [
@ -267,13 +269,19 @@ export default defineComponent({
>
<NRadioGroup v-model:value={this.startForm.taskDependType}>
<NSpace>
<NRadio value='TASK_POST'>{t('project.workflow.backward_execution')}</NRadio>
<NRadio value='TASK_PRE'>{t('project.workflow.forward_execution')}</NRadio>
<NRadio value='TASK_ONLY'>{t('project.workflow.current_node_execution')}</NRadio>
<NRadio value='TASK_POST'>
{t('project.workflow.backward_execution')}
</NRadio>
<NRadio value='TASK_PRE'>
{t('project.workflow.forward_execution')}
</NRadio>
<NRadio value='TASK_ONLY'>
{t('project.workflow.current_node_execution')}
</NRadio>
</NSpace>
</NRadioGroup>
</NFormItem>)
}
</NFormItem>
)}
<NFormItem
label={t('project.workflow.notification_strategy')}
path='warningType'
@ -345,7 +353,9 @@ export default defineComponent({
label={t('project.workflow.mode_of_dependent')}
path='complementDependentMode'
>
<NRadioGroup v-model:value={this.startForm.complementDependentMode}>
<NRadioGroup
v-model:value={this.startForm.complementDependentMode}
>
<NSpace>
<NRadio value={'OFF_MODE'}>
{t('project.workflow.close')}

15
dolphinscheduler-ui/src/views/projects/workflow/definition/index.tsx

@ -26,7 +26,13 @@ import {
NTooltip,
NPopconfirm
} from 'naive-ui'
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import { useI18n } from 'vue-i18n'
import { useTable } from './use-table'
import { useRouter, useRoute } from 'vue-router'
@ -128,7 +134,12 @@ export default defineComponent({
>
{t('project.workflow.create_workflow')}
</NButton>
<NButton strong secondary size='small' onClick={() => (this.showRef = true)}>
<NButton
strong
secondary
size='small'
onClick={() => (this.showRef = true)}
>
{t('project.workflow.import_workflow')}
</NButton>
</NSpace>

11
dolphinscheduler-ui/src/views/projects/workflow/instance/components/process-instance-condition.tsx

@ -16,14 +16,7 @@
*/
import { SearchOutlined } from '@vicons/antd'
import {
NInput,
NButton,
NDatePicker,
NSelect,
NIcon,
NSpace
} from 'naive-ui'
import { NInput, NButton, NDatePicker, NSelect, NIcon, NSpace } from 'naive-ui'
import { defineComponent, getCurrentInstance, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { format } from 'date-fns'
@ -102,7 +95,7 @@ export default defineComponent({
<NSelect
options={options}
size='small'
style={{width: '210px'}}
style={{ width: '210px' }}
defaultValue={''}
v-model:value={this.stateTypeRef}
/>

9
dolphinscheduler-ui/src/views/resource/file/index.tsx

@ -16,7 +16,14 @@
*/
import { useRouter } from 'vue-router'
import { defineComponent, onMounted, ref, reactive, Ref, getCurrentInstance } from 'vue'
import {
defineComponent,
onMounted,
ref,
reactive,
Ref,
getCurrentInstance
} from 'vue'
import {
NIcon,
NSpace,

8
dolphinscheduler-ui/src/views/resource/file/rename/index.tsx

@ -14,7 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { defineComponent, toRefs, PropType, watch, getCurrentInstance } from 'vue'
import {
defineComponent,
toRefs,
PropType,
watch,
getCurrentInstance
} from 'vue'
import { NForm, NFormItem, NInput } from 'naive-ui'
import { useI18n } from 'vue-i18n'
import Modal from '@/components/modal'

9
dolphinscheduler-ui/src/views/resource/task-group/option/index.tsx

@ -15,7 +15,14 @@
* limitations under the License.
*/
import { ref, defineComponent, toRefs, reactive, onMounted, getCurrentInstance } from 'vue'
import {
ref,
defineComponent,
toRefs,
reactive,
onMounted,
getCurrentInstance
} from 'vue'
import {
NButton,
NIcon,

12
dolphinscheduler-ui/src/views/resource/task-group/queue/components/form-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, PropType, toRefs, onMounted, getCurrentInstance } from 'vue'
import {
defineComponent,
PropType,
toRefs,
onMounted,
getCurrentInstance
} from 'vue'
import { NForm, NFormItem, NInput } from 'naive-ui'
import { useForm } from '../use-form'
import Modal from '@/components/modal'
@ -83,7 +89,9 @@ const FormModal = defineComponent({
path='priority'
>
<NInput
allowInput={this.trim} v-model:value={this.formData.priority} />
allowInput={this.trim}
v-model:value={this.formData.priority}
/>
</NFormItem>
</NForm>
</Modal>

9
dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx

@ -15,7 +15,14 @@
* limitations under the License.
*/
import { ref, defineComponent, toRefs, reactive, onMounted, getCurrentInstance } from 'vue'
import {
ref,
defineComponent,
toRefs,
reactive,
onMounted,
getCurrentInstance
} from 'vue'
import {
NButton,
NIcon,

10
dolphinscheduler-ui/src/views/resource/udf/function/components/function-modal.tsx

@ -15,7 +15,15 @@
* limitations under the License.
*/
import { defineComponent, toRefs, PropType, watch, onMounted, ref, getCurrentInstance } from 'vue'
import {
defineComponent,
toRefs,
PropType,
watch,
onMounted,
ref,
getCurrentInstance
} from 'vue'
import {
NUpload,
NIcon,

12
dolphinscheduler-ui/src/views/resource/udf/function/index.tsx

@ -15,7 +15,15 @@
* limitations under the License.
*/
import { defineComponent, Ref, toRefs, onMounted, toRef, watch, getCurrentInstance } from 'vue'
import {
defineComponent,
Ref,
toRefs,
onMounted,
toRef,
watch,
getCurrentInstance
} from 'vue'
import {
NIcon,
NSpace,
@ -114,7 +122,7 @@ export default defineComponent({
/>
<NButton type='primary' size='small' onClick={this.handleSearch}>
<NIcon>
<SearchOutlined/>
<SearchOutlined />
</NIcon>
</NButton>
</NSpace>

10
dolphinscheduler-ui/src/views/resource/udf/resource/index.tsx

@ -15,7 +15,15 @@
* limitations under the License.
*/
import { defineComponent, Ref, toRefs, onMounted, toRef, watch, getCurrentInstance } from 'vue'
import {
defineComponent,
Ref,
toRefs,
onMounted,
toRef,
watch,
getCurrentInstance
} from 'vue'
import {
NIcon,
NSpace,

8
dolphinscheduler-ui/src/views/security/alarm-group-manage/components/alarm-group-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import Modal from '@/components/modal'
import { NForm, NFormItem, NInput, NSelect } from 'naive-ui'
import { useModal } from './use-modal'

8
dolphinscheduler-ui/src/views/security/alarm-group-manage/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import {
NButton,
NDataTable,

9
dolphinscheduler-ui/src/views/security/alarm-instance-manage/detail.tsx

@ -15,7 +15,14 @@
* limitations under the License.
*/
import { defineComponent, toRefs, watch, onMounted, ref, getCurrentInstance } from 'vue'
import {
defineComponent,
toRefs,
watch,
onMounted,
ref,
getCurrentInstance
} from 'vue'
import { NSelect, NInput } from 'naive-ui'
import { isFunction } from 'lodash'
import { useI18n } from 'vue-i18n'

21
dolphinscheduler-ui/src/views/security/alarm-instance-manage/index.tsx

@ -15,7 +15,14 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, ref, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
ref,
toRefs,
watch
} from 'vue'
import {
NButton,
NInput,
@ -121,10 +128,7 @@ const AlarmInstanceManage = defineComponent({
{t('security.alarm_instance.create_alarm_instance')}
</NButton>
)}
<NSpace
justify='end'
wrap={false}
>
<NSpace justify='end' wrap={false}>
<NInput
allowInput={this.trim}
v-model={[this.searchVal, 'value']}
@ -145,7 +149,12 @@ const AlarmInstanceManage = defineComponent({
</Card>
<Card title={t('menu.alarm_instance_manage')}>
<NSpace vertical>
<NDataTable columns={columns} data={list} loading={loading} striped />
<NDataTable
columns={columns}
data={list}
loading={loading}
striped
/>
<NSpace justify='center'>
<NPagination
page={page}

8
dolphinscheduler-ui/src/views/security/cluster-manage/components/cluster-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import Modal from '@/components/modal'
import { NForm, NFormItem, NInput } from 'naive-ui'
import { useModal } from './use-modal'

8
dolphinscheduler-ui/src/views/security/cluster-manage/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import {
NButton,
NDataTable,

8
dolphinscheduler-ui/src/views/security/environment-manage/components/environment-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import Modal from '@/components/modal'
import { NForm, NFormItem, NInput, NSelect } from 'naive-ui'
import { useModal } from './use-modal'

8
dolphinscheduler-ui/src/views/security/environment-manage/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import {
NButton,
NDataTable,

14
dolphinscheduler-ui/src/views/security/k8s-namespace-manage/components/k8s-namespace-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import Modal from '@/components/modal'
import {
NForm,
@ -120,7 +126,11 @@ const K8sNamespaceModal = defineComponent({
show={this.showModalRef}
onCancel={this.cancelModal}
onConfirm={this.confirmModal}
confirmDisabled={!this.model.namespace || (this.model.clusterCode == null || this.model.clusterCode === '')}
confirmDisabled={
!this.model.namespace ||
this.model.clusterCode == null ||
this.model.clusterCode === ''
}
confirmLoading={this.saving}
>
{{

8
dolphinscheduler-ui/src/views/security/k8s-namespace-manage/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import {
NButton,
NDataTable,

8
dolphinscheduler-ui/src/views/security/tenant-manage/components/tenant-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import Modal from '@/components/modal'
import { NForm, NFormItem, NInput, NSelect } from 'naive-ui'
import { useModalData } from './use-modalData'

8
dolphinscheduler-ui/src/views/security/tenant-manage/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, toRefs, onMounted, watch, getCurrentInstance } from 'vue'
import {
defineComponent,
toRefs,
onMounted,
watch,
getCurrentInstance
} from 'vue'
import {
NButton,
NInput,

8
dolphinscheduler-ui/src/views/security/user-manage/components/user-detail-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import { useI18n } from 'vue-i18n'
import {
NInput,

6
dolphinscheduler-ui/src/views/security/user-manage/index.tsx

@ -80,7 +80,11 @@ const UsersManage = defineComponent({
</NButton>
<NSpace>
<NInput
allowInput={this.trim} v-model:value={this.searchVal} size='small' clearable />
allowInput={this.trim}
v-model:value={this.searchVal}
size='small'
clearable
/>
<NButton type='primary' size='small' onClick={this.onUpdatedList}>
<NIcon>
<SearchOutlined />

8
dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import Modal from '@/components/modal'
import { NForm, NFormItem, NInput, NSelect } from 'naive-ui'
import { useModal } from './use-modal'

8
dolphinscheduler-ui/src/views/security/worker-group-manage/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import {
NButton,
NDataTable,

8
dolphinscheduler-ui/src/views/security/yarn-queue-manage/components/yarn-queue-modal.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
PropType,
toRefs,
watch
} from 'vue'
import Modal from '@/components/modal'
import { NForm, NFormItem, NInput } from 'naive-ui'
import { useModal } from './use-modal'

8
dolphinscheduler-ui/src/views/security/yarn-queue-manage/index.tsx

@ -15,7 +15,13 @@
* limitations under the License.
*/
import { defineComponent, getCurrentInstance, onMounted, toRefs, watch } from 'vue'
import {
defineComponent,
getCurrentInstance,
onMounted,
toRefs,
watch
} from 'vue'
import {
NButton,
NDataTable,

Loading…
Cancel
Save