rename project and doc

This commit is contained in:
qiaozhanwei 2019-09-29 15:11:10 +08:00
parent e84c6adcac
commit d09a2d07c9
1184 changed files with 2294 additions and 2366 deletions

View File

@ -50,7 +50,7 @@ A: We also support **the priority of processes and tasks**. Priority We have fiv
----
## Q: Escheduler-grpc gives an error
## Q: dolphinscheduler-grpc gives an error
A: Execute in the root directory: mvn -U clean package assembly:assembly -Dmaven.test.skip=true , then refresh the entire project
@ -70,11 +70,11 @@ A: Install **npm install node-sass --unsafe-perm** separately, then **npm instal
## Q: UI cannot log in normally.
A: 1, if it is node startup, check whether the .env API_BASE configuration under escheduler-ui is the Api Server service address.
A: 1, if it is node startup, check whether the .env API_BASE configuration under dolphinscheduler-ui is the Api Server service address.
2, If it is nginx booted and installed via **install-escheduler-ui.sh**, check if the proxy_pass configuration in **/etc/nginx/conf.d/escheduler.conf** is the Api Server service. address
2, If it is nginx booted and installed via **install-dolphinscheduler-ui.sh**, check if the proxy_pass configuration in **/etc/nginx/conf.d/dolphinscheduler.conf** is the Api Server service. address
 3, if the above configuration is correct, then please check if the Api Server service is normal, curl http://192.168.xx.xx:12345/escheduler/users/get-user-info, check the Api Server log, if Prompt cn.escheduler.api.interceptor.LoginHandlerInterceptor:[76] - session info is null, which proves that the Api Server service is normal.
 3, if the above configuration is correct, then please check if the Api Server service is normal, curl http://192.168.xx.xx:12345/dolphinscheduler/users/get-user-info, check the Api Server log, if Prompt cn.dolphinscheduler.api.interceptor.LoginHandlerInterceptor:[76] - session info is null, which proves that the Api Server service is normal.
4, if there is no problem above, you need to check if **server.context-path and server.port configuration** in **application.properties** is correct
@ -84,7 +84,7 @@ A: 1, if it is node startup, check whether the .env API_BASE configuration under
A: 1, first **check whether the MasterServer service exists through jps**, or directly check whether there is a master service in zk from the service monitoring.
2,If there is a master service, check **the command status statistics** or whether new records are added in **t_escheduler_error_command**. If it is added, **please check the message field.**
2,If there is a master service, check **the command status statistics** or whether new records are added in **t_dolphinscheduler_error_command**. If it is added, **please check the message field.**
---
@ -102,9 +102,9 @@ A: 1, **first check whether the WorkerServer service exists through jps**, or
A: Provide Docker image and Dockerfile.
Docker image address: https://hub.docker.com/r/escheduler/escheduler_images
Docker image address: https://hub.docker.com/r/dolphinscheduler/dolphinscheduler_images
Dockerfile address: https://github.com/qiaozhanwei/escheduler_dockerfile/tree/master/docker_escheduler
Dockerfile address: https://github.com/qiaozhanwei/dolphinscheduler_dockerfile/tree/master/docker_dolphinscheduler
------
@ -112,9 +112,9 @@ Dockerfile address: https://github.com/qiaozhanwei/escheduler_dockerfile/tree/ma
A: 1, if the replacement variable contains special characters, **use the \ transfer character to transfer**
2, installPath="/data1_1T/escheduler", **this directory can not be the same as the install.sh directory currently installed with one click.**
2, installPath="/data1_1T/dolphinscheduler", **this directory can not be the same as the install.sh directory currently installed with one click.**
3, deployUser = "escheduler", **the deployment user must have sudo privileges**, because the worker is executed by sudo -u tenant sh xxx.command
3, deployUser = "dolphinscheduler", **the deployment user must have sudo privileges**, because the worker is executed by sudo -u tenant sh xxx.command
4, monitorServerState = "false", whether the service monitoring script is started, the default is not to start the service monitoring script. **If the service monitoring script is started, the master and worker services are monitored every 5 minutes, and if the machine is down, it will automatically restart.**
@ -126,7 +126,7 @@ A: 1, if the replacement variable contains special characters, **use the \ tra
## Q : Process definition and process instance offline exception
A : For **versions prior to 1.0.4**, modify the code under the escheduler-api cn.escheduler.api.quartz package.
A : For **versions prior to 1.0.4**, modify the code under the dolphinscheduler-api cn.dolphinscheduler.api.quartz package.
```
public boolean deleteJob(String jobName, String jobGroupName) {
@ -207,7 +207,7 @@ A: 1, in **the process definition list**, click the **Start** button.
## Q : Python task setting Python version
A 1**for the version after 1.0.3** only need to modify PYTHON_HOME in conf/env/.escheduler_env.sh
A 1**for the version after 1.0.3** only need to modify PYTHON_HOME in conf/env/.dolphinscheduler_env.sh
```
export PYTHON_HOME=/bin/python

View File

@ -34,7 +34,7 @@
* Backend development documentation
* [Environmental requirements](backend-development.md#Environmental requirements)
* [Project compilation](backend-development.md#Project compilation)
* [Interface documentation](http://52.82.13.76:8888/escheduler/doc.html?language=en_US&lang=en)
* [Interface documentation](http://52.82.13.76:8888/dolphinscheduler/doc.html?language=en_US&lang=en)
* FAQ
* [FAQ](EasyScheduler-FAQ.md)
* EasyScheduler upgrade documentation

View File

@ -7,7 +7,7 @@ There are two deployment modes for the backend:
## Preparations
Download the latest version of the installation package, download address [gitee download](https://gitee.com/easyscheduler/EasyScheduler/attach_files/) or [github download](https://github.com/analysys/EasyScheduler/releases), download escheduler-backend-x.x.x.tar.gz(back-end referred to as escheduler-backend),escheduler-ui-x.x.x.tar.gz(front-end referred to as escheduler-ui)
Download the latest version of the installation package, download address [gitee download](https://gitee.com/easyscheduler/EasyScheduler/attach_files/) or [github download](https://github.com/apache/incubator-dolphinscheduler/releases), download dolphinscheduler-backend-x.x.x.tar.gz(back-end referred to as dolphinscheduler-backend),dolphinscheduler-ui-x.x.x.tar.gz(front-end referred to as dolphinscheduler-ui)
@ -32,8 +32,8 @@ Download the latest version of the installation package, download address [gi
```
vi /etc/sudoers
# For example, the deployment user is an escheduler account
escheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
# For example, the deployment user is an dolphinscheduler account
dolphinscheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
# And you need to comment out the Default requiretty line
#Default requiretty
@ -51,9 +51,9 @@ Configure SSH secret-free login on deployment machines and other installation ma
Execute the following command to create database and account
```
CREATE DATABASE escheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON escheduler.* TO '{user}'@'%' IDENTIFIED BY '{password}';
GRANT ALL PRIVILEGES ON escheduler.* TO '{user}'@'localhost' IDENTIFIED BY '{password}';
CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'%' IDENTIFIED BY '{password}';
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'localhost' IDENTIFIED BY '{password}';
flush privileges;
```
@ -69,12 +69,12 @@ Configure SSH secret-free login on deployment machines and other installation ma
Execute scripts for creating tables and importing basic data
```
sh ./script/create-escheduler.sh
sh ./script/create-dolphinscheduler.sh
```
#### Preparations 5: Modify the deployment directory permissions and operation parameters
instruction of escheduler-backend directory
instruction of dolphinscheduler-backend directory
```directory
bin : Basic service startup script
@ -85,11 +85,11 @@ sql : The project relies on SQL files
install.sh : One-click deployment script
```
- Modify permissions (please modify the 'deployUser' to the corresponding deployment user) so that the deployment user has operational privileges on the escheduler-backend directory
- Modify permissions (please modify the 'deployUser' to the corresponding deployment user) so that the deployment user has operational privileges on the dolphinscheduler-backend directory
`sudo chown -R deployUser:deployUser escheduler-backend`
`sudo chown -R deployUser:deployUser dolphinscheduler-backend`
- Modify the `.escheduler_env.sh` environment variable in the conf/env/directory
- Modify the `.dolphinscheduler_env.sh` environment variable in the conf/env/directory
- Modify deployment parameters (depending on your server and business situation):
@ -132,11 +132,11 @@ After successful deployment, the log can be viewed and stored in a specified fol
```logPath
logs/
├── escheduler-alert-server.log
├── escheduler-master-server.log
|—— escheduler-worker-server.log
|—— escheduler-api-server.log
|—— escheduler-logger-server.log
├── dolphinscheduler-alert-server.log
├── dolphinscheduler-master-server.log
|—— dolphinscheduler-worker-server.log
|—— dolphinscheduler-api-server.log
|—— dolphinscheduler-logger-server.log
```
### Compile source code to deploy
@ -151,7 +151,7 @@ After downloading the release version of the source package, unzip it into the r
* View directory
After normal compilation, ./target/escheduler-{version}/ is generated in the current directory
After normal compilation, ./target/dolphinscheduler-{version}/ is generated in the current directory
### Start-and-stop services commonly used in systems (for service purposes, please refer to System Architecture Design for details)
@ -167,41 +167,41 @@ After normal compilation, ./target/escheduler-{version}/ is generated in the cur
* start and stop one master server
```master
sh ./bin/escheduler-daemon.sh start master-server
sh ./bin/escheduler-daemon.sh stop master-server
sh ./bin/dolphinscheduler-daemon.sh start master-server
sh ./bin/dolphinscheduler-daemon.sh stop master-server
```
* start and stop one worker server
```worker
sh ./bin/escheduler-daemon.sh start worker-server
sh ./bin/escheduler-daemon.sh stop worker-server
sh ./bin/dolphinscheduler-daemon.sh start worker-server
sh ./bin/dolphinscheduler-daemon.sh stop worker-server
```
* start and stop api server
```Api
sh ./bin/escheduler-daemon.sh start api-server
sh ./bin/escheduler-daemon.sh stop api-server
sh ./bin/dolphinscheduler-daemon.sh start api-server
sh ./bin/dolphinscheduler-daemon.sh stop api-server
```
* start and stop logger server
```Logger
sh ./bin/escheduler-daemon.sh start logger-server
sh ./bin/escheduler-daemon.sh stop logger-server
sh ./bin/dolphinscheduler-daemon.sh start logger-server
sh ./bin/dolphinscheduler-daemon.sh stop logger-server
```
* start and stop alert server
```Alert
sh ./bin/escheduler-daemon.sh start alert-server
sh ./bin/escheduler-daemon.sh stop alert-server
sh ./bin/dolphinscheduler-daemon.sh start alert-server
sh ./bin/dolphinscheduler-daemon.sh stop alert-server
```
## Database Upgrade
Database upgrade is a function added in version 1.0.2. The database can be upgraded automatically by executing the following command:
```upgrade
sh ./script/upgrade-escheduler.sh
sh ./script/upgrade-dolphinscheduler.sh
```

View File

@ -7,7 +7,7 @@
* [ZooKeeper](https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper)(3.4.6+) Must be installed
* [Maven](http://maven.apache.org/download.cgi)(3.3+) Must be installed
Because the escheduler-rpc module in EasyScheduler uses Grpc, you need to use Maven to compile the generated classes.
Because the dolphinscheduler-rpc module in EasyScheduler uses Grpc, you need to use Maven to compile the generated classes.
For those who are not familiar with maven, please refer to: [maven in five minutes](http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)(3.3+)
http://maven.apache.org/install.html
@ -23,7 +23,7 @@ After importing the EasyScheduler source code into the development tools such as
* View directory
After normal compilation, it will generate ./target/escheduler-{version}/ in the current directory.
After normal compilation, it will generate ./target/dolphinscheduler-{version}/ in the current directory.
```
bin

View File

@ -10,7 +10,7 @@ The front-end has three deployment modes: automated deployment, manual deploymen
Please download the latest version of the installation package, download address [gitee](https://gitee.com/easyscheduler/EasyScheduler/attach_files/)
After downloading escheduler-ui-x.x.x.tar.gzdecompress`tar -zxvf escheduler-ui-x.x.x.tar.gz ./`and enter the`escheduler-ui`directory
After downloading dolphinscheduler-ui-x.x.x.tar.gzdecompress`tar -zxvf dolphinscheduler-ui-x.x.x.tar.gz ./`and enter the`dolphinscheduler-ui`directory
@ -21,7 +21,7 @@ Automated deployment is recommended for either of the following two ways
### Automated Deployment
Edit the installation file`vi install-escheduler-ui.sh` in the` escheduler-ui` directory
Edit the installation file`vi install-dolphinscheduler-ui.sh` in the` dolphinscheduler-ui` directory
Change the front-end access port and the back-end proxy interface address
@ -35,7 +35,7 @@ esc_proxy_port="http://192.168.xx.xx:12345"
>Front-end automatic deployment based on Linux system `yum` operation, before deployment, please install and update`yum`
under this directory, execute`./install-escheduler-ui.sh`
under this directory, execute`./install-dolphinscheduler-ui.sh`
### Manual Deployment
@ -63,7 +63,7 @@ server {
root /xx/dist; # the dist directory address decompressed by the front end above (self-modifying)
index index.html index.html;
}
location /escheduler {
location /dolphinscheduler {
proxy_pass http://192.168.xx.xx:12345; # interface address (self-modifying)
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;

View File

@ -23,7 +23,7 @@ Node package download (note version 8.9.4) `https://nodejs.org/download/release/
- #### Front-end project construction
Use the command line mode `cd` enter the `escheduler-ui` project directory and execute `npm install` to pull the project dependency package.
Use the command line mode `cd` enter the `dolphinscheduler-ui` project directory and execute `npm install` to pull the project dependency package.
> If `npm install` is very slow
@ -34,7 +34,7 @@ Use the command line mode `cd` enter the `escheduler-ui` project directory and
- Create a new `.env` file or the interface that interacts with the backend
Create a new` .env` file in the `escheduler-ui `directory, add the ip address and port of the backend service to the file, and use it to interact with the backend. The contents of the` .env` file are as follows:
Create a new` .env` file in the `dolphinscheduler-ui `directory, add the ip address and port of the backend service to the file, and use it to interact with the backend. The contents of the` .env` file are as follows:
```
# Proxy interface address (modified by yourself)
API_BASE = http://192.168.xx.xx:12345
@ -67,7 +67,7 @@ Visit address` http://localhost:8888/#/`
Install pm2 `npm install -g pm2`
Execute `pm2 start npm -- run dev` to start the project in the project `escheduler-ui `root directory
Execute `pm2 start npm -- run dev` to start the project in the project `dolphinscheduler-ui `root directory
#### command
@ -81,7 +81,7 @@ Execute `pm2 start npm -- run dev` to start the project in the project `eschedul
```
[root@localhost escheduler-ui]# pm2 start npm -- run dev
[root@localhost dolphinscheduler-ui]# pm2 start npm -- run dev
[PM2] Applying action restartProcessId on app [npm](ids: 0)
[PM2] [npm](0) ✓
[PM2] Process successfully started

View File

@ -2,7 +2,7 @@
* Administrator user login
> Address192.168.xx.xx:8888 Username and passwordadmin/escheduler123
> Address192.168.xx.xx:8888 Username and passwordadmin/dolphinscheduler123
<p align="center">
<img src="https://user-images.githubusercontent.com/48329107/61701549-ee738000-ad70-11e9-8d75-87ce04a0152f.png" width="60%" />

View File

@ -331,7 +331,7 @@ conf/common/hadoop.properties
## Security
- The security has the functions of queue management, tenant management, user management, warning group management, worker group manager, token manage and other functions. It can also authorize resources, data sources, projects, etc.
- Administrator login, default username password: admin/escheduler 123
- Administrator login, default username password: admin/dolphinscheduler123
@ -391,7 +391,7 @@ conf/common/hadoop.properties
CloseableHttpClient httpclient = HttpClients.createDefault();
// create http post request
HttpPost httpPost = new HttpPost("http://127.0.0.1:12345/escheduler/projects/create");
HttpPost httpPost = new HttpPost("http://127.0.0.1:12345/dolphinscheduler/projects/create");
httpPost.setHeader("token", "123");
// set parameters
List<NameValuePair> parameters = new ArrayList<NameValuePair>();

View File

@ -3,13 +3,13 @@
## 1. Back up the previous version of the files and database
## 2. Stop all services of escheduler
## 2. Stop all services of dolphinscheduler
`sh ./script/stop-all.sh`
## 3. Download the new version of the installation package
- [gitee](https://gitee.com/easyscheduler/EasyScheduler/attach_files), download the latest version of the front and back installation packages (backend referred to as escheduler-backend, front end referred to as escheduler-ui)
- [gitee](https://gitee.com/easyscheduler/EasyScheduler/attach_files), download the latest version of the front and back installation packages (backend referred to as dolphinscheduler-backend, front end referred to as dolphinscheduler-ui)
- The following upgrade operations need to be performed in the new version of the directory
## 4. Database upgrade
@ -23,7 +23,7 @@
- Execute database upgrade script
`sh ./script/upgrade-escheduler.sh`
`sh ./script/upgrade-dolphinscheduler.sh`
## 5. Backend service upgrade

View File

@ -50,7 +50,7 @@ A我们同时 **支持流程和任务的优先级**。优先级我们有 **HI
----
## Qescheduler-grpc报错
## Qdolphinscheduler-grpc报错
A在根目录下执行mvn -U clean package assembly:assembly -Dmaven.test.skip=true 然后刷新下整个项目
@ -70,11 +70,11 @@ A单独安装 **npm install node-sass --unsafe-perm**,之后再 **npm insta
## QUI 不能正常登陆访问
A 1如果是node启动的查看escheduler-ui下的.env API_BASE配置是否是Api Server服务地址
A 1如果是node启动的查看dolphinscheduler-ui下的.env API_BASE配置是否是Api Server服务地址
2如果是nginx启动的并且是通过 **install-escheduler-ui.sh** 安装的,查看 **/etc/nginx/conf.d/escheduler.conf** 中的proxy_pass配置是否是Api Server服务地址
2如果是nginx启动的并且是通过 **install-dolphinscheduler-ui.sh** 安装的,查看 **/etc/nginx/conf.d/dolphinscheduler.conf** 中的proxy_pass配置是否是Api Server服务地址
3如果以上配置都是正确的那么请查看Api Server服务是否是正常的curl http://192.168.xx.xx:12345/escheduler/users/get-user-info查看Api Server日志如果提示 cn.escheduler.api.interceptor.LoginHandlerInterceptor:[76] - session info is null则证明Api Server服务是正常的
3如果以上配置都是正确的那么请查看Api Server服务是否是正常的curl http://192.168.xx.xx:12345/dolphinscheduler/users/get-user-info查看Api Server日志如果提示 cn.dolphinscheduler.api.interceptor.LoginHandlerInterceptor:[76] - session info is null则证明Api Server服务是正常的
4如果以上都没有问题需要查看一下 **application.properties** 中的 **server.context-path 和 server.port 配置**是否正确
@ -84,7 +84,7 @@ A 1如果是node启动的查看escheduler-ui下的.env API_BASE配置是
A 1首先通过**jps 查看MasterServer服务是否存在**或者从服务监控直接查看zk中是否存在master服务
2如果存在master服务查看 **命令状态统计** 或者 **t_escheduler_error_command** 中是否增加的新记录,如果增加了,**请查看 message 字段定位启动异常原因**
2如果存在master服务查看 **命令状态统计** 或者 **t_dolphinscheduler_error_command** 中是否增加的新记录,如果增加了,**请查看 message 字段定位启动异常原因**
---
@ -102,9 +102,9 @@ A 1首先通过**jps 查看WorkerServer服务是否存在**,或者从服
A 提供Docker镜像及Dockerfile。
Docker镜像地址https://hub.docker.com/r/escheduler/escheduler_images
Docker镜像地址https://hub.docker.com/r/dolphinscheduler/dolphinscheduler_images
Dockerfile地址https://github.com/qiaozhanwei/escheduler_dockerfile/tree/master/docker_escheduler
Dockerfile地址https://github.com/qiaozhanwei/dolphinscheduler_dockerfile/tree/master/docker_dolphinscheduler
---
@ -112,9 +112,9 @@ Dockerfile地址https://github.com/qiaozhanwei/escheduler_dockerfile/tree/mas
A 1如果替换变量中包含特殊字符**请用 \ 转移符进行转移**
2installPath="/data1_1T/escheduler"**这个目录不能和当前要一键安装的install.sh目录是一样的**
2installPath="/data1_1T/dolphinscheduler"**这个目录不能和当前要一键安装的install.sh目录是一样的**
3deployUser="escheduler"**部署用户必须具有sudo权限**因为worker是通过sudo -u 租户 sh xxx.command进行执行的
3deployUser="dolphinscheduler"**部署用户必须具有sudo权限**因为worker是通过sudo -u 租户 sh xxx.command进行执行的
4monitorServerState="false",服务监控脚本是否启动,默认是不启动服务监控脚本的。**如果启动服务监控脚本则每5分钟定时来监控master和worker的服务是否down机如果down机则会自动重启**
@ -126,7 +126,7 @@ A 1如果替换变量中包含特殊字符**请用 \ 转移符进行
## Q 流程定义和流程实例下线异常
A 对于 **1.0.4 以前的版本中**,修改escheduler-api cn.escheduler.api.quartz包下的代码即可
A 对于 **1.0.4 以前的版本中**,修改dolphinscheduler-api cn.dolphinscheduler.api.quartz包下的代码即可
```
public boolean deleteJob(String jobName, String jobGroupName) {
@ -205,7 +205,7 @@ A 1在 **流程定义列表**,点击 **启动** 按钮
## Q Python任务设置Python版本
A 1对于1**.0.3之后的版本**只需要修改 conf/env/.escheduler_env.sh中的PYTHON_HOME
A 1对于1**.0.3之后的版本**只需要修改 conf/env/.dolphinscheduler_env.sh中的PYTHON_HOME
```
export PYTHON_HOME=/bin/python

View File

@ -29,7 +29,7 @@
* [开发环境搭建](后端开发文档.md#项目编译)
* [自定义任务插件文档](任务插件开发.md#任务插件开发)
* [接口文档](http://52.82.13.76:8888/escheduler/doc.html?language=zh_CN&lang=cn)
* [接口文档](http://52.82.13.76:8888/dolphinscheduler/doc.html?language=zh_CN&lang=cn)
* FAQ
* [FAQ](EasyScheduler-FAQ.md)
* 系统版本升级文档

View File

@ -6,8 +6,8 @@
#### 基于YARN的计算参见MapReduceTask
- 需要在 **cn.escheduler.server.worker.task** 下的 **TaskManager** 类中创建自定义任务(也需在TaskType注册对应的任务类型)
- 需要继承**cn.escheduler.server.worker.task** 下的 **AbstractYarnTask**
- 需要在 **org.apache.dolphinscheduler.server.worker.task** 下的 **TaskManager** 类中创建自定义任务(也需在TaskType注册对应的任务类型)
- 需要继承**org.apache.dolphinscheduler.server.worker.task** 下的 **AbstractYarnTask**
- 构造方法调度 **AbstractYarnTask** 构造方法
- 继承 **AbstractParameters** 自定义任务参数实体
- 重写 **AbstractTask****init** 方法中解析**自定义任务参数**
@ -16,9 +16,9 @@
#### 基于非YARN的计算参见ShellTask
- 需要在 **cn.escheduler.server.worker.task** 下的 **TaskManager** 中创建自定义任务
- 需要在 **org.apache.dolphinscheduler.server.worker.task** 下的 **TaskManager** 中创建自定义任务
- 需要继承**cn.escheduler.server.worker.task** 下的 **AbstractTask**
- 需要继承**org.apache.dolphinscheduler.server.worker.task** 下的 **AbstractTask**
- 构造方法中实例化 **ShellCommandExecutor**
@ -46,8 +46,8 @@
### 基于非SHELL的任务参见SqlTask
- 需要在 **cn.escheduler.server.worker.task** 下的 **TaskManager** 中创建自定义任务
- 需要继承**cn.escheduler.server.worker.task** 下的 **AbstractTask**
- 需要在 **org.apache.dolphinscheduler.server.worker.task** 下的 **TaskManager** 中创建自定义任务
- 需要继承**org.apache.dolphinscheduler.server.worker.task** 下的 **AbstractTask**
- 继承 **AbstractParameters** 自定义任务参数实体
- 构造方法或者重写 **AbstractTask****init** 方法中,解析自定义任务参数实体
- 重写 **handle** 方法实现业务逻辑并设置相应的**exitStatusCode**

View File

@ -23,7 +23,7 @@ Node包下载 (注意版本 8.9.4) `https://nodejs.org/download/release/v8.9.4/`
- #### 前端项目构建
用命令行模式 `cd` 进入 `escheduler-ui`项目目录并执行 `npm install` 拉取项目依赖包
用命令行模式 `cd` 进入 `dolphinscheduler-ui`项目目录并执行 `npm install` 拉取项目依赖包
> 如果 `npm install` 速度非常慢
@ -34,7 +34,7 @@ Node包下载 (注意版本 8.9.4) `https://nodejs.org/download/release/v8.9.4/`
- 新建一个`.env`文件,用于跟后端交互的接口
在`escheduler-ui`目录下新建一个`.env`文件在文件里添加后端服务的ip地址和端口用于跟后端交互`.env`文件内容如下:
在`dolphinscheduler-ui`目录下新建一个`.env`文件在文件里添加后端服务的ip地址和端口用于跟后端交互`.env`文件内容如下:
```
# 代理的接口地址(自行修改)
API_BASE = http://192.168.xx.xx:12345
@ -68,7 +68,7 @@ npm install node-sass --unsafe-perm //单独安装node-sass依赖
安装pm2 `npm install -g pm2`
在项目`escheduler-ui`根目录执行 `pm2 start npm -- run dev` 启动项目
在项目`dolphinscheduler-ui`根目录执行 `pm2 start npm -- run dev` 启动项目
#### 命令
@ -82,7 +82,7 @@ npm install node-sass --unsafe-perm //单独安装node-sass依赖
```
[root@localhost escheduler-ui]# pm2 start npm -- run dev
[root@localhost dolphinscheduler-ui]# pm2 start npm -- run dev
[PM2] Applying action restartProcessId on app [npm](ids: 0)
[PM2] [npm](0) ✓
[PM2] Process successfully started

View File

@ -7,7 +7,7 @@
请下载最新版本的安装包,下载地址: [码云下载](https://gitee.com/easyscheduler/EasyScheduler/attach_files/) 或者 [github下载](https://github.com/analysys/EasyScheduler/releases)
下载 escheduler-ui-x.x.x.tar.gz 后,解压`tar -zxvf escheduler-ui-x.x.x.tar.gz ./`后,进入`escheduler-ui`目录
下载 dolphinscheduler-ui-x.x.x.tar.gz 后,解压`tar -zxvf dolphinscheduler-ui-x.x.x.tar.gz ./`后,进入`dolphinscheduler-ui`目录
@ -16,7 +16,7 @@
以下两种方式任选其一部署即可,推荐自动化部署
### 2.1 自动化部署
在`escheduler-ui`目录下编辑安装文件`vi install-escheduler-ui.sh`
在`dolphinscheduler-ui`目录下编辑安装文件`vi install-dolphinscheduler-ui.sh`
更改前端访问端口和后端代理接口地址
@ -30,7 +30,7 @@ esc_proxy_port="http://192.168.xx.xx:12345"
>前端自动部署基于linux系统`yum`操作,部署之前请先安装更新`yum`
在该目录下执行`./install-escheduler-ui.sh`
在该目录下执行`./install-dolphinscheduler-ui.sh`
### 2.2 手动部署
@ -55,7 +55,7 @@ server {
root /xx/dist; # 上面前端解压的dist目录地址(自行修改)
index index.html index.html;
}
location /escheduler {
location /dolphinscheduler {
proxy_pass http://192.168.xx.xx:12345; # 接口地址(自行修改)
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;

View File

@ -3,13 +3,13 @@
## 1. 备份上一版本文件和数据库
## 2. 停止escheduler所有服务
## 2. 停止dolphinscheduler所有服务
`sh ./script/stop-all.sh`
## 3. 下载新版本的安装包
- [码云下载](https://gitee.com/easyscheduler/EasyScheduler/attach_files), 下载最新版本的前后端安装包(后端简称escheduler-backend、前端简称escheduler-ui)
- [码云下载](https://gitee.com/easyscheduler/EasyScheduler/attach_files), 下载最新版本的前后端安装包(后端简称dolphinscheduler-backend、前端简称dolphinscheduler-ui)
- 以下升级操作都需要在新版本的目录进行
## 4. 数据库升级
@ -23,7 +23,7 @@
- 执行数据库升级脚本
`sh ./script/upgrade-escheduler.sh`
`sh ./script/upgrade-dolphinscheduler.sh`
## 5. 后端服务升级

View File

@ -7,7 +7,7 @@
* [ZooKeeper](https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper)(3.4.6+) :必装
* [Maven](http://maven.apache.org/download.cgi)(3.3+) :必装
因EasyScheduler中escheduler-rpc模块使用到Grpc需要用到Maven编译生成所需要的类
因EasyScheduler中dolphinscheduler-rpc模块使用到Grpc需要用到Maven编译生成所需要的类
对maven不熟的伙伴请参考: [maven in five minutes](http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)(3.3+)
http://maven.apache.org/install.html
@ -23,7 +23,7 @@ http://maven.apache.org/install.html
* 查看目录
正常编译完后,会在当前目录生成 ./target/escheduler-{version}/
正常编译完后,会在当前目录生成 ./target/dolphinscheduler-{version}/
```
bin

View File

@ -4,7 +4,7 @@
## 1、准备工作
请下载最新版本的安装包,下载地址: [码云下载](https://gitee.com/easyscheduler/EasyScheduler/attach_files/)或者[github下载](https://github.com/analysys/EasyScheduler/releases) 下载escheduler-backend-x.x.x.tar.gz(后端简称escheduler-backend),escheduler-ui-x.x.x.tar.gz(前端简称escheduler-ui)
请下载最新版本的安装包,下载地址: [码云下载](https://gitee.com/easyscheduler/EasyScheduler/attach_files/)或者[github下载](https://github.com/apache/incubator-dolphinscheduler/releases) 下载dolphinscheduler-backend-x.x.x.tar.gz(后端简称dolphinscheduler-backend),dolphinscheduler-ui-x.x.x.tar.gz(前端简称dolphinscheduler-ui)
#### 准备一: 基础软件安装(必装项请自行安装)
@ -27,8 +27,8 @@
```部署账号
vi /etc/sudoers
# 例如部署用户是escheduler账号
escheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
# 例如部署用户是dolphinscheduler账号
dolphinscheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
# 并且需要注释掉 Default requiretty 一行
#Default requiretty
@ -47,9 +47,9 @@ escheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
执行以下命令创建database和账号
```sql
CREATE DATABASE escheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON escheduler.* TO '{user}'@'%' IDENTIFIED BY '{password}';
GRANT ALL PRIVILEGES ON escheduler.* TO '{user}'@'localhost' IDENTIFIED BY '{password}';
CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'%' IDENTIFIED BY '{password}';
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'localhost' IDENTIFIED BY '{password}';
flush privileges;
```
@ -63,12 +63,12 @@ escheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
```
执行创建表和导入基础数据脚本
```
sh ./script/create-escheduler.sh
sh ./script/create-dolphinscheduler.sh
```
#### 准备五: 修改部署目录权限及运行参数
escheduler-backend目录介绍
dolphinscheduler-backend目录介绍
```
bin : 基础服务启动脚本
@ -79,11 +79,11 @@ sql : 项目依赖sql文件
install.sh : 一键部署脚本
```
- 修改权限(请将'deployUser'字段修改为对应部署用户),使得部署用户对escheduler-backend目录有操作权限
- 修改权限(请将'deployUser'字段修改为对应部署用户),使得部署用户对dolphinscheduler-backend目录有操作权限
`sudo chown -R deployUser:deployUser escheduler-backend`
`sudo chown -R deployUser:deployUser dolphinscheduler-backend`
- 修改conf/env/目录下的 `.escheduler_env.sh` 环境变量
- 修改conf/env/目录下的 `.dolphinscheduler_env.sh` 环境变量
- 修改部署参数(根据自己服务器及业务情况):
@ -127,11 +127,11 @@ install.sh : 一键部署脚本
```日志路径
logs/
├── escheduler-alert-server.log
├── escheduler-master-server.log
|—— escheduler-worker-server.log
|—— escheduler-api-server.log
|—— escheduler-logger-server.log
├── dolphinscheduler-alert-server.log
├── dolphinscheduler-master-server.log
|—— dolphinscheduler-worker-server.log
|—— dolphinscheduler-api-server.log
|—— dolphinscheduler-logger-server.log
```
### 2.2 编译源码来部署
@ -146,7 +146,7 @@ install.sh : 一键部署脚本
* 查看目录
正常编译完后,会在当前目录生成 `./target/escheduler-{version}/`
正常编译完后,会在当前目录生成 `./target/dolphinscheduler-{version}/`
```查看目录
../
@ -173,38 +173,38 @@ install.sh : 一键部署脚本
* 启停Master
```启动master
sh ./bin/escheduler-daemon.sh start master-server
sh ./bin/escheduler-daemon.sh stop master-server
sh ./bin/dolphinscheduler-daemon.sh start master-server
sh ./bin/dolphinscheduler-daemon.sh stop master-server
```
* 启停Worker
```
sh ./bin/escheduler-daemon.sh start worker-server
sh ./bin/escheduler-daemon.sh stop worker-server
sh ./bin/dolphinscheduler-daemon.sh start worker-server
sh ./bin/dolphinscheduler-daemon.sh stop worker-server
```
* 启停Api
```
sh ./bin/escheduler-daemon.sh start api-server
sh ./bin/escheduler-daemon.sh stop api-server
sh ./bin/dolphinscheduler-daemon.sh start api-server
sh ./bin/dolphinscheduler-daemon.sh stop api-server
```
* 启停Logger
```
sh ./bin/escheduler-daemon.sh start logger-server
sh ./bin/escheduler-daemon.sh stop logger-server
sh ./bin/dolphinscheduler-daemon.sh start logger-server
sh ./bin/dolphinscheduler-daemon.sh stop logger-server
```
* 启停Alert
```
sh ./bin/escheduler-daemon.sh start alert-server
sh ./bin/escheduler-daemon.sh stop alert-server
sh ./bin/dolphinscheduler-daemon.sh start alert-server
sh ./bin/dolphinscheduler-daemon.sh stop alert-server
```
## 3、数据库升级
数据库升级是在1.0.2版本增加的功能,执行以下命令即可自动升级数据库
```
sh ./script/upgrade-escheduler.sh
sh ./script/upgrade-dolphinscheduler.sh
```

View File

@ -1,7 +1,7 @@
# 快速上手
* 管理员用户登录
>地址192.168.xx.xx:8888 用户名密码admin/escheduler123
>地址192.168.xx.xx:8888 用户名密码admin/dolphinscheduler123
<p align="center">
<img src="https://analysys.github.io/easyscheduler_docs_cn/images/login.jpg" width="60%" />

View File

@ -323,7 +323,7 @@ conf/common/hadoop.properties
## 安全中心(权限系统)
- 安全中心是只有管理员账户才有权限的功能有队列管理、租户管理、用户管理、告警组管理、worker分组、令牌管理等功能还可以对资源、数据源、项目等授权
- 管理员登录默认用户名密码admin/escheduler123
- 管理员登录默认用户名密码admin/dolphinscheduler123
### 创建队列
- 队列是在执行spark、mapreduce等程序需要用到“队列”参数时使用的。
@ -379,7 +379,7 @@ conf/common/hadoop.properties
CloseableHttpClient httpclient = HttpClients.createDefault();
// create http post request
HttpPost httpPost = new HttpPost("http://127.0.0.1:12345/escheduler/projects/create");
HttpPost httpPost = new HttpPost("http://127.0.0.1:12345/dolphinscheduler/projects/create");
httpPost.setHeader("token", "123");
// set parameters
List<NameValuePair> parameters = new ArrayList<NameValuePair>();

View File

@ -2,11 +2,11 @@
<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>cn.analysys</groupId>
<artifactId>escheduler</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>escheduler-alert</artifactId>
<artifactId>dolphinscheduler-alert</artifactId>
<packaging>jar</packaging>
<properties>
@ -87,8 +87,8 @@
</dependency>
<dependency>
<groupId>cn.analysys</groupId>
<artifactId>escheduler-dao</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-dao</artifactId>
</dependency>
</dependencies>

View File

@ -21,7 +21,7 @@
<fileSet>
<directory>target/</directory>
<includes>
<include>escheduler-alert-${project.version}.jar</include>
<include>dolphinscheduler-alert-${project.version}.jar</include>
</includes>
<outputDirectory>lib</outputDirectory>
</fileSet>

View File

@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert;
package org.apache.dolphinscheduler.alert;
import cn.escheduler.alert.runner.AlertSender;
import cn.escheduler.alert.utils.Constants;
import cn.escheduler.common.thread.Stopper;
import cn.escheduler.dao.AlertDao;
import cn.escheduler.dao.entity.Alert;
import org.apache.dolphinscheduler.alert.runner.AlertSender;
import org.apache.dolphinscheduler.alert.utils.Constants;
import org.apache.dolphinscheduler.common.thread.Stopper;
import org.apache.dolphinscheduler.dao.AlertDao;
import org.apache.dolphinscheduler.dao.entity.Alert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -14,10 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.manager;
package org.apache.dolphinscheduler.alert.manager;
import cn.escheduler.alert.utils.MailUtils;
import cn.escheduler.common.enums.ShowType;
import org.apache.dolphinscheduler.alert.utils.MailUtils;
import org.apache.dolphinscheduler.common.enums.ShowType;
import java.util.List;
import java.util.Map;
@ -37,7 +37,7 @@ public class EmailManager {
*/
public Map<String,Object> send(List<String> receviersList,List<String> receviersCcList,String title,String content,ShowType showType){
return MailUtils.sendMails(receviersList,receviersCcList,title, content, showType);
return MailUtils.sendMails(receviersList, receviersCcList, title, content, showType);
}
/**

View File

@ -14,11 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.manager;
package org.apache.dolphinscheduler.alert.manager;
import cn.escheduler.alert.utils.Constants;
import cn.escheduler.alert.utils.EnterpriseWeChatUtils;
import cn.escheduler.dao.entity.Alert;
import org.apache.dolphinscheduler.alert.utils.Constants;
import org.apache.dolphinscheduler.alert.utils.EnterpriseWeChatUtils;
import org.apache.dolphinscheduler.dao.entity.Alert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.manager;
package org.apache.dolphinscheduler.alert.manager;
import cn.escheduler.dao.entity.Alert;
import org.apache.dolphinscheduler.dao.entity.Alert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -14,17 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.runner;
package org.apache.dolphinscheduler.alert.runner;
import cn.escheduler.alert.manager.EmailManager;
import cn.escheduler.alert.manager.EnterpriseWeChatManager;
import cn.escheduler.alert.utils.Constants;
import cn.escheduler.alert.utils.EnterpriseWeChatUtils;
import cn.escheduler.common.enums.AlertStatus;
import cn.escheduler.common.enums.AlertType;
import cn.escheduler.dao.AlertDao;
import cn.escheduler.dao.entity.Alert;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.alert.manager.EmailManager;
import org.apache.dolphinscheduler.alert.manager.EnterpriseWeChatManager;
import org.apache.dolphinscheduler.alert.utils.Constants;
import org.apache.dolphinscheduler.alert.utils.EnterpriseWeChatUtils;
import org.apache.dolphinscheduler.common.enums.AlertStatus;
import org.apache.dolphinscheduler.common.enums.AlertType;
import org.apache.dolphinscheduler.dao.AlertDao;
import org.apache.dolphinscheduler.dao.entity.Alert;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.utils;
package org.apache.dolphinscheduler.alert.utils;
/**
* constants

View File

@ -14,10 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.utils;
package org.apache.dolphinscheduler.alert.utils;
import cn.escheduler.common.enums.ShowType;
import cn.escheduler.dao.entity.Alert;
import org.apache.dolphinscheduler.common.enums.ShowType;
import org.apache.dolphinscheduler.dao.entity.Alert;
import com.alibaba.fastjson.JSON;
import com.google.common.reflect.TypeToken;
@ -36,8 +36,6 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.*;
import static cn.escheduler.alert.utils.PropertyUtils.getString;
/**
* Enterprise WeChat utils
*/
@ -45,24 +43,24 @@ public class EnterpriseWeChatUtils {
public static final Logger logger = LoggerFactory.getLogger(EnterpriseWeChatUtils.class);
private static final String enterpriseWeChatCorpId = getString(Constants.ENTERPRISE_WECHAT_CORP_ID);
private static final String enterpriseWeChatCorpId = PropertyUtils.getString(Constants.ENTERPRISE_WECHAT_CORP_ID);
private static final String enterpriseWeChatSecret = getString(Constants.ENTERPRISE_WECHAT_SECRET);
private static final String enterpriseWeChatSecret = PropertyUtils.getString(Constants.ENTERPRISE_WECHAT_SECRET);
private static final String enterpriseWeChatTokenUrl = getString(Constants.ENTERPRISE_WECHAT_TOKEN_URL);
private static final String enterpriseWeChatTokenUrl = PropertyUtils.getString(Constants.ENTERPRISE_WECHAT_TOKEN_URL);
private static String enterpriseWeChatTokenUrlReplace = enterpriseWeChatTokenUrl
.replaceAll("\\$corpId", enterpriseWeChatCorpId)
.replaceAll("\\$secret", enterpriseWeChatSecret);
private static final String enterpriseWeChatPushUrl = getString(Constants.ENTERPRISE_WECHAT_PUSH_URL);
private static final String enterpriseWeChatPushUrl = PropertyUtils.getString(Constants.ENTERPRISE_WECHAT_PUSH_URL);
private static final String enterpriseWeChatTeamSendMsg = getString(Constants.ENTERPRISE_WECHAT_TEAM_SEND_MSG);
private static final String enterpriseWeChatTeamSendMsg = PropertyUtils.getString(Constants.ENTERPRISE_WECHAT_TEAM_SEND_MSG);
private static final String enterpriseWeChatUserSendMsg = getString(Constants.ENTERPRISE_WECHAT_USER_SEND_MSG);
private static final String enterpriseWeChatUserSendMsg = PropertyUtils.getString(Constants.ENTERPRISE_WECHAT_USER_SEND_MSG);
public static final String enterpriseWeChatAgentId = getString(Constants.ENTERPRISE_WECHAT_AGENT_ID);
public static final String enterpriseWeChatAgentId = PropertyUtils.getString(Constants.ENTERPRISE_WECHAT_AGENT_ID);
public static final String enterpriseWeChatUsers = getString(Constants.ENTERPRISE_WECHAT_USERS);
public static final String enterpriseWeChatUsers = PropertyUtils.getString(Constants.ENTERPRISE_WECHAT_USERS);
/**
* get Enterprise WeChat token info

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.utils;
package org.apache.dolphinscheduler.alert.utils;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.utils;
package org.apache.dolphinscheduler.alert.utils;
public class FuncUtils {

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.utils;
package org.apache.dolphinscheduler.alert.utils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

View File

@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.utils;
package org.apache.dolphinscheduler.alert.utils;
import cn.escheduler.common.enums.ShowType;
import org.apache.dolphinscheduler.common.enums.ShowType;
import freemarker.cache.StringTemplateLoader;
import freemarker.template.Configuration;
import freemarker.template.Template;
@ -33,12 +33,9 @@ import org.springframework.util.ResourceUtils;
import javax.mail.*;
import javax.mail.internet.*;
import java.io.*;
import java.security.Security;
import java.util.*;
import static cn.escheduler.alert.utils.PropertyUtils.getBoolean;
import static cn.escheduler.alert.utils.PropertyUtils.getInt;
import static cn.escheduler.alert.utils.PropertyUtils.getString;
import static org.apache.dolphinscheduler.alert.utils.PropertyUtils.getInt;
/**
@ -48,29 +45,29 @@ public class MailUtils {
public static final Logger logger = LoggerFactory.getLogger(MailUtils.class);
public static final String mailProtocol = getString(Constants.MAIL_PROTOCOL);
public static final String mailProtocol = PropertyUtils.getString(Constants.MAIL_PROTOCOL);
public static final String mailServerHost = getString(Constants.MAIL_SERVER_HOST);
public static final String mailServerHost = PropertyUtils.getString(Constants.MAIL_SERVER_HOST);
public static final Integer mailServerPort = getInt(Constants.MAIL_SERVER_PORT);
public static final Integer mailServerPort = PropertyUtils.getInt(Constants.MAIL_SERVER_PORT);
public static final String mailSender = getString(Constants.MAIL_SENDER);
public static final String mailSender = PropertyUtils.getString(Constants.MAIL_SENDER);
public static final String mailUser = getString(Constants.MAIL_USER);
public static final String mailUser = PropertyUtils.getString(Constants.MAIL_USER);
public static final String mailPasswd = getString(Constants.MAIL_PASSWD);
public static final String mailPasswd = PropertyUtils.getString(Constants.MAIL_PASSWD);
public static final Boolean mailUseStartTLS = getBoolean(Constants.MAIL_SMTP_STARTTLS_ENABLE);
public static final Boolean mailUseStartTLS = PropertyUtils.getBoolean(Constants.MAIL_SMTP_STARTTLS_ENABLE);
public static final Boolean mailUseSSL = getBoolean(Constants.MAIL_SMTP_SSL_ENABLE);
public static final Boolean mailUseSSL = PropertyUtils.getBoolean(Constants.MAIL_SMTP_SSL_ENABLE);
public static final String xlsFilePath = getString(Constants.XLS_FILE_PATH);
public static final String xlsFilePath = PropertyUtils.getString(Constants.XLS_FILE_PATH);
public static final String starttlsEnable = getString(Constants.MAIL_SMTP_STARTTLS_ENABLE);
public static final String starttlsEnable = PropertyUtils.getString(Constants.MAIL_SMTP_STARTTLS_ENABLE);
public static final String sslEnable = getString(Constants.MAIL_SMTP_SSL_ENABLE);
public static final String sslEnable = PropertyUtils.getString(Constants.MAIL_SMTP_SSL_ENABLE);
public static final String sslTrust = getString(Constants.MAIL_SMTP_SSL_TRUST);
public static final String sslTrust = PropertyUtils.getString(Constants.MAIL_SMTP_SSL_TRUST);
private static Template MAIL_TEMPLATE;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.utils;
package org.apache.dolphinscheduler.alert.utils;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
@ -24,8 +24,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import static cn.escheduler.alert.utils.Constants.ALERT_PROPERTIES_PATH;
import static cn.escheduler.alert.utils.Constants.DATA_SOURCE_PROPERTIES_PATH;
import static org.apache.dolphinscheduler.alert.utils.Constants.ALERT_PROPERTIES_PATH;
import static org.apache.dolphinscheduler.alert.utils.Constants.DATA_SOURCE_PROPERTIES_PATH;
/**
* property utils

View File

@ -11,9 +11,9 @@
</appender>
<appender name="ALERTLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.base}/escheduler-alert.log</file>
<file>${log.base}/dolphinscheduler-alert.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.base}/escheduler-alert.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
<fileNamePattern>${log.base}/dolphinscheduler-alert.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
<maxHistory>20</maxHistory>
<maxFileSize>64MB</maxFileSize>
</rollingPolicy>

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.utils;
package org.apache.dolphinscheduler.alert.utils;
import com.alibaba.fastjson.JSON;
import org.junit.Assert;

View File

@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.alert.utils;
package org.apache.dolphinscheduler.alert.utils;
import cn.escheduler.common.enums.AlertType;
import cn.escheduler.common.enums.ShowType;
import cn.escheduler.dao.AlertDao;
import cn.escheduler.dao.DaoFactory;
import cn.escheduler.dao.entity.Alert;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.common.enums.AlertType;
import org.apache.dolphinscheduler.common.enums.ShowType;
import org.apache.dolphinscheduler.dao.AlertDao;
import org.apache.dolphinscheduler.dao.DaoFactory;
import org.apache.dolphinscheduler.dao.entity.Alert;
import org.apache.dolphinscheduler.dao.entity.User;
import freemarker.cache.StringTemplateLoader;
import freemarker.template.Configuration;
import freemarker.template.Template;

View File

@ -1,21 +1,21 @@
<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>cn.analysys</groupId>
<artifactId>escheduler</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>escheduler-api</artifactId>
<artifactId>dolphinscheduler-api</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>cn.analysys</groupId>
<artifactId>escheduler-alert</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-alert</artifactId>
</dependency>
<dependency>
<groupId>cn.analysys</groupId>
<artifactId>escheduler-server</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-server</artifactId>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
@ -173,8 +173,8 @@
</dependency>
<dependency>
<groupId>cn.analysys</groupId>
<artifactId>escheduler-rpc</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-rpc</artifactId>
</dependency>
<dependency>

View File

@ -18,7 +18,7 @@
<outputDirectory>conf</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.parent.basedir}/escheduler-common/src/main/resources</directory>
<directory>${project.parent.basedir}/dolphinscheduler-common/src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
@ -27,7 +27,7 @@
<outputDirectory>conf</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.parent.basedir}/escheduler-common/src/main/resources/bin</directory>
<directory>${project.parent.basedir}/dolphinscheduler-common/src/main/resources/bin</directory>
<includes>
<include>*.*</include>
</includes>
@ -35,7 +35,7 @@
<outputDirectory>bin</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.parent.basedir}/escheduler-dao/src/main/resources</directory>
<directory>${project.parent.basedir}/dolphinscheduler-dao/src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
@ -44,7 +44,7 @@
<outputDirectory>conf</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.parent.basedir}/escheduler-api/src/main/resources</directory>
<directory>${project.parent.basedir}/dolphinscheduler-api/src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
@ -55,7 +55,7 @@
<fileSet>
<directory>target/</directory>
<includes>
<include>escheduler-api-${project.version}.jar</include>
<include>dolphinscheduler-api-${project.version}.jar</include>
</includes>
<outputDirectory>lib</outputDirectory>
</fileSet>

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api;
package org.apache.dolphinscheduler.api;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -14,14 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api;
package org.apache.dolphinscheduler.api;
import cn.escheduler.alert.AlertServer;
import cn.escheduler.dao.AlertDao;
import cn.escheduler.dao.ProcessDao;
import cn.escheduler.server.master.MasterServer;
import cn.escheduler.server.rpc.LoggerServer;
import cn.escheduler.server.worker.WorkerServer;
import org.apache.dolphinscheduler.alert.AlertServer;
import org.apache.dolphinscheduler.dao.AlertDao;
import org.apache.dolphinscheduler.dao.ProcessDao;
import org.apache.dolphinscheduler.server.master.MasterServer;
import org.apache.dolphinscheduler.server.rpc.LoggerServer;
import org.apache.dolphinscheduler.server.worker.WorkerServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

View File

@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.configuration;
package org.apache.dolphinscheduler.api.configuration;
import cn.escheduler.api.interceptor.LoginHandlerInterceptor;
import org.apache.dolphinscheduler.api.interceptor.LoginHandlerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.configuration;
package org.apache.dolphinscheduler.api.configuration;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.configuration;
package org.apache.dolphinscheduler.api.configuration;
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
import org.springframework.context.annotation.Bean;

View File

@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.AccessTokenService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.AccessTokenService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -36,9 +36,7 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
import static org.apache.dolphinscheduler.api.enums.Status.*;
/**
* access token controller
*/

View File

@ -14,18 +14,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.service.AlertGroupService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.AlertType;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.service.AlertGroupService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.AlertType;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -36,8 +37,6 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.HashMap;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
/**
* alert group controller
*/
@ -78,8 +77,8 @@ public class AlertGroupController extends BaseController{
Map<String, Object> result = alertGroupService.createAlertgroup(loginUser, groupName, groupType,desc);
return returnDataList(result);
}catch (Exception e){
logger.error(CREATE_ALERT_GROUP_ERROR.getMsg(),e);
return error(CREATE_ALERT_GROUP_ERROR.getCode(),CREATE_ALERT_GROUP_ERROR.getMsg());
logger.error(Status.CREATE_ALERT_GROUP_ERROR.getMsg(),e);
return error(Status.CREATE_ALERT_GROUP_ERROR.getCode(), Status.CREATE_ALERT_GROUP_ERROR.getMsg());
}
}
@ -98,8 +97,8 @@ public class AlertGroupController extends BaseController{
HashMap<String, Object> result = alertGroupService.queryAlertgroup();
return returnDataList(result);
}catch (Exception e){
logger.error(QUERY_ALL_ALERTGROUP_ERROR.getMsg(),e);
return error(QUERY_ALL_ALERTGROUP_ERROR.getCode(),QUERY_ALL_ALERTGROUP_ERROR.getMsg());
logger.error(Status.QUERY_ALL_ALERTGROUP_ERROR.getMsg(),e);
return error(Status.QUERY_ALL_ALERTGROUP_ERROR.getCode(), Status.QUERY_ALL_ALERTGROUP_ERROR.getMsg());
}
}
@ -128,7 +127,7 @@ public class AlertGroupController extends BaseController{
loginUser.getUserName(),pageNo,searchVal,pageSize);
try{
Map<String, Object> result = checkPageParams(pageNo, pageSize);
if(result.get(Constants.STATUS) != SUCCESS){
if(result.get(Constants.STATUS) != Status.SUCCESS){
return returnDataListPaging(result);
}
@ -136,8 +135,8 @@ public class AlertGroupController extends BaseController{
result = alertGroupService.listPaging(loginUser, searchVal, pageNo, pageSize);
return returnDataListPaging(result);
}catch (Exception e){
logger.error(LIST_PAGING_ALERT_GROUP_ERROR.getMsg(),e);
return error(LIST_PAGING_ALERT_GROUP_ERROR.getCode(),LIST_PAGING_ALERT_GROUP_ERROR.getMsg());
logger.error(Status.LIST_PAGING_ALERT_GROUP_ERROR.getMsg(),e);
return error(Status.LIST_PAGING_ALERT_GROUP_ERROR.getCode(), Status.LIST_PAGING_ALERT_GROUP_ERROR.getMsg());
}
}
@ -171,8 +170,8 @@ public class AlertGroupController extends BaseController{
return returnDataList(result);
}catch (Exception e){
logger.error(UPDATE_ALERT_GROUP_ERROR.getMsg(),e);
return error(UPDATE_ALERT_GROUP_ERROR.getCode(),UPDATE_ALERT_GROUP_ERROR.getMsg());
logger.error(Status.UPDATE_ALERT_GROUP_ERROR.getMsg(),e);
return error(Status.UPDATE_ALERT_GROUP_ERROR.getCode(), Status.UPDATE_ALERT_GROUP_ERROR.getMsg());
}
}
@ -196,8 +195,8 @@ public class AlertGroupController extends BaseController{
return returnDataList(result);
}catch (Exception e){
logger.error(DELETE_ALERT_GROUP_ERROR.getMsg(),e);
return error(DELETE_ALERT_GROUP_ERROR.getCode(),DELETE_ALERT_GROUP_ERROR.getMsg());
logger.error(Status.DELETE_ALERT_GROUP_ERROR.getMsg(),e);
return error(Status.DELETE_ALERT_GROUP_ERROR.getCode(), Status.DELETE_ALERT_GROUP_ERROR.getMsg());
}
}
@ -246,8 +245,8 @@ public class AlertGroupController extends BaseController{
return returnDataList(result);
}catch (Exception e){
logger.error(ALERT_GROUP_GRANT_USER_ERROR.getMsg(),e);
return error(ALERT_GROUP_GRANT_USER_ERROR.getCode(),ALERT_GROUP_GRANT_USER_ERROR.getMsg());
logger.error(Status.ALERT_GROUP_GRANT_USER_ERROR.getMsg(),e);
return error(Status.ALERT_GROUP_GRANT_USER_ERROR.getCode(), Status.ALERT_GROUP_GRANT_USER_ERROR.getMsg());
}
}
}

View File

@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.api.utils.Result;
import cn.escheduler.dao.entity.Resource;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.Resource;
import org.apache.commons.lang3.StringUtils;
import javax.servlet.http.HttpServletRequest;
@ -28,7 +28,7 @@ import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
import static cn.escheduler.common.Constants.*;
import static org.apache.dolphinscheduler.common.Constants.*;
/**
* base controller

View File

@ -14,17 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.service.DataAnalysisService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.service.DataAnalysisService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -34,8 +35,6 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
/**
* data analysis controller
*/
@ -76,8 +75,8 @@ public class DataAnalysisController extends BaseController{
Map<String, Object> result = dataAnalysisService.countTaskStateByProject(loginUser,projectId, startDate, endDate);
return returnDataList(result);
}catch (Exception e){
logger.error(TASK_INSTANCE_STATE_COUNT_ERROR.getMsg(),e);
return error(TASK_INSTANCE_STATE_COUNT_ERROR.getCode(), TASK_INSTANCE_STATE_COUNT_ERROR.getMsg());
logger.error(Status.TASK_INSTANCE_STATE_COUNT_ERROR.getMsg(),e);
return error(Status.TASK_INSTANCE_STATE_COUNT_ERROR.getCode(), Status.TASK_INSTANCE_STATE_COUNT_ERROR.getMsg());
}
}
@ -106,8 +105,8 @@ public class DataAnalysisController extends BaseController{
Map<String, Object> result = dataAnalysisService.countProcessInstanceStateByProject(loginUser, projectId, startDate, endDate);
return returnDataList(result);
}catch (Exception e){
logger.error(COUNT_PROCESS_INSTANCE_STATE_ERROR.getMsg(),e);
return error(COUNT_PROCESS_INSTANCE_STATE_ERROR.getCode(), COUNT_PROCESS_INSTANCE_STATE_ERROR.getMsg());
logger.error(Status.COUNT_PROCESS_INSTANCE_STATE_ERROR.getMsg(),e);
return error(Status.COUNT_PROCESS_INSTANCE_STATE_ERROR.getCode(), Status.COUNT_PROCESS_INSTANCE_STATE_ERROR.getMsg());
}
}
@ -132,8 +131,8 @@ public class DataAnalysisController extends BaseController{
Map<String, Object> result = dataAnalysisService.countDefinitionByUser(loginUser, projectId);
return returnDataList(result);
}catch (Exception e){
logger.error(COUNT_PROCESS_DEFINITION_USER_ERROR.getMsg(),e);
return error(COUNT_PROCESS_DEFINITION_USER_ERROR.getCode(), COUNT_PROCESS_DEFINITION_USER_ERROR.getMsg());
logger.error(Status.COUNT_PROCESS_DEFINITION_USER_ERROR.getMsg(),e);
return error(Status.COUNT_PROCESS_DEFINITION_USER_ERROR.getCode(), Status.COUNT_PROCESS_DEFINITION_USER_ERROR.getMsg());
}
}
@ -163,8 +162,8 @@ public class DataAnalysisController extends BaseController{
Map<String, Object> result = dataAnalysisService.countCommandState(loginUser, projectId, startDate, endDate);
return returnDataList(result);
}catch (Exception e){
logger.error(COMMAND_STATE_COUNT_ERROR.getMsg(),e);
return error(COMMAND_STATE_COUNT_ERROR.getCode(), COMMAND_STATE_COUNT_ERROR.getMsg());
logger.error(Status.COMMAND_STATE_COUNT_ERROR.getMsg(),e);
return error(Status.COMMAND_STATE_COUNT_ERROR.getCode(), Status.COMMAND_STATE_COUNT_ERROR.getMsg());
}
}
@ -191,8 +190,8 @@ public class DataAnalysisController extends BaseController{
Map<String, Object> result = dataAnalysisService.countQueueState(loginUser, projectId);
return returnDataList(result);
}catch (Exception e){
logger.error(QUEUE_COUNT_ERROR.getMsg(),e);
return error(QUEUE_COUNT_ERROR.getCode(), QUEUE_COUNT_ERROR.getMsg());
logger.error(Status.QUEUE_COUNT_ERROR.getMsg(),e);
return error(Status.QUEUE_COUNT_ERROR.getCode(), Status.QUEUE_COUNT_ERROR.getMsg());
}
}

View File

@ -14,16 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.DataSourceService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.DbType;
import cn.escheduler.common.utils.CommonUtils;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.DataSourceService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.DbType;
import org.apache.dolphinscheduler.common.utils.CommonUtils;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -37,9 +37,7 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
import static org.apache.dolphinscheduler.api.enums.Status.*;
/**
* data source controller
*/

View File

@ -14,17 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.ExecuteType;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.ExecutorService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.*;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.ExecuteType;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.ExecutorService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.*;
import org.apache.dolphinscheduler.common.enums.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -34,8 +34,6 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
/**
* execute process controller
@ -97,7 +95,7 @@ public class ExecutorController extends BaseController {
workerGroupId, timeout);
if (timeout == null) {
timeout = cn.escheduler.common.Constants.MAX_TASK_TIMEOUT;
timeout = org.apache.dolphinscheduler.common.Constants.MAX_TASK_TIMEOUT;
}
Map<String, Object> result = execService.execProcessInstance(loginUser, projectName, processDefinitionId, scheduleTime, execType, failureStrategy,
@ -105,7 +103,7 @@ public class ExecutorController extends BaseController {
warningGroupId,receivers,receiversCc, runMode,processInstancePriority, workerGroupId, timeout);
return returnDataList(result);
} catch (Exception e) {
logger.error(START_PROCESS_INSTANCE_ERROR.getMsg(),e);
logger.error(Status.START_PROCESS_INSTANCE_ERROR.getMsg(),e);
return error(Status.START_PROCESS_INSTANCE_ERROR.getCode(), Status.START_PROCESS_INSTANCE_ERROR.getMsg());
}
}
@ -137,8 +135,8 @@ public class ExecutorController extends BaseController {
Map<String, Object> result = execService.execute(loginUser, projectName, processInstanceId, executeType);
return returnDataList(result);
} catch (Exception e) {
logger.error(EXECUTE_PROCESS_INSTANCE_ERROR.getMsg(),e);
return error(EXECUTE_PROCESS_INSTANCE_ERROR.getCode(), EXECUTE_PROCESS_INSTANCE_ERROR.getMsg());
logger.error(Status.EXECUTE_PROCESS_INSTANCE_ERROR.getMsg(),e);
return error(Status.EXECUTE_PROCESS_INSTANCE_ERROR.getCode(), Status.EXECUTE_PROCESS_INSTANCE_ERROR.getMsg());
}
}
@ -163,8 +161,8 @@ public class ExecutorController extends BaseController {
return returnDataList(result);
} catch (Exception e) {
logger.error(CHECK_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(CHECK_PROCESS_DEFINITION_ERROR.getCode(), CHECK_PROCESS_DEFINITION_ERROR.getMsg());
logger.error(Status.CHECK_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(Status.CHECK_PROCESS_DEFINITION_ERROR.getCode(), Status.CHECK_PROCESS_DEFINITION_ERROR.getMsg());
}
}
@ -192,8 +190,8 @@ public class ExecutorController extends BaseController {
Map<String, Object> result = execService.getReceiverCc(processDefinitionId,processInstanceId);
return returnDataList(result);
} catch (Exception e) {
logger.error(QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR.getCode(), QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR.getMsg());
logger.error(Status.QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(Status.QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR.getCode(), Status.QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR.getMsg());
}
}

View File

@ -14,17 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.service.LoggerService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.service.LoggerService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -34,9 +35,6 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import static cn.escheduler.api.enums.Status.DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR;
import static cn.escheduler.api.enums.Status.QUERY_TASK_INSTANCE_LOG_ERROR;
/**
* log controller
@ -73,8 +71,8 @@ public class LoggerController extends BaseController {
"login user {}, view {} task instance log ,skipLineNum {} , limit {}", loginUser.getUserName(), taskInstanceId, skipNum, limit);
return loggerService.queryLog(taskInstanceId, skipNum, limit);
} catch (Exception e) {
logger.error(QUERY_TASK_INSTANCE_LOG_ERROR.getMsg(), e);
return error(QUERY_TASK_INSTANCE_LOG_ERROR.getCode(), QUERY_TASK_INSTANCE_LOG_ERROR.getMsg());
logger.error(Status.QUERY_TASK_INSTANCE_LOG_ERROR.getMsg(), e);
return error(Status.QUERY_TASK_INSTANCE_LOG_ERROR.getCode(), Status.QUERY_TASK_INSTANCE_LOG_ERROR.getMsg());
}
}
@ -100,8 +98,8 @@ public class LoggerController extends BaseController {
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + System.currentTimeMillis() + ".queryLog" + "\"")
.body(logBytes);
} catch (Exception e) {
logger.error(DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR.getMsg(), e);
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR.getMsg());
logger.error(Status.DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR.getMsg(), e);
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(Status.DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR.getMsg());
}
}

View File

@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.SessionService;
import cn.escheduler.api.service.UsersService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.SessionService;
import org.apache.dolphinscheduler.api.service.UsersService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.*;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.lang3.StringUtils;
@ -36,7 +36,7 @@ import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import static cn.escheduler.api.enums.Status.*;
import static org.apache.dolphinscheduler.api.enums.Status.*;
/**
* user login controller

View File

@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.service.MonitorService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.service.MonitorService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
@ -32,9 +32,7 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
import static org.apache.dolphinscheduler.api.enums.Status.*;
/**
* monitor controller
*/

View File

@ -14,14 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.ProcessDefinitionService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.ProcessDefinitionService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -33,9 +33,6 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
import static cn.escheduler.api.enums.Status.EXPORT_PROCESS_DEFINE_BY_ID_ERROR;
/**
* process definition controller
@ -86,8 +83,8 @@ public class ProcessDefinitionController extends BaseController{
desc, locations, connects);
return returnDataList(result);
} catch (Exception e) {
logger.error(CREATE_PROCESS_DEFINITION.getMsg(), e);
return error(CREATE_PROCESS_DEFINITION.getCode(), CREATE_PROCESS_DEFINITION.getMsg());
logger.error(Status.CREATE_PROCESS_DEFINITION.getMsg(), e);
return error(Status.CREATE_PROCESS_DEFINITION.getCode(), Status.CREATE_PROCESS_DEFINITION.getMsg());
}
}
@ -114,8 +111,8 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.verifyProccessDefinitionName(loginUser, projectName, name);
return returnDataList(result);
}catch (Exception e){
logger.error(VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR.getMsg(),e);
return error(VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR.getCode(), Status.VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR.getMsg());
logger.error(Status.VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR.getMsg(),e);
return error(Status.VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR.getCode(), Status.VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR.getMsg());
}
}
@ -158,8 +155,8 @@ public class ProcessDefinitionController extends BaseController{
processDefinitionJson, desc, locations, connects);
return returnDataList(result);
}catch (Exception e){
logger.error(UPDATE_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(UPDATE_PROCESS_DEFINITION_ERROR.getCode(), Status.UPDATE_PROCESS_DEFINITION_ERROR.getMsg());
logger.error(Status.UPDATE_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(Status.UPDATE_PROCESS_DEFINITION_ERROR.getCode(), Status.UPDATE_PROCESS_DEFINITION_ERROR.getMsg());
}
}
@ -191,8 +188,8 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.releaseProcessDefinition(loginUser, projectName, processId, releaseState);
return returnDataList(result);
}catch (Exception e){
logger.error(RELEASE_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(RELEASE_PROCESS_DEFINITION_ERROR.getCode(), Status.RELEASE_PROCESS_DEFINITION_ERROR.getMsg());
logger.error(Status.RELEASE_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(Status.RELEASE_PROCESS_DEFINITION_ERROR.getCode(), Status.RELEASE_PROCESS_DEFINITION_ERROR.getMsg());
}
}
@ -221,8 +218,8 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.queryProccessDefinitionById(loginUser, projectName, processId);
return returnDataList(result);
}catch (Exception e){
logger.error(QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR.getCode(), Status.QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR.getMsg());
logger.error(Status.QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR.getMsg(),e);
return error(Status.QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR.getCode(), Status.QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR.getMsg());
}
}
@ -246,8 +243,8 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.queryProccessDefinitionList(loginUser, projectName);
return returnDataList(result);
}catch (Exception e){
logger.error(QUERY_PROCCESS_DEFINITION_LIST.getMsg(),e);
return error(QUERY_PROCCESS_DEFINITION_LIST.getCode(), QUERY_PROCCESS_DEFINITION_LIST.getMsg());
logger.error(Status.QUERY_PROCCESS_DEFINITION_LIST.getMsg(),e);
return error(Status.QUERY_PROCCESS_DEFINITION_LIST.getCode(), Status.QUERY_PROCCESS_DEFINITION_LIST.getMsg());
}
}
@ -284,8 +281,8 @@ public class ProcessDefinitionController extends BaseController{
result = processDefinitionService.queryProcessDefinitionListPaging(loginUser, projectName, searchVal, pageNo, pageSize, userId);
return returnDataListPaging(result);
}catch (Exception e){
logger.error(QUERY_PROCCESS_DEFINITION_LIST_PAGING_ERROR.getMsg(),e);
return error(QUERY_PROCCESS_DEFINITION_LIST_PAGING_ERROR.getCode(), QUERY_PROCCESS_DEFINITION_LIST_PAGING_ERROR.getMsg());
logger.error(Status.QUERY_PROCCESS_DEFINITION_LIST_PAGING_ERROR.getMsg(),e);
return error(Status.QUERY_PROCCESS_DEFINITION_LIST_PAGING_ERROR.getCode(), Status.QUERY_PROCCESS_DEFINITION_LIST_PAGING_ERROR.getMsg());
}
}
@ -313,8 +310,8 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.viewTree(id, limit);
return returnDataList(result);
}catch (Exception e){
logger.error(ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR.getMsg(),e);
return error(ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR.getCode(),ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR.getMsg());
logger.error(Status.ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR.getMsg(),e);
return error(Status.ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR.getCode(), Status.ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR.getMsg());
}
}
@ -345,8 +342,8 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.getTaskNodeListByDefinitionId(processDefinitionId);
return returnDataList(result);
}catch (Exception e){
logger.error(GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getMsg(), e);
return error(GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getCode(), GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getMsg());
logger.error(Status.GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getMsg(), e);
return error(Status.GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getCode(), Status.GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getMsg());
}
}
@ -377,8 +374,8 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.getTaskNodeListByDefinitionIdList(processDefinitionIdList);
return returnDataList(result);
}catch (Exception e){
logger.error(GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getMsg(), e);
return error(GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getCode(), GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getMsg());
logger.error(Status.GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getMsg(), e);
return error(Status.GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getCode(), Status.GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR.getMsg());
}
}
@ -406,7 +403,7 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.deleteProcessDefinitionById(loginUser, projectName, processDefinitionId);
return returnDataList(result);
}catch (Exception e){
logger.error(DELETE_PROCESS_DEFINE_BY_ID_ERROR.getMsg(),e);
logger.error(Status.DELETE_PROCESS_DEFINE_BY_ID_ERROR.getMsg(),e);
return error(Status.DELETE_PROCESS_DEFINE_BY_ID_ERROR.getCode(), Status.DELETE_PROCESS_DEFINE_BY_ID_ERROR.getMsg());
}
}
@ -435,7 +432,7 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.batchDeleteProcessDefinitionByIds(loginUser, projectName, processDefinitionIds);
return returnDataList(result);
}catch (Exception e){
logger.error(BATCH_DELETE_PROCESS_DEFINE_BY_IDS_ERROR.getMsg(),e);
logger.error(Status.BATCH_DELETE_PROCESS_DEFINE_BY_IDS_ERROR.getMsg(),e);
return error(Status.BATCH_DELETE_PROCESS_DEFINE_BY_IDS_ERROR.getCode(), Status.BATCH_DELETE_PROCESS_DEFINE_BY_IDS_ERROR.getMsg());
}
}
@ -463,7 +460,7 @@ public class ProcessDefinitionController extends BaseController{
loginUser.getUserName(), projectName, processDefinitionId);
processDefinitionService.exportProcessDefinitionById(loginUser, projectName, processDefinitionId,response);
}catch (Exception e){
logger.error(EXPORT_PROCESS_DEFINE_BY_ID_ERROR.getMsg(),e);
logger.error(Status.EXPORT_PROCESS_DEFINE_BY_ID_ERROR.getMsg(),e);
}
}
@ -486,8 +483,8 @@ public class ProcessDefinitionController extends BaseController{
Map<String, Object> result = processDefinitionService.queryProccessDefinitionAllByProjectId(projectId);
return returnDataList(result);
}catch (Exception e){
logger.error(QUERY_PROCCESS_DEFINITION_LIST.getMsg(),e);
return error(QUERY_PROCCESS_DEFINITION_LIST.getCode(), QUERY_PROCCESS_DEFINITION_LIST.getMsg());
logger.error(Status.QUERY_PROCCESS_DEFINITION_LIST.getMsg(),e);
return error(Status.QUERY_PROCCESS_DEFINITION_LIST.getCode(), Status.QUERY_PROCCESS_DEFINITION_LIST.getMsg());
}
}

View File

@ -14,18 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.ProcessInstanceService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.ExecutionStatus;
import cn.escheduler.common.enums.Flag;
import cn.escheduler.common.queue.ITaskQueue;
import cn.escheduler.common.queue.TaskQueueFactory;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.ProcessInstanceService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.queue.ITaskQueue;
import org.apache.dolphinscheduler.common.queue.TaskQueueFactory;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -36,7 +36,7 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
import static org.apache.dolphinscheduler.api.enums.Status.*;
/**
* process instance controller

View File

@ -14,16 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.ProcessDefinitionService;
import cn.escheduler.api.service.ProjectService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.ProcessDefinitionService;
import org.apache.dolphinscheduler.api.service.ProjectService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -38,7 +38,7 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
import static org.apache.dolphinscheduler.api.enums.Status.*;
/**
* project controller

View File

@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.QueueService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.QueueService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -36,8 +36,6 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
/**
* queue controller
@ -67,8 +65,8 @@ public class QueueController extends BaseController{
Map<String, Object> result = queueService.queryList(loginUser);
return returnDataList(result);
}catch (Exception e){
logger.error(QUERY_QUEUE_LIST_ERROR.getMsg(),e);
return error(QUERY_QUEUE_LIST_ERROR.getCode(), QUERY_QUEUE_LIST_ERROR.getMsg());
logger.error(Status.QUERY_QUEUE_LIST_ERROR.getMsg(),e);
return error(Status.QUERY_QUEUE_LIST_ERROR.getCode(), Status.QUERY_QUEUE_LIST_ERROR.getMsg());
}
}
@ -100,8 +98,8 @@ public class QueueController extends BaseController{
result = queueService.queryList(loginUser,searchVal,pageNo,pageSize);
return returnDataListPaging(result);
}catch (Exception e){
logger.error(QUERY_QUEUE_LIST_ERROR.getMsg(),e);
return error(QUERY_QUEUE_LIST_ERROR.getCode(), QUERY_QUEUE_LIST_ERROR.getMsg());
logger.error(Status.QUERY_QUEUE_LIST_ERROR.getMsg(),e);
return error(Status.QUERY_QUEUE_LIST_ERROR.getCode(), Status.QUERY_QUEUE_LIST_ERROR.getMsg());
}
}
@ -130,8 +128,8 @@ public class QueueController extends BaseController{
return returnDataList(result);
}catch (Exception e){
logger.error(CREATE_QUEUE_ERROR.getMsg(),e);
return error(CREATE_QUEUE_ERROR.getCode(), CREATE_QUEUE_ERROR.getMsg());
logger.error(Status.CREATE_QUEUE_ERROR.getMsg(),e);
return error(Status.CREATE_QUEUE_ERROR.getCode(), Status.CREATE_QUEUE_ERROR.getMsg());
}
}
@ -162,8 +160,8 @@ public class QueueController extends BaseController{
return returnDataList(result);
}catch (Exception e){
logger.error(UPDATE_QUEUE_ERROR.getMsg(),e);
return error(UPDATE_QUEUE_ERROR.getCode(), UPDATE_QUEUE_ERROR.getMsg());
logger.error(Status.UPDATE_QUEUE_ERROR.getMsg(),e);
return error(Status.UPDATE_QUEUE_ERROR.getCode(), Status.UPDATE_QUEUE_ERROR.getMsg());
}
}
@ -193,7 +191,7 @@ public class QueueController extends BaseController{
loginUser.getUserName(),queue,queueName);
return queueService.verifyQueue(queue,queueName);
}catch (Exception e){
logger.error(VERIFY_QUEUE_ERROR.getMsg(),e);
logger.error(Status.VERIFY_QUEUE_ERROR.getMsg(),e);
return error(Status.VERIFY_QUEUE_ERROR.getCode(), Status.VERIFY_QUEUE_ERROR.getMsg());
}
}

View File

@ -14,17 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.ResourcesService;
import cn.escheduler.api.service.UdfFuncService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.ResourceType;
import cn.escheduler.common.enums.UdfType;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.ResourcesService;
import org.apache.dolphinscheduler.api.service.UdfFuncService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.ResourceType;
import org.apache.dolphinscheduler.common.enums.UdfType;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -43,8 +43,7 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
import static org.apache.dolphinscheduler.api.enums.Status.*;
/**
* resources controller
*/

View File

@ -14,18 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.SchedulerService;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.FailureStrategy;
import cn.escheduler.common.enums.Priority;
import cn.escheduler.common.enums.ReleaseState;
import cn.escheduler.common.enums.WarningType;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.SchedulerService;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.FailureStrategy;
import org.apache.dolphinscheduler.common.enums.Priority;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -36,8 +36,8 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
import static cn.escheduler.api.utils.Constants.SESSION_USER;
import static org.apache.dolphinscheduler.api.utils.Constants.SESSION_USER;
import static org.apache.dolphinscheduler.api.enums.Status.*;
/**
* schedule controller

View File

@ -14,16 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.service.TaskInstanceService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.ExecutionStatus;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.service.TaskInstanceService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.*;
import org.apache.dolphinscheduler.api.enums.Status;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -33,8 +34,6 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.QUERY_TASK_LIST_PAGING_ERROR;
/**
* task instance controller
*/
@ -89,8 +88,8 @@ public class TaskInstanceController extends BaseController{
loginUser, projectName, processInstanceId, taskName, startTime, endTime, searchVal, stateType, host, pageNo, pageSize);
return returnDataListPaging(result);
}catch (Exception e){
logger.error(QUERY_TASK_LIST_PAGING_ERROR.getMsg(),e);
return error(QUERY_TASK_LIST_PAGING_ERROR.getCode(), QUERY_TASK_LIST_PAGING_ERROR.getMsg());
logger.error(Status.QUERY_TASK_LIST_PAGING_ERROR.getMsg(),e);
return error(Status.QUERY_TASK_LIST_PAGING_ERROR.getCode(), Status.QUERY_TASK_LIST_PAGING_ERROR.getMsg());
}
}

View File

@ -14,13 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.service.TaskRecordService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.service.TaskRecordService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -30,8 +31,6 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.QUERY_TASK_RECORD_LIST_PAGING_ERROR;
/**
* data quality controller
*/
@ -73,8 +72,8 @@ public class TaskRecordController extends BaseController{
Map<String, Object> result = taskRecordService.queryTaskRecordListPaging(false, taskName, startTime, taskDate, sourceTable, destTable, endTime,state, pageNo, pageSize);
return returnDataListPaging(result);
}catch (Exception e){
logger.error(QUERY_TASK_RECORD_LIST_PAGING_ERROR.getMsg(),e);
return error(QUERY_TASK_RECORD_LIST_PAGING_ERROR.getCode(), QUERY_TASK_RECORD_LIST_PAGING_ERROR.getMsg());
logger.error(Status.QUERY_TASK_RECORD_LIST_PAGING_ERROR.getMsg(),e);
return error(Status.QUERY_TASK_RECORD_LIST_PAGING_ERROR.getCode(), Status.QUERY_TASK_RECORD_LIST_PAGING_ERROR.getMsg());
}
}
@ -105,8 +104,8 @@ public class TaskRecordController extends BaseController{
Map<String, Object> result = taskRecordService.queryTaskRecordListPaging(true, taskName, startTime, taskDate, sourceTable, destTable, endTime,state, pageNo, pageSize);
return returnDataListPaging(result);
}catch (Exception e){
logger.error(QUERY_TASK_RECORD_LIST_PAGING_ERROR.getMsg(),e);
return error(QUERY_TASK_RECORD_LIST_PAGING_ERROR.getCode(), QUERY_TASK_RECORD_LIST_PAGING_ERROR.getMsg());
logger.error(Status.QUERY_TASK_RECORD_LIST_PAGING_ERROR.getMsg(),e);
return error(Status.QUERY_TASK_RECORD_LIST_PAGING_ERROR.getCode(), Status.QUERY_TASK_RECORD_LIST_PAGING_ERROR.getMsg());
}
}

View File

@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.TenantService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.TenantService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -36,8 +36,6 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
/**
* tenant controller
@ -85,8 +83,8 @@ public class TenantController extends BaseController{
return returnDataList(result);
}catch (Exception e){
logger.error(CREATE_TENANT_ERROR.getMsg(),e);
return error(CREATE_TENANT_ERROR.getCode(), CREATE_TENANT_ERROR.getMsg());
logger.error(Status.CREATE_TENANT_ERROR.getMsg(),e);
return error(Status.CREATE_TENANT_ERROR.getCode(), Status.CREATE_TENANT_ERROR.getMsg());
}
}
@ -123,7 +121,7 @@ public class TenantController extends BaseController{
result = tenantService.queryTenantList(loginUser, searchVal, pageNo, pageSize);
return returnDataListPaging(result);
}catch (Exception e){
logger.error(QUERY_TENANT_LIST_PAGING_ERROR.getMsg(),e);
logger.error(Status.QUERY_TENANT_LIST_PAGING_ERROR.getMsg(),e);
return error(Status.QUERY_TENANT_LIST_PAGING_ERROR.getCode(), Status.QUERY_TENANT_LIST_PAGING_ERROR.getMsg());
}
}
@ -144,7 +142,7 @@ public class TenantController extends BaseController{
Map<String, Object> result = tenantService.queryTenantList(loginUser);
return returnDataList(result);
}catch (Exception e){
logger.error(QUERY_TENANT_LIST_ERROR.getMsg(),e);
logger.error(Status.QUERY_TENANT_LIST_ERROR.getMsg(),e);
return error(Status.QUERY_TENANT_LIST_ERROR.getCode(), Status.QUERY_TENANT_LIST_ERROR.getMsg());
}
}
@ -184,8 +182,8 @@ public class TenantController extends BaseController{
Map<String, Object> result = tenantService.updateTenant(loginUser,id,tenantCode, tenantName, queueId, desc);
return returnDataList(result);
}catch (Exception e){
logger.error(UPDATE_TENANT_ERROR.getMsg(),e);
return error(Status.UPDATE_TENANT_ERROR.getCode(),UPDATE_TENANT_ERROR.getMsg());
logger.error(Status.UPDATE_TENANT_ERROR.getMsg(),e);
return error(Status.UPDATE_TENANT_ERROR.getCode(), Status.UPDATE_TENANT_ERROR.getMsg());
}
}
@ -210,7 +208,7 @@ public class TenantController extends BaseController{
Map<String, Object> result = tenantService.deleteTenantById(loginUser,id);
return returnDataList(result);
}catch (Exception e){
logger.error(DELETE_TENANT_BY_ID_ERROR.getMsg(),e);
logger.error(Status.DELETE_TENANT_BY_ID_ERROR.getMsg(),e);
return error(Status.DELETE_TENANT_BY_ID_ERROR.getCode(), Status.DELETE_TENANT_BY_ID_ERROR.getMsg());
}
}
@ -238,7 +236,7 @@ public class TenantController extends BaseController{
loginUser.getUserName(),tenantCode);
return tenantService.verifyTenantCode(tenantCode);
}catch (Exception e){
logger.error(VERIFY_TENANT_CODE_ERROR.getMsg(),e);
logger.error(Status.VERIFY_TENANT_CODE_ERROR.getMsg(),e);
return error(Status.VERIFY_TENANT_CODE_ERROR.getCode(), Status.VERIFY_TENANT_CODE_ERROR.getMsg());
}
}

View File

@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.UsersService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.UsersService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -36,8 +36,6 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.enums.Status.*;
/**
* user controller
@ -88,8 +86,8 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.createUser(loginUser, userName, userPassword,email,tenantId, phone,queue);
return returnDataList(result);
}catch (Exception e){
logger.error(CREATE_USER_ERROR.getMsg(),e);
return error(CREATE_USER_ERROR.getCode(), CREATE_USER_ERROR.getMsg());
logger.error(Status.CREATE_USER_ERROR.getMsg(),e);
return error(Status.CREATE_USER_ERROR.getCode(), Status.CREATE_USER_ERROR.getMsg());
}
}
@ -125,7 +123,7 @@ public class UsersController extends BaseController{
result = usersService.queryUserList(loginUser, searchVal, pageNo, pageSize);
return returnDataListPaging(result);
}catch (Exception e){
logger.error(QUERY_USER_LIST_PAGING_ERROR.getMsg(),e);
logger.error(Status.QUERY_USER_LIST_PAGING_ERROR.getMsg(),e);
return error(Status.QUERY_USER_LIST_PAGING_ERROR.getCode(), Status.QUERY_USER_LIST_PAGING_ERROR.getMsg());
}
}
@ -169,7 +167,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.updateUser(id, userName, userPassword, email, tenantId, phone, queue);
return returnDataList(result);
}catch (Exception e){
logger.error(UPDATE_USER_ERROR.getMsg(),e);
logger.error(Status.UPDATE_USER_ERROR.getMsg(),e);
return error(Status.UPDATE_USER_ERROR.getCode(), Status.UPDATE_USER_ERROR.getMsg());
}
}
@ -193,7 +191,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.deleteUserById(loginUser, id);
return returnDataList(result);
}catch (Exception e){
logger.error(DELETE_USER_BY_ID_ERROR.getMsg(),e);
logger.error(Status.DELETE_USER_BY_ID_ERROR.getMsg(),e);
return error(Status.DELETE_USER_BY_ID_ERROR.getCode(), Status.DELETE_USER_BY_ID_ERROR.getMsg());
}
}
@ -220,7 +218,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.grantProject(loginUser, userId, projectIds);
return returnDataList(result);
}catch (Exception e){
logger.error(GRANT_PROJECT_ERROR.getMsg(),e);
logger.error(Status.GRANT_PROJECT_ERROR.getMsg(),e);
return error(Status.GRANT_PROJECT_ERROR.getCode(), Status.GRANT_PROJECT_ERROR.getMsg());
}
}
@ -247,7 +245,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.grantResources(loginUser, userId, resourceIds);
return returnDataList(result);
}catch (Exception e){
logger.error(GRANT_RESOURCE_ERROR.getMsg(),e);
logger.error(Status.GRANT_RESOURCE_ERROR.getMsg(),e);
return error(Status.GRANT_RESOURCE_ERROR.getCode(), Status.GRANT_RESOURCE_ERROR.getMsg());
}
}
@ -275,7 +273,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.grantUDFFunction(loginUser, userId, udfIds);
return returnDataList(result);
}catch (Exception e){
logger.error(GRANT_UDF_FUNCTION_ERROR.getMsg(),e);
logger.error(Status.GRANT_UDF_FUNCTION_ERROR.getMsg(),e);
return error(Status.GRANT_UDF_FUNCTION_ERROR.getCode(), Status.GRANT_UDF_FUNCTION_ERROR.getMsg());
}
}
@ -304,7 +302,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.grantDataSource(loginUser, userId, datasourceIds);
return returnDataList(result);
}catch (Exception e){
logger.error(GRANT_DATASOURCE_ERROR.getMsg(),e);
logger.error(Status.GRANT_DATASOURCE_ERROR.getMsg(),e);
return error(Status.GRANT_DATASOURCE_ERROR.getCode(), Status.GRANT_DATASOURCE_ERROR.getMsg());
}
}
@ -325,7 +323,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.getUserInfo(loginUser);
return returnDataList(result);
}catch (Exception e){
logger.error(GET_USER_INFO_ERROR.getMsg(),e);
logger.error(Status.GET_USER_INFO_ERROR.getMsg(),e);
return error(Status.GET_USER_INFO_ERROR.getCode(), Status.GET_USER_INFO_ERROR.getMsg());
}
}
@ -345,7 +343,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.queryAllGeneralUsers(loginUser);
return returnDataList(result);
}catch (Exception e){
logger.error(USER_LIST_ERROR.getMsg(),e);
logger.error(Status.USER_LIST_ERROR.getMsg(),e);
return error(Status.USER_LIST_ERROR.getCode(), Status.USER_LIST_ERROR.getMsg());
}
}
@ -365,7 +363,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.queryUserList(loginUser);
return returnDataList(result);
}catch (Exception e){
logger.error(USER_LIST_ERROR.getMsg(),e);
logger.error(Status.USER_LIST_ERROR.getMsg(),e);
return error(Status.USER_LIST_ERROR.getCode(), Status.USER_LIST_ERROR.getMsg());
}
}
@ -393,7 +391,7 @@ public class UsersController extends BaseController{
loginUser.getUserName(),userName);
return usersService.verifyUserName(userName);
}catch (Exception e){
logger.error(VERIFY_USERNAME_ERROR.getMsg(),e);
logger.error(Status.VERIFY_USERNAME_ERROR.getMsg(),e);
return error(Status.VERIFY_USERNAME_ERROR.getCode(), Status.VERIFY_USERNAME_ERROR.getMsg());
}
}
@ -420,7 +418,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.unauthorizedUser(loginUser, alertgroupId);
return returnDataList(result);
}catch (Exception e){
logger.error(UNAUTHORIZED_USER_ERROR.getMsg(),e);
logger.error(Status.UNAUTHORIZED_USER_ERROR.getMsg(),e);
return error(Status.UNAUTHORIZED_USER_ERROR.getCode(), Status.UNAUTHORIZED_USER_ERROR.getMsg());
}
}
@ -447,7 +445,7 @@ public class UsersController extends BaseController{
Map<String, Object> result = usersService.authorizedUser(loginUser, alertgroupId);
return returnDataList(result);
}catch (Exception e){
logger.error(AUTHORIZED_USER_ERROR.getMsg(),e);
logger.error(Status.AUTHORIZED_USER_ERROR.getMsg(),e);
return error(Status.AUTHORIZED_USER_ERROR.getCode(), Status.AUTHORIZED_USER_ERROR.getMsg());
}
}

View File

@ -14,18 +14,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.controller;
package org.apache.dolphinscheduler.api.controller;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.service.WorkerGroupService;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.utils.ParameterUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.WorkerGroupService;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -35,8 +36,6 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import static cn.escheduler.api.utils.Constants.SESSION_USER;
/**
* worker group controller
*/
@ -68,7 +67,7 @@ public class WorkerGroupController extends BaseController{
})
@PostMapping(value = "/save")
@ResponseStatus(HttpStatus.OK)
public Result saveWorkerGroup(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser,
public Result saveWorkerGroup(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "id", required = false, defaultValue = "0") int id,
@RequestParam(value = "name") String name,
@RequestParam(value = "ipList") String ipList
@ -101,7 +100,7 @@ public class WorkerGroupController extends BaseController{
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
public Result queryAllWorkerGroupsPaging(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser,
public Result queryAllWorkerGroupsPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("pageNo") Integer pageNo,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize
@ -127,7 +126,7 @@ public class WorkerGroupController extends BaseController{
@ApiOperation(value = "queryAllWorkerGroups", notes= "QUERY_WORKER_GROUP_LIST_NOTES")
@GetMapping(value = "/all-groups")
@ResponseStatus(HttpStatus.OK)
public Result queryAllWorkerGroups(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser
public Result queryAllWorkerGroups(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser
) {
logger.info("query all worker group: login user {}",
loginUser.getUserName() );
@ -154,7 +153,7 @@ public class WorkerGroupController extends BaseController{
})
@GetMapping(value = "/delete-by-id")
@ResponseStatus(HttpStatus.OK)
public Result deleteById(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser,
public Result deleteById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("id") Integer id
) {
logger.info("delete worker group: login user {}, id:{} ",

View File

@ -14,10 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.dto;
package org.apache.dolphinscheduler.api.dto;
import cn.escheduler.common.enums.CommandType;
import cn.escheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.enums.CommandType;
/**
* command state count

View File

@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.dto;
package org.apache.dolphinscheduler.api.dto;
import cn.escheduler.dao.entity.DefinitionGroupByUser;
import org.apache.dolphinscheduler.dao.entity.DefinitionGroupByUser;
import java.util.List;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.dto;
package org.apache.dolphinscheduler.api.dto;
import java.util.Date;

View File

@ -14,10 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.dto;
package org.apache.dolphinscheduler.api.dto;
import cn.escheduler.common.enums.ExecutionStatus;
import cn.escheduler.dao.entity.ExecuteStatusCount;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.dao.entity.ExecuteStatusCount;
import java.util.ArrayList;
import java.util.List;

View File

@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.dto;
package org.apache.dolphinscheduler.api.dto;
import cn.escheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
/**
* task state count

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.dto.gantt;
package org.apache.dolphinscheduler.api.dto.gantt;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.dto.gantt;
package org.apache.dolphinscheduler.api.dto.gantt;
import java.util.ArrayList;
import java.util.Date;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.dto.treeview;
package org.apache.dolphinscheduler.api.dto.treeview;
import java.util.Date;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.dto.treeview;
package org.apache.dolphinscheduler.api.dto.treeview;
import java.util.ArrayList;
import java.util.List;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.enums;
package org.apache.dolphinscheduler.api.enums;
/**
* execute type

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.enums;
package org.apache.dolphinscheduler.api.enums;
/**
* status enum

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.interceptor;
package org.apache.dolphinscheduler.api.interceptor;
import com.alibaba.druid.support.http.WebStatFilter;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.interceptor;
package org.apache.dolphinscheduler.api.interceptor;
import com.alibaba.druid.support.http.StatViewServlet;

View File

@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.interceptor;
package org.apache.dolphinscheduler.api.interceptor;
import cn.escheduler.api.service.SessionService;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.dao.entity.Session;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.mapper.UserMapper;
import org.apache.dolphinscheduler.api.service.SessionService;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.dao.entity.Session;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.UserMapper;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;

View File

@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.log;
package org.apache.dolphinscheduler.api.log;
import cn.escheduler.rpc.*;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import io.grpc.StatusRuntimeException;
import org.apache.dolphinscheduler.rpc.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -14,18 +14,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.common.enums.UserType;
import cn.escheduler.common.utils.*;
import cn.escheduler.dao.entity.AccessToken;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.mapper.*;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.common.enums.UserType;
import org.apache.dolphinscheduler.dao.entity.AccessToken;
import org.apache.dolphinscheduler.dao.entity.User;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.EncryptionUtils;
import org.apache.dolphinscheduler.dao.mapper.AccessTokenMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -14,19 +14,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.AlertType;
import cn.escheduler.common.enums.UserType;
import cn.escheduler.dao.entity.AlertGroup;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.entity.UserAlertGroup;
import cn.escheduler.dao.mapper.AlertGroupMapper;
import cn.escheduler.dao.mapper.UserAlertGroupMapper;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.AlertType;
import org.apache.dolphinscheduler.common.enums.UserType;
import org.apache.dolphinscheduler.dao.entity.AlertGroup;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.entity.UserAlertGroup;
import org.apache.dolphinscheduler.dao.mapper.AlertGroupMapper;
import org.apache.dolphinscheduler.dao.mapper.UserAlertGroupMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;

View File

@ -14,16 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.common.graph.DAG;
import cn.escheduler.common.model.TaskNode;
import cn.escheduler.common.model.TaskNodeRelation;
import cn.escheduler.common.process.ProcessDag;
import cn.escheduler.common.utils.CollectionUtils;
import cn.escheduler.common.utils.JSONUtils;
import cn.escheduler.dao.entity.ProcessData;
import cn.escheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.common.graph.DAG;
import org.apache.dolphinscheduler.common.model.TaskNode;
import org.apache.dolphinscheduler.common.model.TaskNodeRelation;
import org.apache.dolphinscheduler.common.process.ProcessDag;
import org.apache.dolphinscheduler.common.utils.CollectionUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.entity.ProcessData;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import java.util.ArrayList;
import java.util.List;

View File

@ -14,14 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.UserType;
import cn.escheduler.common.utils.HadoopUtils;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.UserType;
import org.apache.dolphinscheduler.common.utils.HadoopUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.commons.lang3.StringUtils;
import javax.servlet.http.Cookie;

View File

@ -14,23 +14,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.dto.CommandStateCount;
import cn.escheduler.api.dto.DefineUserDto;
import cn.escheduler.api.dto.TaskCountDto;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.common.enums.CommandType;
import cn.escheduler.common.enums.UserType;
import cn.escheduler.common.queue.ITaskQueue;
import cn.escheduler.common.queue.TaskQueueFactory;
import cn.escheduler.common.utils.DateUtils;
import cn.escheduler.dao.ProcessDao;
import cn.escheduler.dao.entity.*;
import cn.escheduler.dao.mapper.*;
import org.apache.dolphinscheduler.api.dto.CommandStateCount;
import org.apache.dolphinscheduler.api.dto.DefineUserDto;
import org.apache.dolphinscheduler.api.dto.TaskCountDto;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.UserType;
import org.apache.dolphinscheduler.common.queue.ITaskQueue;
import org.apache.dolphinscheduler.common.queue.TaskQueueFactory;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.dao.ProcessDao;
import org.apache.commons.lang3.StringUtils;
import org.apache.dolphinscheduler.dao.entity.*;
import org.apache.dolphinscheduler.dao.mapper.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -354,8 +354,8 @@ public class DataAnalysisService {
}
ITaskQueue tasksQueue = TaskQueueFactory.getTaskQueueInstance();
List<String> tasksQueueList = tasksQueue.getAllTasks(cn.escheduler.common.Constants.SCHEDULER_TASKS_QUEUE);
List<String> tasksKillList = tasksQueue.getAllTasks(cn.escheduler.common.Constants.SCHEDULER_TASKS_KILL);
List<String> tasksQueueList = tasksQueue.getAllTasks(org.apache.dolphinscheduler.common.Constants.SCHEDULER_TASKS_QUEUE);
List<String> tasksKillList = tasksQueue.getAllTasks(org.apache.dolphinscheduler.common.Constants.SCHEDULER_TASKS_KILL);
Map<String,Integer> dataMap = new HashMap<>();
if (loginUser.getUserType() == UserType.ADMIN_USER){

View File

@ -14,22 +14,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.DbType;
import cn.escheduler.common.enums.UserType;
import cn.escheduler.common.job.db.*;
import cn.escheduler.common.utils.CommonUtils;
import cn.escheduler.common.utils.JSONUtils;
import cn.escheduler.dao.entity.DataSource;
import cn.escheduler.dao.entity.Resource;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.mapper.DataSourceMapper;
import cn.escheduler.dao.mapper.DataSourceUserMapper;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.DbType;
import org.apache.dolphinscheduler.common.enums.UserType;
import org.apache.dolphinscheduler.common.job.db.*;
import org.apache.dolphinscheduler.common.utils.CommonUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.entity.DataSource;
import org.apache.dolphinscheduler.dao.entity.Resource;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.DataSourceMapper;
import org.apache.dolphinscheduler.dao.mapper.DataSourceUserMapper;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -47,7 +47,7 @@ import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.*;
import static cn.escheduler.common.utils.PropertyUtils.getString;
import static org.apache.dolphinscheduler.common.utils.PropertyUtils.getString;
/**
* datasource service
@ -65,7 +65,7 @@ public class DataSourceService extends BaseService{
public static final String PRINCIPAL = "principal";
public static final String DATABASE = "database";
public static final String USER_NAME = "userName";
public static final String PASSWORD = cn.escheduler.common.Constants.PASSWORD;
public static final String PASSWORD = org.apache.dolphinscheduler.common.Constants.PASSWORD;
public static final String OTHER = "other";
@ -321,7 +321,7 @@ public class DataSourceService extends BaseService{
String connectionParams = dataSource.getConnectionParams();
JSONObject object = JSONObject.parseObject(connectionParams);
object.put(cn.escheduler.common.Constants.PASSWORD, cn.escheduler.common.Constants.XXXXXX);
object.put(org.apache.dolphinscheduler.common.Constants.PASSWORD, org.apache.dolphinscheduler.common.Constants.XXXXXX);
dataSource.setConnectionParams(JSONUtils.toJson(object));
}
@ -394,13 +394,13 @@ public class DataSourceService extends BaseService{
case HIVE:
case SPARK:
if (CommonUtils.getKerberosStartupState()) {
System.setProperty(cn.escheduler.common.Constants.JAVA_SECURITY_KRB5_CONF,
getString(cn.escheduler.common.Constants.JAVA_SECURITY_KRB5_CONF_PATH));
System.setProperty(org.apache.dolphinscheduler.common.Constants.JAVA_SECURITY_KRB5_CONF,
getString(org.apache.dolphinscheduler.common.Constants.JAVA_SECURITY_KRB5_CONF_PATH));
Configuration configuration = new Configuration();
configuration.set(cn.escheduler.common.Constants.HADOOP_SECURITY_AUTHENTICATION, "kerberos");
configuration.set(org.apache.dolphinscheduler.common.Constants.HADOOP_SECURITY_AUTHENTICATION, "kerberos");
UserGroupInformation.setConfiguration(configuration);
UserGroupInformation.loginUserFromKeytab(getString(cn.escheduler.common.Constants.LOGIN_USER_KEY_TAB_USERNAME),
getString(cn.escheduler.common.Constants.LOGIN_USER_KEY_TAB_PATH));
UserGroupInformation.loginUserFromKeytab(getString(org.apache.dolphinscheduler.common.Constants.LOGIN_USER_KEY_TAB_USERNAME),
getString(org.apache.dolphinscheduler.common.Constants.LOGIN_USER_KEY_TAB_PATH));
}
if (dbType == DbType.HIVE){
datasource = JSONObject.parseObject(parameter, HiveDataSource.class);
@ -674,13 +674,13 @@ public class DataSourceService extends BaseService{
*/
private String[] getHostsAndPort(String address) {
String[] result = new String[2];
String[] tmpArray = address.split(cn.escheduler.common.Constants.DOUBLE_SLASH);
String[] tmpArray = address.split(org.apache.dolphinscheduler.common.Constants.DOUBLE_SLASH);
String hostsAndPorts = tmpArray[tmpArray.length - 1];
StringBuilder hosts = new StringBuilder();
String[] hostPortArray = hostsAndPorts.split(cn.escheduler.common.Constants.COMMA);
String port = hostPortArray[0].split(cn.escheduler.common.Constants.COLON)[1];
String[] hostPortArray = hostsAndPorts.split(org.apache.dolphinscheduler.common.Constants.COMMA);
String port = hostPortArray[0].split(org.apache.dolphinscheduler.common.Constants.COLON)[1];
for (String hostPort : hostPortArray) {
hosts.append(hostPort.split(cn.escheduler.common.Constants.COLON)[0]).append(cn.escheduler.common.Constants.COMMA);
hosts.append(hostPort.split(org.apache.dolphinscheduler.common.Constants.COLON)[0]).append(org.apache.dolphinscheduler.common.Constants.COMMA);
}
hosts.deleteCharAt(hosts.length() - 1);
result[0] = hosts.toString();

View File

@ -14,20 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.ExecuteType;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.common.enums.*;
import cn.escheduler.common.utils.DateUtils;
import cn.escheduler.common.utils.JSONUtils;
import cn.escheduler.dao.ProcessDao;
import cn.escheduler.dao.entity.*;
import cn.escheduler.dao.mapper.ProcessDefinitionMapper;
import cn.escheduler.dao.mapper.ProcessInstanceMapper;
import cn.escheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.api.enums.ExecuteType;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.common.enums.*;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.ProcessDao;
import org.apache.dolphinscheduler.dao.entity.*;
import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -37,7 +37,7 @@ import org.springframework.stereotype.Service;
import java.text.ParseException;
import java.util.*;
import static cn.escheduler.common.Constants.*;
import static org.apache.dolphinscheduler.common.Constants.*;
/**
* executor service

View File

@ -14,14 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.log.LogClient;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.Constants;
import cn.escheduler.dao.ProcessDao;
import cn.escheduler.dao.entity.TaskInstance;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.log.LogClient;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.ProcessDao;
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -14,17 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.ZookeeperMonitor;
import cn.escheduler.common.enums.ZKNodeType;
import cn.escheduler.dao.MonitorDBDao;
import cn.escheduler.common.model.MasterServer;
import cn.escheduler.dao.entity.MonitorRecord;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.entity.ZookeeperRecord;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.ZookeeperMonitor;
import org.apache.dolphinscheduler.common.enums.ZKNodeType;
import org.apache.dolphinscheduler.dao.MonitorDBDao;
import org.apache.dolphinscheduler.common.model.MasterServer;
import org.apache.dolphinscheduler.dao.entity.MonitorRecord;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.entity.ZookeeperRecord;
import org.springframework.stereotype.Service;
import java.util.ArrayList;

View File

@ -14,26 +14,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.dto.treeview.Instance;
import cn.escheduler.api.dto.treeview.TreeViewDto;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.common.enums.*;
import cn.escheduler.common.graph.DAG;
import cn.escheduler.common.model.TaskNode;
import cn.escheduler.common.model.TaskNodeRelation;
import cn.escheduler.common.process.ProcessDag;
import cn.escheduler.common.process.Property;
import cn.escheduler.common.thread.Stopper;
import cn.escheduler.common.utils.CollectionUtils;
import cn.escheduler.common.utils.DateUtils;
import cn.escheduler.common.utils.JSONUtils;
import cn.escheduler.dao.ProcessDao;
import cn.escheduler.dao.entity.*;
import cn.escheduler.dao.mapper.*;
import org.apache.dolphinscheduler.api.dto.treeview.Instance;
import org.apache.dolphinscheduler.api.dto.treeview.TreeViewDto;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.common.enums.*;
import org.apache.dolphinscheduler.common.graph.DAG;
import org.apache.dolphinscheduler.common.model.TaskNode;
import org.apache.dolphinscheduler.common.model.TaskNodeRelation;
import org.apache.dolphinscheduler.common.process.ProcessDag;
import org.apache.dolphinscheduler.common.process.Property;
import org.apache.dolphinscheduler.common.thread.Stopper;
import org.apache.dolphinscheduler.common.utils.CollectionUtils;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.ProcessDao;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@ -42,6 +40,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.dolphinscheduler.api.utils.CheckUtils;
import org.apache.dolphinscheduler.dao.entity.*;
import org.apache.dolphinscheduler.dao.mapper.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -59,11 +60,7 @@ import java.io.InputStreamReader;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import static cn.escheduler.api.enums.Status.UPDATE_PROCESS_DEFINITION_ERROR;
import static cn.escheduler.api.service.SchedulerService.deleteSchedule;
import static cn.escheduler.api.utils.CheckUtils.checkOtherParams;
import static cn.escheduler.api.utils.CheckUtils.checkTaskNodeParameters;
import static cn.escheduler.common.Constants.CMDPARAM_SUB_PROCESS_DEFINE_ID;
import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_SUB_PROCESS_DEFINE_ID;
/**
* process definition service
@ -324,7 +321,7 @@ public class ProcessDefinitionService extends BaseDAGService {
putMsg(result, Status.SUCCESS);
} else {
putMsg(result, UPDATE_PROCESS_DEFINITION_ERROR);
putMsg(result, Status.UPDATE_PROCESS_DEFINITION_ERROR);
}
return result;
}
@ -511,7 +508,7 @@ public class ProcessDefinitionService extends BaseDAGService {
// set status
schedule.setReleaseState(ReleaseState.OFFLINE);
scheduleMapper.updateById(schedule);
deleteSchedule(project.getId(), schedule.getId());
SchedulerService.deleteSchedule(project.getId(), schedule.getId());
}
break;
}
@ -794,14 +791,14 @@ public class ProcessDefinitionService extends BaseDAGService {
// check whether the process definition json is normal
for (TaskNode taskNode : taskNodes) {
if (!checkTaskNodeParameters(taskNode.getParams(), taskNode.getType())) {
if (!CheckUtils.checkTaskNodeParameters(taskNode.getParams(), taskNode.getType())) {
logger.error("task node {} parameter invalid", taskNode.getName());
putMsg(result, Status.PROCESS_NODE_S_PARAMETER_INVALID, taskNode.getName());
return result;
}
// check extra params
checkOtherParams(taskNode.getExtras());
CheckUtils.checkOtherParams(taskNode.getExtras());
}
putMsg(result,Status.SUCCESS);
} catch (Exception e) {

View File

@ -14,33 +14,33 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.dto.gantt.GanttDto;
import cn.escheduler.api.dto.gantt.Task;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.DependResult;
import cn.escheduler.common.enums.ExecutionStatus;
import cn.escheduler.common.enums.Flag;
import cn.escheduler.common.enums.TaskType;
import cn.escheduler.common.graph.DAG;
import cn.escheduler.common.model.TaskNode;
import cn.escheduler.common.model.TaskNodeRelation;
import cn.escheduler.common.process.Property;
import cn.escheduler.common.queue.ITaskQueue;
import cn.escheduler.common.queue.TaskQueueFactory;
import cn.escheduler.common.utils.*;
import cn.escheduler.common.utils.placeholder.BusinessTimeUtils;
import cn.escheduler.dao.ProcessDao;
import cn.escheduler.dao.entity.*;
import cn.escheduler.dao.mapper.*;
import org.apache.dolphinscheduler.api.dto.gantt.GanttDto;
import org.apache.dolphinscheduler.api.dto.gantt.Task;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.DependResult;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.enums.TaskType;
import org.apache.dolphinscheduler.common.graph.DAG;
import org.apache.dolphinscheduler.common.model.TaskNode;
import org.apache.dolphinscheduler.common.model.TaskNodeRelation;
import org.apache.dolphinscheduler.common.process.Property;
import org.apache.dolphinscheduler.common.queue.ITaskQueue;
import org.apache.dolphinscheduler.common.queue.TaskQueueFactory;
import org.apache.dolphinscheduler.common.utils.*;
import org.apache.dolphinscheduler.common.utils.placeholder.BusinessTimeUtils;
import org.apache.dolphinscheduler.dao.ProcessDao;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;
import org.apache.dolphinscheduler.dao.entity.*;
import org.apache.dolphinscheduler.dao.mapper.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -55,7 +55,7 @@ import java.text.ParseException;
import java.util.*;
import java.util.stream.Collectors;
import static cn.escheduler.common.Constants.*;
import static org.apache.dolphinscheduler.common.Constants.*;
/**
* process instance service
@ -532,7 +532,7 @@ public class ProcessInstanceService extends BaseDAGService {
try {
logger.info("delete task queue node : {}",nodeValueSb.toString());
tasksQueue.removeNode(cn.escheduler.common.Constants.SCHEDULER_TASKS_QUEUE, nodeValueSb.toString());
tasksQueue.removeNode(org.apache.dolphinscheduler.common.Constants.SCHEDULER_TASKS_QUEUE, nodeValueSb.toString());
}catch (Exception e){
logger.error("delete task queue node : {}", nodeValueSb.toString());
}

View File

@ -14,19 +14,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.common.enums.UserType;
import cn.escheduler.dao.entity.ProcessDefinition;
import cn.escheduler.dao.entity.Project;
import cn.escheduler.dao.entity.ProjectUser;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.mapper.ProcessDefinitionMapper;
import cn.escheduler.dao.mapper.ProjectMapper;
import cn.escheduler.dao.mapper.ProjectUserMapper;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.common.enums.UserType;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.ProjectUser;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectUserMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.slf4j.Logger;
@ -36,7 +36,7 @@ import org.springframework.stereotype.Service;
import java.util.*;
import static cn.escheduler.api.utils.CheckUtils.checkDesc;
import static org.apache.dolphinscheduler.api.utils.CheckUtils.checkDesc;
/**
* project service
@ -163,7 +163,7 @@ public class ProjectService extends BaseService{
List<Project> projectList = projectIPage.getRecords();
if(userId != 0){
for (Project project : projectList) {
project.setPerm(cn.escheduler.common.Constants.DEFAULT_ADMIN_PERMISSION);
project.setPerm(org.apache.dolphinscheduler.common.Constants.DEFAULT_ADMIN_PERMISSION);
}
}
pageInfo.setTotalCount((int)projectIPage.getTotal());
@ -338,7 +338,7 @@ public class ProjectService extends BaseService{
*/
private boolean checkReadPermission(User user, Project project) {
int permissionId = queryPermission(user, project);
return (permissionId & cn.escheduler.common.Constants.READ_PERMISSION) != 0;
return (permissionId & org.apache.dolphinscheduler.common.Constants.READ_PERMISSION) != 0;
}
/**
@ -350,11 +350,11 @@ public class ProjectService extends BaseService{
*/
private int queryPermission(User user, Project project) {
if (user.getUserType() == UserType.ADMIN_USER) {
return cn.escheduler.common.Constants.READ_PERMISSION;
return org.apache.dolphinscheduler.common.Constants.READ_PERMISSION;
}
if (project.getUserId() == user.getId()) {
return cn.escheduler.common.Constants.ALL_PERMISSIONS;
return org.apache.dolphinscheduler.common.Constants.ALL_PERMISSIONS;
}
ProjectUser projectUser = projectUserMapper.queryProjectRelation(project.getId(), user.getId());

View File

@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.api.utils.Result;
import cn.escheduler.dao.entity.Queue;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.mapper.QueueMapper;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.Queue;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.QueueMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang.StringUtils;

View File

@ -14,26 +14,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.enums.ResourceType;
import cn.escheduler.common.enums.UserType;
import cn.escheduler.common.utils.FileUtils;
import cn.escheduler.common.utils.HadoopUtils;
import cn.escheduler.common.utils.PropertyUtils;
import cn.escheduler.dao.mapper.*;
import cn.escheduler.dao.entity.Resource;
import cn.escheduler.dao.entity.Tenant;
import cn.escheduler.dao.entity.UdfFunc;
import cn.escheduler.dao.entity.User;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.ResourceType;
import org.apache.dolphinscheduler.common.enums.UserType;
import org.apache.dolphinscheduler.common.utils.FileUtils;
import org.apache.dolphinscheduler.common.utils.HadoopUtils;
import org.apache.dolphinscheduler.common.utils.PropertyUtils;
import org.apache.dolphinscheduler.dao.entity.Resource;
import org.apache.dolphinscheduler.dao.entity.Tenant;
import org.apache.dolphinscheduler.dao.entity.UdfFunc;
import org.apache.dolphinscheduler.dao.entity.User;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.collections.BeanMap;
import org.apache.commons.lang.StringUtils;
import org.apache.dolphinscheduler.dao.mapper.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -44,8 +44,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.text.MessageFormat;
import java.util.*;
import static cn.escheduler.api.enums.Status.UPDATE_RESOURCE_ERROR;
import static cn.escheduler.common.Constants.*;
import static org.apache.dolphinscheduler.common.Constants.*;
/**
* resources service
@ -248,7 +247,7 @@ public class ResourcesService extends BaseService {
}
result.setData(resultMap);
} catch (Exception e) {
logger.error(UPDATE_RESOURCE_ERROR.getMsg(), e);
logger.error(Status.UPDATE_RESOURCE_ERROR.getMsg(), e);
putMsg(result, Status.UPDATE_RESOURCE_ERROR);
return result;
}
@ -354,7 +353,7 @@ public class ResourcesService extends BaseService {
if (!HadoopUtils.getInstance().exists(resourcePath)) {
createTenantDirIfNotExists(tenantCode);
}
cn.escheduler.api.utils.FileUtils.copyFile(file, localFilename);
org.apache.dolphinscheduler.api.utils.FileUtils.copyFile(file, localFilename);
HadoopUtils.getInstance().copyLocalToHdfs(localFilename, hdfsFilename, true, true);
} catch (Exception e) {
logger.error(e.getMessage(), e);
@ -737,7 +736,7 @@ public class ResourcesService extends BaseService {
logger.info("resource hdfs path is {} ", hdfsFileName);
HadoopUtils.getInstance().copyHdfsToLocal(hdfsFileName, localFileName, false, true);
org.springframework.core.io.Resource file = cn.escheduler.api.utils.FileUtils.file2Resource(localFileName);
org.springframework.core.io.Resource file = org.apache.dolphinscheduler.api.utils.FileUtils.file2Resource(localFileName);
return file;
}

View File

@ -14,31 +14,31 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.dto.ScheduleParam;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.common.enums.FailureStrategy;
import cn.escheduler.common.enums.Priority;
import cn.escheduler.common.enums.ReleaseState;
import cn.escheduler.common.enums.WarningType;
import cn.escheduler.common.model.MasterServer;
import cn.escheduler.common.utils.DateUtils;
import cn.escheduler.common.utils.JSONUtils;
import cn.escheduler.dao.ProcessDao;
import cn.escheduler.dao.entity.ProcessDefinition;
import cn.escheduler.dao.entity.Project;
import cn.escheduler.dao.entity.Schedule;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.mapper.ProcessDefinitionMapper;
import cn.escheduler.dao.mapper.ProjectMapper;
import cn.escheduler.dao.mapper.ScheduleMapper;
import cn.escheduler.dao.utils.cron.CronUtils;
import cn.escheduler.server.quartz.ProcessScheduleJob;
import cn.escheduler.server.quartz.QuartzExecutors;
import org.apache.dolphinscheduler.api.dto.ScheduleParam;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.common.enums.FailureStrategy;
import org.apache.dolphinscheduler.common.enums.Priority;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.model.MasterServer;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.ProcessDao;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.Schedule;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper;
import org.apache.dolphinscheduler.dao.utils.cron.CronUtils;
import org.apache.dolphinscheduler.server.quartz.ProcessScheduleJob;
import org.apache.dolphinscheduler.server.quartz.QuartzExecutors;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;
@ -587,7 +587,7 @@ public class SchedulerService extends BaseService {
return result;
}
List<Date> selfFireDateList = CronUtils.getSelfFireDateList(startTime, endTime,cronExpression);
result.put(Constants.DATA_LIST, selfFireDateList.stream().map(t -> DateUtils.dateToString(t)).limit(cn.escheduler.common.Constants.PREVIEW_SCHEDULE_EXECUTE_COUNT));
result.put(Constants.DATA_LIST, selfFireDateList.stream().map(t -> DateUtils.dateToString(t)).limit(org.apache.dolphinscheduler.common.Constants.PREVIEW_SCHEDULE_EXECUTE_COUNT));
putMsg(result, Status.SUCCESS);
return result;
}

View File

@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.controller.BaseController;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.common.utils.CollectionUtils;
import cn.escheduler.dao.entity.Session;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.mapper.SessionMapper;
import org.apache.dolphinscheduler.api.controller.BaseController;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.common.utils.CollectionUtils;
import org.apache.dolphinscheduler.dao.entity.Session;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.SessionMapper;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -14,22 +14,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.common.enums.ExecutionStatus;
import cn.escheduler.common.utils.CollectionUtils;
import cn.escheduler.common.utils.DateUtils;
import cn.escheduler.dao.ProcessDao;
import cn.escheduler.dao.entity.ProcessInstance;
import cn.escheduler.dao.entity.Project;
import cn.escheduler.dao.entity.TaskInstance;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.mapper.ProjectMapper;
import cn.escheduler.dao.mapper.TaskInstanceMapper;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.utils.CollectionUtils;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.dao.ProcessDao;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskInstanceMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;

View File

@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.dao.TaskRecordDao;
import cn.escheduler.dao.entity.TaskRecord;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.dao.TaskRecordDao;
import org.apache.dolphinscheduler.dao.entity.TaskRecord;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@ -29,7 +29,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static cn.escheduler.common.Constants.*;
import static org.apache.dolphinscheduler.common.Constants.*;
/**
* task record service

View File

@ -14,17 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.api.service;
package org.apache.dolphinscheduler.api.service;
import cn.escheduler.api.enums.Status;
import cn.escheduler.api.utils.Constants;
import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.api.utils.Result;
import cn.escheduler.common.utils.HadoopUtils;
import cn.escheduler.common.utils.PropertyUtils;
import cn.escheduler.dao.entity.Tenant;
import cn.escheduler.dao.entity.User;
import cn.escheduler.dao.mapper.TenantMapper;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Constants;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.utils.HadoopUtils;
import org.apache.dolphinscheduler.common.utils.PropertyUtils;
import org.apache.dolphinscheduler.dao.entity.Tenant;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.TenantMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;

Some files were not shown because too many files have changed in this diff Show More