Loading docker/postgres/docker-entrypoint-initdb/init.sql +3 −3 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ CREATE TABLE t_ds_command ( dependence varchar(255) DEFAULT NULL , update_time timestamp DEFAULT NULL , process_instance_priority int DEFAULT NULL , worker_group_id int DEFAULT '-1' , worker_group varchar(64), PRIMARY KEY (id) ) ; Loading Loading @@ -275,7 +275,7 @@ CREATE TABLE t_ds_error_command ( update_time timestamp DEFAULT NULL , dependence text , process_instance_priority int DEFAULT NULL , worker_group_id int DEFAULT '-1' , worker_group varchar(64), message text , PRIMARY KEY (id) ); Loading Loading @@ -748,7 +748,7 @@ CREATE SEQUENCE t_ds_worker_server_id_sequence; ALTER TABLE t_ds_worker_server ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_worker_server_id_sequence'); -- Records of t_ds_user,user : admin , password : dolphinscheduler123 -- Records of t_ds_user?user : admin , password : dolphinscheduler123 INSERT INTO t_ds_user(user_name,user_password,user_type,email,phone,tenant_id,create_time,update_time) VALUES ('admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', 'xx', '0', '2018-03-27 15:48:50', '2018-10-24 17:40:22'); -- Records of t_ds_alertgroup,dolphinscheduler warning group Loading dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java +4 −2 Original line number Diff line number Diff line Loading @@ -173,9 +173,11 @@ public class ProcessDefinitionService extends BaseDAGService { for(TaskNode taskNode : tasks){ String taskParameter = taskNode.getParams(); AbstractParameters params = TaskParametersUtils.getParameters(taskNode.getType(),taskParameter); if (CollectionUtils.isNotEmpty(params.getResourceFilesList())) { Set<Integer> tempSet = params.getResourceFilesList().stream().map(t->t.getId()).collect(Collectors.toSet()); resourceIds.addAll(tempSet); } } StringBuilder sb = new StringBuilder(); for(int i : resourceIds) { Loading dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java +14 −7 Original line number Diff line number Diff line Loading @@ -423,6 +423,7 @@ public class UsersService extends BaseService { * @param projectIds project id array * @return grant result code */ @Transactional(rollbackFor = Exception.class) public Map<String, Object> grantProject(User loginUser, int userId, String projectIds) { Map<String, Object> result = new HashMap<>(5); result.put(Constants.STATUS, false); Loading Loading @@ -472,6 +473,7 @@ public class UsersService extends BaseService { * @param resourceIds resource id array * @return grant result code */ @Transactional(rollbackFor = Exception.class) public Map<String, Object> grantResources(User loginUser, int userId, String resourceIds) { Map<String, Object> result = new HashMap<>(5); //only admin can operate Loading @@ -484,9 +486,10 @@ public class UsersService extends BaseService { return result; } Set<Integer> needAuthorizeResIds = new HashSet(); if (StringUtils.isNotBlank(resourceIds)) { String[] resourceFullIdArr = resourceIds.split(","); // need authorize resource id set Set<Integer> needAuthorizeResIds = new HashSet(); for (String resourceFullId : resourceFullIdArr) { String[] resourceIdArr = resourceFullId.split("-"); for (int i=0;i<=resourceIdArr.length-1;i++) { Loading @@ -494,6 +497,8 @@ public class UsersService extends BaseService { needAuthorizeResIds.add(resourceIdValue); } } } //get the authorized resource id list by user id List<Resource> oldAuthorizedRes = resourceMapper.queryAuthorizedResourceList(userId); Loading Loading @@ -565,6 +570,7 @@ public class UsersService extends BaseService { * @param udfIds udf id array * @return grant result code */ @Transactional(rollbackFor = Exception.class) public Map<String, Object> grantUDFFunction(User loginUser, int userId, String udfIds) { Map<String, Object> result = new HashMap<>(5); Loading Loading @@ -611,6 +617,7 @@ public class UsersService extends BaseService { * @param datasourceIds data source id array * @return grant result code */ @Transactional(rollbackFor = Exception.class) public Map<String, Object> grantDataSource(User loginUser, int userId, String datasourceIds) { Map<String, Object> result = new HashMap<>(5); result.put(Constants.STATUS, false); Loading dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/SpringConnectionFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class SpringConnectionFactory { * @return druid dataSource */ @Bean(destroyMethod="") public static DruidDataSource dataSource() { public DruidDataSource dataSource() { DruidDataSource druidDataSource = new DruidDataSource(); Loading dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ErrorCommand.java +17 −18 Original line number Diff line number Diff line Loading @@ -101,9 +101,9 @@ public class ErrorCommand { private String message; /** * worker group id * worker group */ private int workerGroupId; private String workerGroup; public ErrorCommand(){} Loading Loading @@ -257,17 +257,25 @@ public class ErrorCommand { this.updateTime = updateTime; } public int getWorkerGroupId() { return workerGroupId; public String getWorkerGroup() { return workerGroup; } public void setWorkerGroupId(int workerGroupId) { this.workerGroupId = workerGroupId; public void setWorkerGroup(String workerGroup) { this.workerGroup = workerGroup; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } @Override public String toString() { return "Command{" + return "ErrorCommand{" + "id=" + id + ", commandType=" + commandType + ", processDefinitionId=" + processDefinitionId + Loading @@ -281,17 +289,8 @@ public class ErrorCommand { ", startTime=" + startTime + ", processInstancePriority=" + processInstancePriority + ", updateTime=" + updateTime + ", message=" + message + ", message='" + message + '\'' + ", workerGroup='" + workerGroup + '\'' + '}'; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } } Loading
docker/postgres/docker-entrypoint-initdb/init.sql +3 −3 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ CREATE TABLE t_ds_command ( dependence varchar(255) DEFAULT NULL , update_time timestamp DEFAULT NULL , process_instance_priority int DEFAULT NULL , worker_group_id int DEFAULT '-1' , worker_group varchar(64), PRIMARY KEY (id) ) ; Loading Loading @@ -275,7 +275,7 @@ CREATE TABLE t_ds_error_command ( update_time timestamp DEFAULT NULL , dependence text , process_instance_priority int DEFAULT NULL , worker_group_id int DEFAULT '-1' , worker_group varchar(64), message text , PRIMARY KEY (id) ); Loading Loading @@ -748,7 +748,7 @@ CREATE SEQUENCE t_ds_worker_server_id_sequence; ALTER TABLE t_ds_worker_server ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_worker_server_id_sequence'); -- Records of t_ds_user,user : admin , password : dolphinscheduler123 -- Records of t_ds_user?user : admin , password : dolphinscheduler123 INSERT INTO t_ds_user(user_name,user_password,user_type,email,phone,tenant_id,create_time,update_time) VALUES ('admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', 'xx', '0', '2018-03-27 15:48:50', '2018-10-24 17:40:22'); -- Records of t_ds_alertgroup,dolphinscheduler warning group Loading
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java +4 −2 Original line number Diff line number Diff line Loading @@ -173,9 +173,11 @@ public class ProcessDefinitionService extends BaseDAGService { for(TaskNode taskNode : tasks){ String taskParameter = taskNode.getParams(); AbstractParameters params = TaskParametersUtils.getParameters(taskNode.getType(),taskParameter); if (CollectionUtils.isNotEmpty(params.getResourceFilesList())) { Set<Integer> tempSet = params.getResourceFilesList().stream().map(t->t.getId()).collect(Collectors.toSet()); resourceIds.addAll(tempSet); } } StringBuilder sb = new StringBuilder(); for(int i : resourceIds) { Loading
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java +14 −7 Original line number Diff line number Diff line Loading @@ -423,6 +423,7 @@ public class UsersService extends BaseService { * @param projectIds project id array * @return grant result code */ @Transactional(rollbackFor = Exception.class) public Map<String, Object> grantProject(User loginUser, int userId, String projectIds) { Map<String, Object> result = new HashMap<>(5); result.put(Constants.STATUS, false); Loading Loading @@ -472,6 +473,7 @@ public class UsersService extends BaseService { * @param resourceIds resource id array * @return grant result code */ @Transactional(rollbackFor = Exception.class) public Map<String, Object> grantResources(User loginUser, int userId, String resourceIds) { Map<String, Object> result = new HashMap<>(5); //only admin can operate Loading @@ -484,9 +486,10 @@ public class UsersService extends BaseService { return result; } Set<Integer> needAuthorizeResIds = new HashSet(); if (StringUtils.isNotBlank(resourceIds)) { String[] resourceFullIdArr = resourceIds.split(","); // need authorize resource id set Set<Integer> needAuthorizeResIds = new HashSet(); for (String resourceFullId : resourceFullIdArr) { String[] resourceIdArr = resourceFullId.split("-"); for (int i=0;i<=resourceIdArr.length-1;i++) { Loading @@ -494,6 +497,8 @@ public class UsersService extends BaseService { needAuthorizeResIds.add(resourceIdValue); } } } //get the authorized resource id list by user id List<Resource> oldAuthorizedRes = resourceMapper.queryAuthorizedResourceList(userId); Loading Loading @@ -565,6 +570,7 @@ public class UsersService extends BaseService { * @param udfIds udf id array * @return grant result code */ @Transactional(rollbackFor = Exception.class) public Map<String, Object> grantUDFFunction(User loginUser, int userId, String udfIds) { Map<String, Object> result = new HashMap<>(5); Loading Loading @@ -611,6 +617,7 @@ public class UsersService extends BaseService { * @param datasourceIds data source id array * @return grant result code */ @Transactional(rollbackFor = Exception.class) public Map<String, Object> grantDataSource(User loginUser, int userId, String datasourceIds) { Map<String, Object> result = new HashMap<>(5); result.put(Constants.STATUS, false); Loading
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/SpringConnectionFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class SpringConnectionFactory { * @return druid dataSource */ @Bean(destroyMethod="") public static DruidDataSource dataSource() { public DruidDataSource dataSource() { DruidDataSource druidDataSource = new DruidDataSource(); Loading
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ErrorCommand.java +17 −18 Original line number Diff line number Diff line Loading @@ -101,9 +101,9 @@ public class ErrorCommand { private String message; /** * worker group id * worker group */ private int workerGroupId; private String workerGroup; public ErrorCommand(){} Loading Loading @@ -257,17 +257,25 @@ public class ErrorCommand { this.updateTime = updateTime; } public int getWorkerGroupId() { return workerGroupId; public String getWorkerGroup() { return workerGroup; } public void setWorkerGroupId(int workerGroupId) { this.workerGroupId = workerGroupId; public void setWorkerGroup(String workerGroup) { this.workerGroup = workerGroup; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } @Override public String toString() { return "Command{" + return "ErrorCommand{" + "id=" + id + ", commandType=" + commandType + ", processDefinitionId=" + processDefinitionId + Loading @@ -281,17 +289,8 @@ public class ErrorCommand { ", startTime=" + startTime + ", processInstancePriority=" + processInstancePriority + ", updateTime=" + updateTime + ", message=" + message + ", message='" + message + '\'' + ", workerGroup='" + workerGroup + '\'' + '}'; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }