status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
unknown
language
stringclasses
5 values
commit_datetime
unknown
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
logger.error("rename file suffix and original suffix must be consistent: {}", file.getOriginalFilename()); putMsg(result, Status.RESOURCE_SUFFIX_FORBID_CHANGE); return result; } if (Constants.UDF.equals(type.name()) && !JAR.equalsIgnoreCase(fileSuffix)) { logger.error(Status.UDF_RESOURCE_SUFFIX_NOT_JAR.getMsg()); putMsg(result, Status.UDF_RESOURCE_SUFFIX_NOT_JAR); return result; } if (file.getSize() > Constants.MAX_FILE_SIZE) { logger.error("file size is too large: {}", file.getOriginalFilename()); putMsg(result, Status.RESOURCE_SIZE_EXCEED_LIMIT); return result; } String fullName = currentDir.equals("/") ? String.format("%s%s",currentDir,name):String.format("%s/%s",currentDir,name); if (checkResourceExists(fullName, 0, type.ordinal())) { logger.error("resource {} has exist, can't recreate", name); putMsg(result, Status.RESOURCE_EXIST); return result; } Date now = new Date(); Resource resource = new Resource(pid,name,fullName,false,desc,file.getOriginalFilename(),loginUser.getId(),type,file.getSize(),now,now); try { resourcesMapper.insert(resource); putMsg(result, Status.SUCCESS); Map<Object, Object> dataMap = new BeanMap(resource); Map<String, Object> resultMap = new HashMap<>(); for (Map.Entry<Object, Object> entry: dataMap.entrySet()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
if (!"class".equalsIgnoreCase(entry.getKey().toString())) { resultMap.put(entry.getKey().toString(), entry.getValue()); } } result.setData(resultMap); } catch (Exception e) { logger.error("resource already exists, can't recreate ", e); throw new RuntimeException("resource already exists, can't recreate"); } if (!upload(loginUser, fullName, file, type)) { logger.error("upload resource: {} file: {} failed.", name, file.getOriginalFilename()); putMsg(result, Status.HDFS_OPERATION_ERROR); throw new RuntimeException(String.format("upload resource: %s file: %s failed.", name, file.getOriginalFilename())); } return result; } /** * check resource is exists * * @param fullName fullName * @param userId user id * @param type type * @return true if resource exists */ private boolean checkResourceExists(String fullName, int userId, int type ){ List<Resource> resources = resourcesMapper.queryResourceList(fullName, userId, type); if (resources != null && resources.size() > 0) { return true; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
return false; } /** * update resource * @param loginUser login user * @param resourceId resource id * @param name name * @param desc description * @param type resource type * @param file resource file * @return update result code */ @Transactional(rollbackFor = Exception.class) public Result updateResource(User loginUser, int resourceId, String name, String desc, ResourceType type, MultipartFile file) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } Resource resource = resourcesMapper.selectById(resourceId); if (resource == null) { putMsg(result, Status.RESOURCE_NOT_EXIST); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} if (!hasPerm(loginUser, resource.getUserId())) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } if (name.equals(resource.getAlias()) && desc.equals(resource.getDescription())) { putMsg(result, Status.SUCCESS); return result; } String originFullName = resource.getFullName(); String originResourceName = resource.getAlias(); String fullName = String.format("%s%s",originFullName.substring(0,originFullName.lastIndexOf("/")+1),name); if (!originResourceName.equals(name) && checkResourceExists(fullName, 0, type.ordinal())) { logger.error("resource {} already exists, can't recreate", name); putMsg(result, Status.RESOURCE_EXIST); return result; } if (file != null) { if (file.isEmpty()) { logger.error("file is empty: {}", file.getOriginalFilename()); putMsg(result, Status.RESOURCE_FILE_IS_EMPTY); return result; } String fileSuffix = FileUtils.suffix(file.getOriginalFilename()); String nameSuffix = FileUtils.suffix(name); if (!(StringUtils.isNotEmpty(fileSuffix) && fileSuffix.equalsIgnoreCase(nameSuffix))) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
/** * rename file suffix and original suffix must be consistent */ logger.error("rename file suffix and original suffix must be consistent: {}", file.getOriginalFilename()); putMsg(result, Status.RESOURCE_SUFFIX_FORBID_CHANGE); return result; } if (Constants.UDF.equals(type.name()) && !JAR.equalsIgnoreCase(FileUtils.suffix(originFullName))) { logger.error(Status.UDF_RESOURCE_SUFFIX_NOT_JAR.getMsg()); putMsg(result, Status.UDF_RESOURCE_SUFFIX_NOT_JAR); return result; } if (file.getSize() > Constants.MAX_FILE_SIZE) { logger.error("file size is too large: {}", file.getOriginalFilename()); putMsg(result, Status.RESOURCE_SIZE_EXCEED_LIMIT); return result; } } String tenantCode = getTenantCode(resource.getUserId(),result); if (StringUtils.isEmpty(tenantCode)){ return result; } String originHdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(),tenantCode,originFullName); try { if (!HadoopUtils.getInstance().exists(originHdfsFileName)) { logger.error("{} not exist", originHdfsFileName);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
putMsg(result,Status.RESOURCE_NOT_EXIST); return result; } } catch (IOException e) { logger.error(e.getMessage(),e); throw new ServiceException(Status.HDFS_OPERATION_ERROR); } if (!resource.isDirectory()) { String originSuffix = FileUtils.suffix(originFullName); String suffix = FileUtils.suffix(fullName); boolean suffixIsChanged = false; if (StringUtils.isBlank(suffix) && StringUtils.isNotBlank(originSuffix)) { suffixIsChanged = true; } if (StringUtils.isNotBlank(suffix) && !suffix.equals(originSuffix)) { suffixIsChanged = true; } if (suffixIsChanged) { Map<String, Object> columnMap = new HashMap<>(); columnMap.put("resources_id", resourceId); List<ResourcesUser> resourcesUsers = resourceUserMapper.selectByMap(columnMap); if (CollectionUtils.isNotEmpty(resourcesUsers)) { List<Integer> userIds = resourcesUsers.stream().map(ResourcesUser::getUserId).collect(Collectors.toList()); List<User> users = userMapper.selectBatchIds(userIds); String userNames = users.stream().map(User::getUserName).collect(Collectors.toList()).toString(); logger.error("resource is authorized to user {},suffix not allowed to be modified", userNames); putMsg(result,Status.RESOURCE_IS_AUTHORIZED,userNames);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
return result; } } } Date now = new Date(); resource.setAlias(name); resource.setFullName(fullName); resource.setDescription(desc); resource.setUpdateTime(now); if (file != null) { resource.setFileName(file.getOriginalFilename()); resource.setSize(file.getSize()); } try { resourcesMapper.updateById(resource); if (resource.isDirectory()) { List<Integer> childrenResource = listAllChildren(resource,false); if (CollectionUtils.isNotEmpty(childrenResource)) { String matcherFullName = Matcher.quoteReplacement(fullName); List<Resource> childResourceList = new ArrayList<>(); List<Resource> resourceList = resourcesMapper.listResourceByIds(childrenResource.toArray(new Integer[childrenResource.size()])); childResourceList = resourceList.stream().map(t -> { t.setFullName(t.getFullName().replaceFirst(originFullName, matcherFullName)); t.setUpdateTime(now); return t; }).collect(Collectors.toList()); resourcesMapper.batchUpdateResource(childResourceList); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
putMsg(result, Status.SUCCESS); Map<Object, Object> dataMap = new BeanMap(resource); Map<String, Object> resultMap = new HashMap<>(5); for (Map.Entry<Object, Object> entry: dataMap.entrySet()) { if (!Constants.CLASS.equalsIgnoreCase(entry.getKey().toString())) { resultMap.put(entry.getKey().toString(), entry.getValue()); } } result.setData(resultMap); } catch (Exception e) { logger.error(Status.UPDATE_RESOURCE_ERROR.getMsg(), e); throw new ServiceException(Status.UPDATE_RESOURCE_ERROR); } if (originResourceName.equals(name) && file == null) { return result; } if (file != null) { if (!upload(loginUser, fullName, file, type)) { logger.error("upload resource: {} file: {} failed.", name, file.getOriginalFilename()); putMsg(result, Status.HDFS_OPERATION_ERROR); throw new RuntimeException(String.format("upload resource: %s file: %s failed.", name, file.getOriginalFilename())); } if (!fullName.equals(originFullName)) { try { HadoopUtils.getInstance().delete(originHdfsFileName,false); } catch (IOException e) { logger.error(e.getMessage(),e); throw new RuntimeException(String.format("delete resource: %s failed.", originFullName));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} } return result; } String destHdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(),tenantCode,fullName); try { logger.info("start hdfs copy {} -> {}", originHdfsFileName, destHdfsFileName); HadoopUtils.getInstance().copy(originHdfsFileName, destHdfsFileName, true, true); } catch (Exception e) { logger.error(MessageFormat.format("hdfs copy {0} -> {1} fail", originHdfsFileName, destHdfsFileName), e); putMsg(result,Status.HDFS_COPY_FAIL); throw new ServiceException(Status.HDFS_COPY_FAIL); } return result; } /** * query resources list paging * * @param loginUser login user * @param type resource type * @param searchVal search value * @param pageNo page number * @param pageSize page size * @return resource list page */ public Map<String, Object> queryResourceListPaging(User loginUser, int direcotryId, ResourceType type, String searchVal, Integer pageNo, Integer pageSize) { HashMap<String, Object> result = new HashMap<>(5); Page<Resource> page = new Page(pageNo, pageSize); int userId = loginUser.getId();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
if (isAdmin(loginUser)) { userId= 0; } if (direcotryId != -1) { Resource directory = resourcesMapper.selectById(direcotryId); if (directory == null) { putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } } IPage<Resource> resourceIPage = resourcesMapper.queryResourcePaging(page, userId,direcotryId, type.ordinal(), searchVal); PageInfo pageInfo = new PageInfo<Resource>(pageNo, pageSize); pageInfo.setTotalCount((int)resourceIPage.getTotal()); pageInfo.setLists(resourceIPage.getRecords()); result.put(Constants.DATA_LIST, pageInfo); putMsg(result,Status.SUCCESS); return result; } /** * create direcoty * @param loginUser login user * @param fullName full name * @param type resource type * @param result Result */ private void createDirecotry(User loginUser,String fullName,ResourceType type,Result result){ String tenantCode = tenantMapper.queryById(loginUser.getTenantId()).getTenantCode(); String directoryName = HadoopUtils.getHdfsFileName(type,tenantCode,fullName);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
String resourceRootPath = HadoopUtils.getHdfsDir(type,tenantCode); try { if (!HadoopUtils.getInstance().exists(resourceRootPath)) { createTenantDirIfNotExists(tenantCode); } if (!HadoopUtils.getInstance().mkdir(directoryName)) { logger.error("create resource directory {} of hdfs failed",directoryName); putMsg(result,Status.HDFS_OPERATION_ERROR); throw new RuntimeException(String.format("create resource directory: %s failed.", directoryName)); } } catch (Exception e) { logger.error("create resource directory {} of hdfs failed",directoryName); putMsg(result,Status.HDFS_OPERATION_ERROR); throw new RuntimeException(String.format("create resource directory: %s failed.", directoryName)); } } /** * upload file to hdfs * * @param loginUser login user * @param fullName full name * @param file file */ private boolean upload(User loginUser, String fullName, MultipartFile file, ResourceType type) { String fileSuffix = FileUtils.suffix(file.getOriginalFilename()); String nameSuffix = FileUtils.suffix(fullName); if (!(StringUtils.isNotEmpty(fileSuffix) && fileSuffix.equalsIgnoreCase(nameSuffix))) { return false;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} String tenantCode = tenantMapper.queryById(loginUser.getTenantId()).getTenantCode(); String localFilename = FileUtils.getUploadFilename(tenantCode, UUID.randomUUID().toString()); String hdfsFilename = HadoopUtils.getHdfsFileName(type,tenantCode,fullName); String resourcePath = HadoopUtils.getHdfsDir(type,tenantCode); try { if (!HadoopUtils.getInstance().exists(resourcePath)) { createTenantDirIfNotExists(tenantCode); } org.apache.dolphinscheduler.api.utils.FileUtils.copyFile(file, localFilename); HadoopUtils.getInstance().copyLocalToHdfs(localFilename, hdfsFilename, true, true); } catch (Exception e) { logger.error(e.getMessage(), e); return false; } return true; } /** * query resource list * * @param loginUser login user * @param type resource type * @return resource list */ public Map<String, Object> queryResourceList(User loginUser, ResourceType type) { Map<String, Object> result = new HashMap<>(5);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
int userId = loginUser.getId(); if(isAdmin(loginUser)){ userId = 0; } List<Resource> allResourceList = resourcesMapper.queryResourceListAuthored(userId, type.ordinal(),0); Visitor resourceTreeVisitor = new ResourceTreeVisitor(allResourceList); result.put(Constants.DATA_LIST, resourceTreeVisitor.visit().getChildren()); putMsg(result,Status.SUCCESS); return result; } /** * query resource list * * @param loginUser login user * @param type resource type * @return resource list */ public Map<String, Object> queryResourceJarList(User loginUser, ResourceType type) { Map<String, Object> result = new HashMap<>(5); int userId = loginUser.getId(); if(isAdmin(loginUser)){ userId = 0; } List<Resource> allResourceList = resourcesMapper.queryResourceListAuthored(userId, type.ordinal(),0); List<Resource> resources = new ResourceFilter(".jar",new ArrayList<>(allResourceList)).filter(); Visitor resourceTreeVisitor = new ResourceTreeVisitor(resources); result.put(Constants.DATA_LIST, resourceTreeVisitor.visit().getChildren()); putMsg(result,Status.SUCCESS); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} /** * delete resource * * @param loginUser login user * @param resourceId resource id * @return delete result code * @throws Exception exception */ @Transactional(rollbackFor = Exception.class) public Result delete(User loginUser, int resourceId) throws Exception { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } Resource resource = resourcesMapper.selectById(resourceId); if (resource == null) { logger.error("resource file not exist, resource id {}", resourceId); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } if (!hasPerm(loginUser, resource.getUserId())) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } String tenantCode = getTenantCode(resource.getUserId(),result);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
if (StringUtils.isEmpty(tenantCode)){ return result; } List<Map<String, Object>> list = processDefinitionMapper.listResources(); Map<Integer, Set<Integer>> resourceProcessMap = ResourceProcessDefinitionUtils.getResourceProcessDefinitionMap(list); Set<Integer> resourceIdSet = resourceProcessMap.keySet(); List<Integer> allChildren = listAllChildren(resource,true); Integer[] needDeleteResourceIdArray = allChildren.toArray(new Integer[allChildren.size()]); if (resource.getType() == (ResourceType.UDF)) { List<UdfFunc> udfFuncs = udfFunctionMapper.listUdfByResourceId(needDeleteResourceIdArray); if (CollectionUtils.isNotEmpty(udfFuncs)) { logger.error("can't be deleted,because it is bound by UDF functions:{}",udfFuncs.toString()); putMsg(result,Status.UDF_RESOURCE_IS_BOUND,udfFuncs.get(0).getFuncName()); return result; } } if (resourceIdSet.contains(resource.getPid())) { logger.error("can't be deleted,because it is used of process definition"); putMsg(result, Status.RESOURCE_IS_USED); return result; } resourceIdSet.retainAll(allChildren); if (CollectionUtils.isNotEmpty(resourceIdSet)) { logger.error("can't be deleted,because it is used of process definition"); for (Integer resId : resourceIdSet) { logger.error("resource id:{} is used of process definition {}",resId,resourceProcessMap.get(resId)); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
putMsg(result, Status.RESOURCE_IS_USED); return result; } String hdfsFilename = HadoopUtils.getHdfsFileName(resource.getType(), tenantCode, resource.getFullName()); resourcesMapper.deleteIds(needDeleteResourceIdArray); resourceUserMapper.deleteResourceUserArray(0, needDeleteResourceIdArray); HadoopUtils.getInstance().delete(hdfsFilename, true); putMsg(result, Status.SUCCESS); return result; } /** * verify resource by name and type * @param loginUser login user * @param fullName resource full name * @param type resource type * @return true if the resource name not exists, otherwise return false */ public Result verifyResourceName(String fullName, ResourceType type,User loginUser) { Result result = new Result(); putMsg(result, Status.SUCCESS); if (checkResourceExists(fullName, 0, type.ordinal())) { logger.error("resource type:{} name:{} has exist, can't create again.", type, fullName); putMsg(result, Status.RESOURCE_EXIST); } else { Tenant tenant = tenantMapper.queryById(loginUser.getTenantId()); if(tenant != null){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
String tenantCode = tenant.getTenantCode(); try { String hdfsFilename = HadoopUtils.getHdfsFileName(type,tenantCode,fullName); if(HadoopUtils.getInstance().exists(hdfsFilename)){ logger.error("resource type:{} name:{} has exist in hdfs {}, can't create again.", type, fullName,hdfsFilename); putMsg(result, Status.RESOURCE_FILE_EXIST,hdfsFilename); } } catch (Exception e) { logger.error(e.getMessage(),e); putMsg(result,Status.HDFS_OPERATION_ERROR); } }else{ putMsg(result,Status.TENANT_NOT_EXIST); } } return result; } /** * verify resource by full name or pid and type * @param fullName resource full name * @param id resource id * @param type resource type * @return true if the resource full name or pid not exists, otherwise return false */ public Result queryResource(String fullName,Integer id,ResourceType type) { Result result = new Result(); if (StringUtils.isBlank(fullName) && id == null) { logger.error("You must input one of fullName and pid"); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} if (StringUtils.isNotBlank(fullName)) { List<Resource> resourceList = resourcesMapper.queryResource(fullName,type.ordinal()); if (CollectionUtils.isEmpty(resourceList)) { logger.error("resource file not exist, resource full name {} ", fullName); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } putMsg(result, Status.SUCCESS); result.setData(resourceList.get(0)); } else { Resource resource = resourcesMapper.selectById(id); if (resource == null) { logger.error("resource file not exist, resource id {}", id); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } Resource parentResource = resourcesMapper.selectById(resource.getPid()); if (parentResource == null) { logger.error("parent resource file not exist, resource id {}", id); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } putMsg(result, Status.SUCCESS); result.setData(parentResource); } return result; } /** * view resource file online
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
* * @param resourceId resource id * @param skipLineNum skip line number * @param limit limit * @return resource content */ public Result readResource(int resourceId, int skipLineNum, int limit) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } Resource resource = resourcesMapper.selectById(resourceId); if (resource == null) { logger.error("resource file not exist, resource id {}", resourceId); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } String nameSuffix = FileUtils.suffix(resource.getAlias()); String resourceViewSuffixs = FileUtils.getResourceViewSuffixs(); if (StringUtils.isNotEmpty(resourceViewSuffixs)) { List<String> strList = Arrays.asList(resourceViewSuffixs.split(",")); if (!strList.contains(nameSuffix)) { logger.error("resource suffix {} not support view, resource id {}", nameSuffix, resourceId); putMsg(result, Status.RESOURCE_SUFFIX_NOT_SUPPORT_VIEW); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} } String tenantCode = getTenantCode(resource.getUserId(),result); if (StringUtils.isEmpty(tenantCode)){ return result; } String hdfsFileName = HadoopUtils.getHdfsResourceFileName(tenantCode, resource.getFullName()); logger.info("resource hdfs path is {} ", hdfsFileName); try { if(HadoopUtils.getInstance().exists(hdfsFileName)){ List<String> content = HadoopUtils.getInstance().catFile(hdfsFileName, skipLineNum, limit); putMsg(result, Status.SUCCESS); Map<String, Object> map = new HashMap<>(); map.put(ALIAS, resource.getAlias()); map.put(CONTENT, String.join("\n", content)); result.setData(map); }else{ logger.error("read file {} not exist in hdfs", hdfsFileName); putMsg(result, Status.RESOURCE_FILE_NOT_EXIST,hdfsFileName); } } catch (Exception e) { logger.error("Resource {} read failed", hdfsFileName, e); putMsg(result, Status.HDFS_OPERATION_ERROR); } return result; } /** * create resource file online *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
* @param loginUser login user * @param type resource type * @param fileName file name * @param fileSuffix file suffix * @param desc description * @param content content * @return create result code */ @Transactional(rollbackFor = Exception.class) public Result onlineCreateResource(User loginUser, ResourceType type, String fileName, String fileSuffix, String desc, String content,int pid,String currentDirectory) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } String nameSuffix = fileSuffix.trim(); String resourceViewSuffixs = FileUtils.getResourceViewSuffixs(); if (StringUtils.isNotEmpty(resourceViewSuffixs)) { List<String> strList = Arrays.asList(resourceViewSuffixs.split(",")); if (!strList.contains(nameSuffix)) { logger.error("resouce suffix {} not support create", nameSuffix); putMsg(result, Status.RESOURCE_SUFFIX_NOT_SUPPORT_VIEW); return result; } } String name = fileName.trim() + "." + nameSuffix; String fullName = currentDirectory.equals("/") ? String.format("%s%s",currentDirectory,name):String.format("%s/%s",currentDirectory,name);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
result = verifyResourceName(fullName,type,loginUser); if (!result.getCode().equals(Status.SUCCESS.getCode())) { return result; } Date now = new Date(); Resource resource = new Resource(pid,name,fullName,false,desc,name,loginUser.getId(),type,content.getBytes().length,now,now); resourcesMapper.insert(resource); putMsg(result, Status.SUCCESS); Map<Object, Object> dataMap = new BeanMap(resource); Map<String, Object> resultMap = new HashMap<>(); for (Map.Entry<Object, Object> entry: dataMap.entrySet()) { if (!Constants.CLASS.equalsIgnoreCase(entry.getKey().toString())) { resultMap.put(entry.getKey().toString(), entry.getValue()); } } result.setData(resultMap); String tenantCode = tenantMapper.queryById(loginUser.getTenantId()).getTenantCode(); result = uploadContentToHdfs(fullName, tenantCode, content); if (!result.getCode().equals(Status.SUCCESS.getCode())) { throw new RuntimeException(result.getMsg()); } return result; } /** * updateProcessInstance resource * * @param resourceId resource id * @param content content * @return update result cod
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
*/ @Transactional(rollbackFor = Exception.class) public Result updateResourceContent(int resourceId, String content) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } Resource resource = resourcesMapper.selectById(resourceId); if (resource == null) { logger.error("read file not exist, resource id {}", resourceId); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } String nameSuffix = FileUtils.suffix(resource.getAlias()); String resourceViewSuffixs = FileUtils.getResourceViewSuffixs(); if (StringUtils.isNotEmpty(resourceViewSuffixs)) { List<String> strList = Arrays.asList(resourceViewSuffixs.split(",")); if (!strList.contains(nameSuffix)) { logger.error("resource suffix {} not support updateProcessInstance, resource id {}", nameSuffix, resourceId); putMsg(result, Status.RESOURCE_SUFFIX_NOT_SUPPORT_VIEW); return result; } } String tenantCode = getTenantCode(resource.getUserId(),result); if (StringUtils.isEmpty(tenantCode)){ return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} resource.setSize(content.getBytes().length); resource.setUpdateTime(new Date()); resourcesMapper.updateById(resource); result = uploadContentToHdfs(resource.getFullName(), tenantCode, content); if (!result.getCode().equals(Status.SUCCESS.getCode())) { throw new RuntimeException(result.getMsg()); } return result; } /** * @param resourceName resource name * @param tenantCode tenant code * @param content content * @return result */ private Result uploadContentToHdfs(String resourceName, String tenantCode, String content) { Result result = new Result(); String localFilename = ""; String hdfsFileName = ""; try { localFilename = FileUtils.getUploadFilename(tenantCode, UUID.randomUUID().toString()); if (!FileUtils.writeContent2File(content, localFilename)) { logger.error("file {} fail, content is {}", localFilename, content); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } hdfsFileName = HadoopUtils.getHdfsResourceFileName(tenantCode, resourceName);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
String resourcePath = HadoopUtils.getHdfsResDir(tenantCode); logger.info("resource hdfs path is {} ", hdfsFileName); HadoopUtils hadoopUtils = HadoopUtils.getInstance(); if (!hadoopUtils.exists(resourcePath)) { createTenantDirIfNotExists(tenantCode); } if (hadoopUtils.exists(hdfsFileName)) { hadoopUtils.delete(hdfsFileName, false); } hadoopUtils.copyLocalToHdfs(localFilename, hdfsFileName, true, true); } catch (Exception e) { logger.error(e.getMessage(), e); result.setCode(Status.HDFS_OPERATION_ERROR.getCode()); result.setMsg(String.format("copy %s to hdfs %s fail", localFilename, hdfsFileName)); return result; } putMsg(result, Status.SUCCESS); return result; } /** * download file * * @param resourceId resource id * @return resource content * @throws Exception exception */ public org.springframework.core.io.Resource downloadResource(int resourceId) throws Exception { if (!PropertyUtils.getResUploadStartupState()){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); throw new RuntimeException("hdfs not startup"); } Resource resource = resourcesMapper.selectById(resourceId); if (resource == null) { logger.error("download file not exist, resource id {}", resourceId); return null; } if (resource.isDirectory()) { logger.error("resource id {} is directory,can't download it", resourceId); throw new RuntimeException("cant't download directory"); } int userId = resource.getUserId(); User user = userMapper.selectById(userId); if(user == null){ logger.error("user id {} not exists", userId); throw new RuntimeException(String.format("resource owner id %d not exist",userId)); } Tenant tenant = tenantMapper.queryById(user.getTenantId()); if(tenant == null){ logger.error("tenant id {} not exists", user.getTenantId()); throw new RuntimeException(String.format("The tenant id %d of resource owner not exist",user.getTenantId())); } String tenantCode = tenant.getTenantCode(); String hdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(), tenantCode, resource.getFullName()); String localFileName = FileUtils.getDownloadFilename(resource.getAlias()); logger.info("resource hdfs path is {} ", hdfsFileName); HadoopUtils.getInstance().copyHdfsToLocal(hdfsFileName, localFileName, false, true); return org.apache.dolphinscheduler.api.utils.FileUtils.file2Resource(localFileName); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
/** * list all file * * @param loginUser login user * @param userId user id * @return unauthorized result code */ public Map<String, Object> authorizeResourceTree(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(); if (checkAdmin(loginUser, result)) { return result; } List<Resource> resourceList = resourcesMapper.queryResourceExceptUserId(userId); List<ResourceComponent> list ; if (CollectionUtils.isNotEmpty(resourceList)) { Visitor visitor = new ResourceTreeVisitor(resourceList); list = visitor.visit().getChildren(); }else { list = new ArrayList<>(0); } result.put(Constants.DATA_LIST, list); putMsg(result,Status.SUCCESS); return result; } /** * unauthorized file * * @param loginUser login user * @param userId user id * @return unauthorized result code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
*/ public Map<String, Object> unauthorizedFile(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(); if (checkAdmin(loginUser, result)) { return result; } List<Resource> resourceList = resourcesMapper.queryResourceExceptUserId(userId); List<Resource> list ; if (resourceList != null && resourceList.size() > 0) { Set<Resource> resourceSet = new HashSet<>(resourceList); List<Resource> authedResourceList = resourcesMapper.queryAuthorizedResourceList(userId); getAuthorizedResourceList(resourceSet, authedResourceList); list = new ArrayList<>(resourceSet); }else { list = new ArrayList<>(0); } Visitor visitor = new ResourceTreeVisitor(list); result.put(Constants.DATA_LIST, visitor.visit().getChildren()); putMsg(result,Status.SUCCESS); return result; } /** * unauthorized udf function * * @param loginUser login user * @param userId user id * @return unauthorized result code */ public Map<String, Object> unauthorizedUDFFunction(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(5);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
if (checkAdmin(loginUser, result)) { return result; } List<UdfFunc> udfFuncList = udfFunctionMapper.queryUdfFuncExceptUserId(userId); List<UdfFunc> resultList = new ArrayList<>(); Set<UdfFunc> udfFuncSet = null; if (CollectionUtils.isNotEmpty(udfFuncList)) { udfFuncSet = new HashSet<>(udfFuncList); List<UdfFunc> authedUDFFuncList = udfFunctionMapper.queryAuthedUdfFunc(userId); getAuthorizedResourceList(udfFuncSet, authedUDFFuncList); resultList = new ArrayList<>(udfFuncSet); } result.put(Constants.DATA_LIST, resultList); putMsg(result,Status.SUCCESS); return result; } /** * authorized udf function * * @param loginUser login user * @param userId user id * @return authorized result code */ public Map<String, Object> authorizedUDFFunction(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(); if (checkAdmin(loginUser, result)) { return result; } List<UdfFunc> udfFuncs = udfFunctionMapper.queryAuthedUdfFunc(userId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
result.put(Constants.DATA_LIST, udfFuncs); putMsg(result,Status.SUCCESS); return result; } /** * authorized file * * @param loginUser login user * @param userId user id * @return authorized result */ public Map<String, Object> authorizedFile(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(5); if (checkAdmin(loginUser, result)){ return result; } List<Resource> authedResources = resourcesMapper.queryAuthorizedResourceList(userId); Visitor visitor = new ResourceTreeVisitor(authedResources); logger.info(JSON.toJSONString(visitor.visit(), SerializerFeature.SortField)); String jsonTreeStr = JSON.toJSONString(visitor.visit().getChildren(), SerializerFeature.SortField); logger.info(jsonTreeStr); result.put(Constants.DATA_LIST, visitor.visit().getChildren()); putMsg(result,Status.SUCCESS); return result; } /** * get authorized resource list * * @param resourceSet resource set * @param authedResourceList authorized resource list
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
*/ private void getAuthorizedResourceList(Set<?> resourceSet, List<?> authedResourceList) { Set<?> authedResourceSet = null; if (CollectionUtils.isNotEmpty(authedResourceList)) { authedResourceSet = new HashSet<>(authedResourceList); resourceSet.removeAll(authedResourceSet); } } /** * get tenantCode by UserId * * @param userId user id * @param result return result * @return */ private String getTenantCode(int userId,Result result){ User user = userMapper.selectById(userId); if (user == null) { logger.error("user {} not exists", userId); putMsg(result, Status.USER_NOT_EXIST,userId); return null; } Tenant tenant = tenantMapper.queryById(user.getTenantId()); if (tenant == null){ logger.error("tenant not exists"); putMsg(result, Status.TENANT_NOT_EXIST); return null; } return tenant.getTenantCode(); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
/** * list all children id * @param resource resource * @param containSelf whether add self to children list * @return all children id */ List<Integer> listAllChildren(Resource resource,boolean containSelf){ List<Integer> childList = new ArrayList<>(); if (resource.getId() != -1 && containSelf) { childList.add(resource.getId()); } if(resource.isDirectory()){ listAllChildren(resource.getId(),childList); } return childList; } /** * list all children id * @param resourceId resource id * @param childList child list */ void listAllChildren(int resourceId,List<Integer> childList){ List<Integer> children = resourcesMapper.listChildren(resourceId); for(int chlidId:children){ childList.add(chlidId); listAllChildren(chlidId,childList); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.dao.mapper; import org.apache.dolphinscheduler.dao.entity.UdfFunc; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Param; import java.util.List; /** * udf function mapper interface */ public interface UdfFuncMapper extends BaseMapper<UdfFunc> {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapper.java
/** * select udf by id * @param id udf id * @return UdfFunc */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapper.java
UdfFunc selectUdfById(@Param("id") int id); /** * query udf function by ids and function name * @param ids ids * @param funcNames funcNames * @return udf function list */ List<UdfFunc> queryUdfByIdStr(@Param("ids") int[] ids, @Param("funcNames") String funcNames); /** * udf function page * @param page page * @param userId userId * @param searchVal searchVal * @return udf function IPage */ IPage<UdfFunc> queryUdfFuncPaging(IPage<UdfFunc> page, @Param("userId") int userId, @Param("searchVal") String searchVal); /** * query udf function by type * @param userId userId * @param type type * @return udf function list */ List<UdfFunc> getUdfFuncByType(@Param("userId") int userId, @Param("type") Integer type); /** * query udf function except userId * @param userId userId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapper.java
* @return udf function list */ List<UdfFunc> queryUdfFuncExceptUserId(@Param("userId") int userId); /** * query authed udf function * @param userId userId * @return udf function list */ List<UdfFunc> queryAuthedUdfFunc(@Param("userId") int userId); /** * list authorized UDF function * @param userId userId * @param udfIds UDF function id array * @return UDF function list */ <T> List<UdfFunc> listAuthorizedUdfFunc (@Param("userId") int userId,@Param("udfIds")T[] udfIds); /** * list UDF by resource id * @param resourceIds resource id array * @return UDF function list */ List<UdfFunc> listUdfByResourceId(@Param("resourceIds") Integer[] resourceIds); /** * list authorized UDF by resource id * @param resourceIds resource id array * @return UDF function list */ List<UdfFunc> listAuthorizedUdfByResourceId(@Param("userId") int userId,@Param("resourceIds") int[] resourceIds); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
* * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.dao.mapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.dolphinscheduler.common.enums.UdfType; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.dao.entity.UDFUser; import org.apache.dolphinscheduler.dao.entity.UdfFunc; import org.apache.dolphinscheduler.dao.entity.User; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; import java.util.Date; import java.util.List; import static java.util.stream.Collectors.toList; @RunWith(SpringRunner.class)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
@SpringBootTest @Transactional @Rollback(true) public class UdfFuncMapperTest { @Autowired private UserMapper userMapper; @Autowired UdfFuncMapper udfFuncMapper; @Autowired UDFUserMapper udfUserMapper; /** * insert one udf * @return UdfFunc */ private UdfFunc insertOne(){ UdfFunc udfFunc = new UdfFunc(); udfFunc.setUserId(1); udfFunc.setFuncName("dolphin_udf_func"); udfFunc.setClassName("org.apache.dolphinscheduler.test.mr"); udfFunc.setType(UdfType.HIVE); udfFunc.setResourceId(1); udfFunc.setResourceName("dolphin_resource"); udfFunc.setCreateTime(new Date()); udfFunc.setUpdateTime(new Date());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
udfFuncMapper.insert(udfFunc); return udfFunc; } /** * insert one udf * @return */ private UdfFunc insertOne(User user){ UdfFunc udfFunc = new UdfFunc(); udfFunc.setUserId(user.getId()); udfFunc.setFuncName("dolphin_udf_func"); udfFunc.setClassName("org.apache.dolphinscheduler.test.mr"); udfFunc.setType(UdfType.HIVE); udfFunc.setResourceId(1); udfFunc.setResourceName("dolphin_resource"); udfFunc.setCreateTime(new Date()); udfFunc.setUpdateTime(new Date()); udfFuncMapper.insert(udfFunc); return udfFunc; } /** * insert one user * @return User */ private User insertOneUser(){ User user = new User(); user.setUserName("user1"); user.setUserPassword("1"); user.setEmail("[email protected]"); user.setUserType(UserType.GENERAL_USER);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
user.setCreateTime(new Date()); user.setTenantId(1); user.setUpdateTime(new Date()); userMapper.insert(user); return user; } /** * insert one user * @return User */ private User insertOneUser(String userName){ User user = new User(); user.setUserName(userName); user.setUserPassword("1"); user.setEmail("[email protected]"); user.setUserType(UserType.GENERAL_USER); user.setCreateTime(new Date()); user.setTenantId(1); user.setUpdateTime(new Date()); userMapper.insert(user); return user; } /** * insert UDFUser * @param user user * @param udfFunc udf func * @return UDFUser */ private UDFUser insertOneUDFUser(User user,UdfFunc udfFunc){ UDFUser udfUser = new UDFUser();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
udfUser.setUdfId(udfFunc.getId()); udfUser.setUserId(user.getId()); udfUser.setCreateTime(new Date()); udfUser.setUpdateTime(new Date()); udfUserMapper.insert(udfUser); return udfUser; } /** * create general user * @return User */ private User createGeneralUser(String userName){ User user = new User(); user.setUserName(userName); user.setUserPassword("1"); user.setEmail("[email protected]"); user.setUserType(UserType.GENERAL_USER); user.setCreateTime(new Date()); user.setTenantId(1); user.setUpdateTime(new Date()); userMapper.insert(user); return user; } /** * test update */ @Test public void testUpdate(){ UdfFunc udfFunc = insertOne();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
udfFunc.setResourceName("dolphin_resource_update"); udfFunc.setResourceId(2); udfFunc.setClassName("org.apache.dolphinscheduler.test.mrUpdate"); udfFunc.setUpdateTime(new Date()); int update = udfFuncMapper.updateById(udfFunc); Assert.assertEquals(update, 1); } /** * test delete */ @Test public void testDelete(){ UdfFunc udfFunc = insertOne(); int delete = udfFuncMapper.deleteById(udfFunc.getId()); Assert.assertEquals(delete, 1); } /** * test query */ @Test public void testQuery(){ UdfFunc udfFunc = insertOne(); List<UdfFunc> udfFuncList = udfFuncMapper.selectList(null); Assert.assertNotEquals(udfFuncList.size(), 0); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
/** * test query udf by ids */ @Test public void testQueryUdfByIdStr() { UdfFunc udfFunc = insertOne(); UdfFunc udfFunc1 = insertOne(); int[] idArray = new int[]{udfFunc.getId(),udfFunc1.getId()}; List<UdfFunc> udfFuncList = udfFuncMapper.queryUdfByIdStr(idArray,""); Assert.assertNotEquals(udfFuncList.size(), 0); } /** * test page */ @Test public void testQueryUdfFuncPaging() { User user = insertOneUser(); UdfFunc udfFunc = insertOne(user); Page<UdfFunc> page = new Page(1,3); IPage<UdfFunc> udfFuncIPage = udfFuncMapper.queryUdfFuncPaging(page,user.getId(),""); Assert.assertNotEquals(udfFuncIPage.getTotal(), 0); } /** * test get udffunc by type
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
*/ @Test public void testGetUdfFuncByType() { User user = insertOneUser(); UdfFunc udfFunc = insertOne(user); List<UdfFunc> udfFuncList = udfFuncMapper.getUdfFuncByType(user.getId(), udfFunc.getType().ordinal()); Assert.assertNotEquals(udfFuncList.size(), 0); } /** * test query udffunc expect userId */ @Test public void testQueryUdfFuncExceptUserId() { User user1 = insertOneUser(); User user2 = insertOneUser("user2"); UdfFunc udfFunc1 = insertOne(user1); UdfFunc udfFunc2 = insertOne(user2); List<UdfFunc> udfFuncList = udfFuncMapper.queryUdfFuncExceptUserId(user1.getId()); Assert.assertNotEquals(udfFuncList.size(), 0); } /** * test query authed udffunc */ @Test public void testQueryAuthedUdfFunc() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,463
[Bug][api] rename the udf resource file associated with the udf function, Failed to execute hive task
1. Rename the udf resource file associated with the udf function ![image](https://user-images.githubusercontent.com/55787491/89854573-ceef0580-dbc6-11ea-90d4-2b4587d37f0f.png) ![image](https://user-images.githubusercontent.com/55787491/89854587-d9a99a80-dbc6-11ea-8b1a-f0b189824287.png) 2. Executing hive task is fail ![image](https://user-images.githubusercontent.com/55787491/89854496-9bac7680-dbc6-11ea-8ab4-e6ab2bd08ed2.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3463
https://github.com/apache/dolphinscheduler/pull/3482
a678c827600d44623f30311574b8226c1c59ace2
c8322482bbd021a89c407809abfcdd50cf3b2dc6
"2020-08-11T03:37:09Z"
java
"2020-08-13T08:19:11Z"
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/UdfFuncMapperTest.java
User user = insertOneUser(); UdfFunc udfFunc = insertOne(user); UDFUser udfUser = insertOneUDFUser(user, udfFunc); List<UdfFunc> udfFuncList = udfFuncMapper.queryAuthedUdfFunc(user.getId()); Assert.assertNotEquals(udfFuncList.size(), 0); } @Test public void testListAuthorizedUdfFunc(){ User generalUser1 = createGeneralUser("user1"); User generalUser2 = createGeneralUser("user2"); UdfFunc udfFunc = insertOne(generalUser1); UdfFunc unauthorizdUdfFunc = insertOne(generalUser2); Integer[] udfFuncIds = new Integer[]{udfFunc.getId(),unauthorizdUdfFunc.getId()}; List<UdfFunc> authorizedUdfFunc = udfFuncMapper.listAuthorizedUdfFunc(generalUser1.getId(), udfFuncIds); Assert.assertEquals(generalUser1.getId(),udfFunc.getUserId()); Assert.assertNotEquals(generalUser1.getId(),unauthorizdUdfFunc.getUserId()); Assert.assertFalse(authorizedUdfFunc.stream().map(t -> t.getId()).collect(toList()).containsAll(Arrays.asList(udfFuncIds))); insertOneUDFUser(generalUser1,unauthorizdUdfFunc); authorizedUdfFunc = udfFuncMapper.listAuthorizedUdfFunc(generalUser1.getId(), udfFuncIds); Assert.assertTrue(authorizedUdfFunc.stream().map(t -> t.getId()).collect(toList()).containsAll(Arrays.asList(udfFuncIds))); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
/* * Licnsd o h Apach Sofwar Foundaion (ASF) undr on or mor * conribuor licns agrmns. S h NOTICE fil disribud wih * his work for addiional informaion rgarding copyrigh ownrship. * Th ASF licnss his fil o You undr h Apach Licns, Vrsion 2.0 * (h "Licns"); you may no us his fil xcp in complianc wih * h Licns. You may obain a copy of h Licns a * * hp://www.apach.org/licnss/LICENSE-2.0 * * Unlss rquird by applicabl law or agrd o in wriing, sofwar * disribud undr h Licns is disribud on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ihr xprss or implid. * S h Licns for h spcific languag govrning prmissions and * limiaions undr h Licns. */ packag org.apach.dolphinschdulr.srvr.masr.runnr; impor com.alibaba.fasjson.JSON; impor com.googl.common.collc.Liss; impor org.apach.commons.io.FilUils; impor org.apach.dolphinschdulr.common.Consans; impor org.apach.dolphinschdulr.common.nums.*; impor org.apach.dolphinschdulr.common.graph.DAG;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
impor org.apach.dolphinschdulr.common.modl.TaskNod; impor org.apach.dolphinschdulr.common.modl.TaskNodRlaion; impor org.apach.dolphinschdulr.common.procss.ProcssDag; impor org.apach.dolphinschdulr.common.ask.condiions.CondiionsParamrs; impor org.apach.dolphinschdulr.common.hrad.Soppr; impor org.apach.dolphinschdulr.common.hrad.ThradUils; impor org.apach.dolphinschdulr.common.uils.*; impor org.apach.dolphinschdulr.dao.niy.ProcssInsanc; impor org.apach.dolphinschdulr.dao.niy.Schdul; impor org.apach.dolphinschdulr.dao.niy.TaskInsanc; impor org.apach.dolphinschdulr.dao.uils.DagHlpr; impor org.apach.dolphinschdulr.rmo.NyRmoingClin; impor org.apach.dolphinschdulr.srvr.masr.config.MasrConfig; impor org.apach.dolphinschdulr.srvr.uils.AlrManagr; impor org.apach.dolphinschdulr.srvic.ban.SpringApplicaionConx; impor org.apach.dolphinschdulr.srvic.procss.ProcssSrvic; impor org.apach.dolphinschdulr.srvic.quarz.cron.CronUils; impor org.slf4j.Loggr; impor org.slf4j.LoggrFacory; impor java.io.Fil; impor java.io.IOExcpion; impor java.uil.*; impor java.uil.concurrn.ConcurrnHashMap; impor java.uil.concurrn.ExcuorSrvic; impor java.uil.concurrn.Fuur; impor saic org.apach.dolphinschdulr.common.Consans.*; /** * masr xc hrad,spli dag */ public class MasrExcThrad implmns Runnabl {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
/** * loggr of MasrExcThrad */ priva saic final Loggr loggr = LoggrFacory.gLoggr(MasrExcThrad.class); /** * procss insanc */ priva ProcssInsanc procssInsanc; /** * runing TaskNod */ priva final Map<MasrBasTaskExcThrad,Fuur<Boolan>> acivTaskNod = nw ConcurrnHashMap<>(); /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* ask xc srvic */ priva final ExcuorSrvic askExcSrvic; /** * submi failur nods */ priva boolan askFaildSubmi = fals; /** * rcovr nod id lis */ priva Lis<TaskInsanc> rcovrNodIdLis = nw ArrayLis<>(); /** * rror ask lis */ priva Map<Sring,TaskInsanc> rrorTaskLis = nw ConcurrnHashMap<>(); /** * compl ask lis */ priva Map<Sring, TaskInsanc> complTaskLis = nw ConcurrnHashMap<>(); /** * rady o submi ask lis */ priva Map<Sring, TaskInsanc> radyToSubmiTaskLis = nw ConcurrnHashMap<>(); /** * dpnd faild ask map */ priva Map<Sring, TaskInsanc> dpndFaildTask = nw ConcurrnHashMap<>(); /** * forbiddn ask map */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva Map<Sring, TaskNod> forbiddnTaskLis = nw ConcurrnHashMap<>(); /** * skip ask map */ priva Map<Sring, TaskNod> skipTaskNodLis = nw ConcurrnHashMap<>(); /** * rcovr olranc faul ask lis */ priva Lis<TaskInsanc> rcovrTolrancFaulTaskLis = nw ArrayLis<>(); /** * alr managr */ priva AlrManagr alrManagr = nw AlrManagr(); /** * h objc of DAG */ priva DAG<Sring,TaskNod,TaskNodRlaion> dag; /** * procss srvic */ priva ProcssSrvic procssSrvic; /** * masr config */ priva MasrConfig masrConfig; /** * */ priva NyRmoingClin nyRmoingClin; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* consrucor of MasrExcThrad * @param procssInsanc procssInsanc * @param procssSrvic procssSrvic * @param nyRmoingClin nyRmoingClin */ public MasrExcThrad(ProcssInsanc procssInsanc, ProcssSrvic procssSrvic, NyRmoingClin nyRmoingClin){ his.procssSrvic = procssSrvic; his.procssInsanc = procssInsanc; his.masrConfig = SpringApplicaionConx.gBan(MasrConfig.class); in masrTaskExcNum = masrConfig.gMasrExcTaskNum(); his.askExcSrvic = ThradUils.nwDamonFixdThradExcuor("Masr-Task-Exc-Thrad", masrTaskExcNum); his.nyRmoingClin = nyRmoingClin; } @Ovrrid public void run() { if (procssInsanc == null){ loggr.info("procss insanc is no xiss"); rurn; } if (procssInsanc.gSa().ypIsFinishd()){ loggr.info("procss insanc is don : {}",procssInsanc.gId()); rurn; } ry { if (procssInsanc.isComplmnDaa() && Flag.NO == procssInsanc.gIsSubProcss()){ xcuComplmnProcss();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
}ls{ xcuProcss(); } }cach (Excpion ){ loggr.rror("masr xc hrad xcpion", ); loggr.rror("procss xcu faild, procss id:{}", procssInsanc.gId()); procssInsanc.sSa(ExcuionSaus.FAILURE); procssInsanc.sEndTim(nw Da()); procssSrvic.updaProcssInsanc(procssInsanc); }finally { askExcSrvic.shudown(); posHandl(); } } /** * xcu procss * @hrows Excpion xcpion */ priva void xcuProcss() hrows Excpion { prparProcss(); runProcss(); ndProcss(); } /** * xcu complmn procss * @hrows Excpion xcpion */ priva void xcuComplmnProcss() hrows Excpion {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
Map<Sring, Sring> cmdParam = JSONUils.oMap(procssInsanc.gCommandParam()); Da sarDa = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_START_DATE)); Da ndDa = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_END_DATE)); procssSrvic.savProcssInsanc(procssInsanc); in procssDfiniionId = procssInsanc.gProcssDfiniionId(); Lis<Schdul> schduls = procssSrvic.quryRlasSchdulrLisByProcssDfiniionId(procssDfiniionId); Lis<Da> lisDa = Liss.nwLinkdLis(); !CollcionUils.isEmpy(schduls)){ for (Schdul schdul : schduls) { lisDa.addAll(CronUils.gSlfFirDaLis(sarDa, ndDa, schdul.gCronab())); } } Iraor<Da> iraor = null; Da schdulDa = null; !CollcionUils.isEmpy(lisDa)) { iraor = lisDa.iraor(); schdulDa = iraor.nx(); procssInsanc.sSchdulTim(schdulDa); procssSrvic.updaProcssInsanc(procssInsanc); }ls{ schdulDa = procssInsanc.gSchdulTim(); schdulDa == null){ schdulDa = sarDa; } } whil(Soppr.isRunning()){ loggr.info("procss {} sar o complmn {} daa", procssInsanc.gId(), DaUils.daToSring(schdulDa));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
prparProcss(); dag == null){ loggr.rror("procss {} dag is null, plas chck ou paramrs", procssInsanc.gId()); procssInsanc.sSa(ExcuionSaus.SUCCESS); procssSrvic.updaProcssInsanc(procssInsanc); rurn; } runProcss(); ndProcss(); !procssInsanc.gSa().ypIsSuccss()){ loggr.info("procss {} sa {}, complmn no complly!", procssInsanc.gId(), procssInsanc.gSa()); brak; } // null == iraor){ // schdulDa = DaUils.gSomDay(schdulDa, 1); schdulDa.afr(ndDa)){ // loggr.info("procss {} complmn complly!", procssInsanc.gId()); brak; } }ls{ // !iraor.hasNx()){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
// loggr.info("procss {} complmn complly!", procssInsanc.gId()); brak; } schdulDa = iraor.nx(); } // flow nd // procssInsanc.sSchdulTim(schdulDa); cmdParam.conainsKy(Consans.CMDPARAM_RECOVERY_START_NODE_STRING)){ cmdParam.rmov(Consans.CMDPARAM_RECOVERY_START_NODE_STRING); procssInsanc.sCommandParam(JSONUils.oJson(cmdParam)); } procssInsanc.sSa(ExcuionSaus.RUNNING_EXEUTION); procssInsanc.sGlobalParams(ParamrUils.curingGlobalParams( procssInsanc.gProcssDfiniion().gGlobalParamMap(), procssInsanc.gProcssDfiniion().gGlobalParamLis(), CommandTyp.COMPLEMENT_DATA, procssInsanc.gSchdulTim())); procssInsanc.sId(0); procssInsanc.sSarTim(nw Da()); procssInsanc.sEndTim(null); procssSrvic.savProcssInsanc(procssInsanc); } } /** * prpar procss paramr * @hrows Excpion xcpion */ priva void prparProcss() hrows Excpion { //
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
iniTaskQuu(); // buildFlowDag(); loggr.info("prpar procss :{} nd", procssInsanc.gId()); } /** * procss nd handl */ priva void ndProcss() { procssInsanc.sEndTim(nw Da()); procssSrvic.updaProcssInsanc(procssInsanc); procssInsanc.gSa().ypIsWaiingThrad()){ procssSrvic.craRcovryWaiingThradCommand(null, procssInsanc); } Lis<TaskInsanc> askInsancs = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId()); alrManagr.sndAlrProcssInsanc(procssInsanc, askInsancs); } /** * * @hrows Excpion xcpion */ priva void buildFlowDag() hrows Excpion { rcovrNodIdLis = gSarTaskInsancLis(procssInsanc.gCommandParam()); forbiddnTaskLis = DagHlpr.gForbiddnTaskNodMaps(procssInsanc.gProcssInsancJson()); // Lis<Sring> rcovryNamLis = gRcovryNodNamLis(); Lis<Sring> sarNodNamLis = parsSarNodNam(procssInsanc.gCommandParam()); ProcssDag procssDag = gnraFlowDag(procssInsanc.gProcssInsancJson(), sarNodNamLis, rcovryNamLis, procssInsanc.gTaskDpndTyp()); procssDag == null){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
loggr.rror("procssDag is null"); rurn; } // dag = DagHlpr.buildDagGraph(procssDag); } /** * */ priva void iniTaskQuu(){ askFaildSubmi = fals; acivTaskNod.clar(); dpndFaildTask.clar(); complTaskLis.clar(); rrorTaskLis.clar(); Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId()); for(TaskInsanc ask : askInsancLis){ ask.isTaskCompl()){ complTaskLis.pu(ask.gNam(), ask); } ask.gSa().ypIsFailur() && !ask.askCanRry()){ rrorTaskLis.pu(ask.gNam(), ask); } } } /** * procss pos handl */ priva void posHandl() { loggr.info("dvlop mod is: {}", CommonUils.isDvlopMod());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
if (!CommonUils.isDvlopMod()) { // Sring xcLocalPah = org.apach.dolphinschdulr.common.uils.FilUils .gProcssExcDir(procssInsanc.gProcssDfiniion().gProjcId(), procssInsanc.gProcssDfiniionId(), procssInsanc.gId()); ry { FilUils.dlDircory(nw Fil(xcLocalPah)); } cach (IOExcpion ) { loggr.rror("dl xc dir faild ", ); } } } /** * submi ask o xcu * @param askInsanc ask insanc * @rurn TaskInsanc */ priva TaskInsanc submiTaskExc(TaskInsanc askInsanc) { MasrBasTaskExcThrad absracExcThrad = null; askInsanc.isSubProcss()){ absracExcThrad = nw SubProcssTaskExcThrad(askInsanc); }ls askInsanc.isDpndTask()){ absracExcThrad = nw DpndnTaskExcThrad(askInsanc); }ls askInsanc.isCondiionsTask()){ absracExcThrad = nw CondiionsTaskExcThrad(askInsanc); }ls { absracExcThrad = nw MasrTaskExcThrad(askInsanc); } Fuur<Boolan> fuur = askExcSrvic.submi(absracExcThrad);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
acivTaskNod.puIfAbsn(absracExcThrad, fuur); rurn absracExcThrad.gTaskInsanc(); } /** * find ask insanc in db. * in cas submi mor han on sam nam ask in h sam im. * @param askNam ask nam * @rurn TaskInsanc */ priva TaskInsanc findTaskIfExiss(Sring askNam){ Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(his.procssInsanc.gId()); for(TaskInsanc askInsanc : askInsancLis){ askInsanc.gNam().quals(askNam)){ rurn askInsanc; } } rurn null; } /** * ncapsulaion ask * @param procssInsanc procss insanc * @param nodNam nod nam * @rurn TaskInsanc */ priva TaskInsanc craTaskInsanc(ProcssInsanc procssInsanc, Sring nodNam, TaskNod askNod) { TaskInsanc askInsanc = findTaskIfExiss(nodNam); askInsanc == null){ askInsanc = nw TaskInsanc(); // ask nam
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
askInsanc.sNam(nodNam); // askInsanc.sProcssDfiniionId(procssInsanc.gProcssDfiniionId()); // askInsanc.sSa(ExcuionSaus.SUBMITTED_SUCCESS); // askInsanc.sProcssInsancId(procssInsanc.gId()); // askInsanc.sTaskJson(JSON.oJSONSring(askNod)); // askInsanc.sTaskTyp(askNod.gTyp()); // askInsanc.sAlrFlag(Flag.NO); // askInsanc.sSarTim(nw Da()); // askInsanc.sFlag(Flag.YES); // askInsanc.sRryTims(0); // askInsanc.sMaxRryTims(askNod.gMaxRryTims()); // askInsanc.sRryInrval(askNod.gRryInrval()); // askNod.gTaskInsancPrioriy() == null){ askInsanc.sTaskInsancPrioriy(Prioriy.MEDIUM); }ls{ askInsanc.sTaskInsancPrioriy(askNod.gTaskInsancPrioriy()); } Sring procssWorkrGroup = procssInsanc.gWorkrGroup();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
procssWorkrGroup = SringUils.isBlank(procssWorkrGroup) ? DEFAULT_WORKER_GROUP : procssWorkrGroup; Sring askWorkrGroup = SringUils.isBlank(askNod.gWorkrGroup()) ? procssWorkrGroup : askNod.gWorkrGroup(); if (!procssWorkrGroup.quals(DEFAULT_WORKER_GROUP) && askWorkrGroup.quals(DEFAULT_WORKER_GROUP)) { askInsanc.sWorkrGroup(procssWorkrGroup); }ls { askInsanc.sWorkrGroup(askWorkrGroup); } } rurn askInsanc; } /** * if all of h ask dpndnc ar skip, skip i oo. * @param askNod * @rurn */ priva boolan isTaskNodNdSkip(TaskNod askNod){ CollcionUils.isEmpy(askNod.gDpLis())){ rurn fals; } for(Sring dpNod : askNod.gDpLis()){ !skipTaskNodLis.conainsKy(dpNod)){ rurn fals; } } rurn ru; } /** * s ask nod skip if dpndnc all skip * @param askNodsSkipLis */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva void sTaskNodSkip(Lis<Sring> askNodsSkipLis){ for(Sring skipNod : askNodsSkipLis){ skipTaskNodLis.puIfAbsn(skipNod, dag.gNod(skipNod)); Collcion<Sring> posNodLis = DagHlpr.gSarVrx(skipNod, dag, complTaskLis); Lis<Sring> posSkipLis = nw ArrayLis<>(); for(Sring pos : posNodLis){ TaskNod posNod = dag.gNod(pos); isTaskNodNdSkip(posNod)){ posSkipLis.add(pos); } } sTaskNodSkip(posSkipLis); } } /** * pars condiion ask find h branch procss * s skip flag for anohr on. * @param nodNam * @rurn */ priva Lis<Sring> parsCondiionTask(Sring nodNam){ Lis<Sring> condiionTaskLis = nw ArrayLis<>(); TaskNod askNod = dag.gNod(nodNam); !askNod.isCondiionsTask()){ rurn condiionTaskLis; } CondiionsParamrs condiionsParamrs = JSONUils.parsObjc(askNod.gCondiionRsul(), CondiionsParamrs.class); TaskInsanc askInsanc = complTaskLis.g(nodNam); askInsanc == null){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
loggr.rror("ask insanc {} canno find, plas chck i!", nodNam); rurn condiionTaskLis; } askInsanc.gSa().ypIsSuccss()){ condiionTaskLis = condiionsParamrs.gSuccssNod(); sTaskNodSkip(condiionsParamrs.gFaildNod()); }ls askInsanc.gSa().ypIsFailur()){ condiionTaskLis = condiionsParamrs.gFaildNod(); sTaskNodSkip(condiionsParamrs.gSuccssNod()); }ls{ condiionTaskLis.add(nodNam); } rurn condiionTaskLis; } /** * pars pos nod lis of prvious nod * if condiion nod: rurn procss according o h sings * if pos nod compld, rurn pos nods of h compld nod * @param prviousNodNam * @rurn */ priva Lis<Sring> parsPosNodLis(Sring prviousNodNam){ Lis<Sring> posNodLis = nw ArrayLis<>(); TaskNod askNod = dag.gNod(prviousNodNam); askNod != null && askNod.isCondiionsTask()){ rurn parsCondiionTask(prviousNodNam); } Collcion<Sring> posNodCollcion = DagHlpr.gSarVrx(prviousNodNam, dag, complTaskLis); Lis<Sring> posSkipLis = nw ArrayLis<>(); //
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
// // // for(Sring posNod : posNodCollcion){ complTaskLis.conainsKy(posNod)){ TaskInsanc posTaskInsanc = complTaskLis.g(posNod); dag.gNod(posNod).isCondiionsTask()){ Lis<Sring> condiionTaskNodLis = parsCondiionTask(posNod); for(Sring condiions : condiionTaskNodLis){ posNodLis.addAll(parsPosNodLis(condiions)); } }ls posTaskInsanc.gSa().ypIsSuccss()){ posNodLis.addAll(parsPosNodLis(posNod)); }ls{ posNodLis.add(posNod); } }ls isTaskNodNdSkip(dag.gNod(posNod))){ posSkipLis.add(posNod); sTaskNodSkip(posSkipLis); posSkipLis.clar(); }ls{ posNodLis.add(posNod); } } rurn posNodLis; } /** * submi pos nod * @param parnNodNam parn nod nam */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva void submiPosNod(Sring parnNodNam){ Lis<Sring> submiTaskNodLis = parsPosNodLis(parnNodNam); Lis<TaskInsanc> askInsancs = nw ArrayLis<>(); for(Sring askNod : submiTaskNodLis){ askInsancs.add(craTaskInsanc(procssInsanc, askNod, dag.gNod(askNod))); } // for(TaskInsanc ask : askInsancs){ radyToSubmiTaskLis.conainsKy(ask.gNam())){ coninu; } complTaskLis.conainsKy(ask.gNam())){ loggr.info("ask {} has alrady run succss", ask.gNam()); coninu; } ask.gSa().ypIsPaus() || ask.gSa().ypIsCancl()){ loggr.info("ask {} soppd, h sa is {}", ask.gNam(), ask.gSa()); }ls{ addTaskToSandByLis(ask); } } } /** * drmin whhr h dpndncis of h ask nod ar compl * @rurn DpndRsul */ priva DpndRsul isTaskDpsCompl(Sring askNam) { Collcion<Sring> sarNods = dag.gBginNod(); //
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
sarNods.conains(askNam)){ rurn DpndRsul.SUCCESS; } TaskNod askNod = dag.gNod(askNam); Lis<Sring> dpNamLis = askNod.gDpLis(); for(Sring dpsNod : dpNamLis ){ !dag.conainsNod(dpsNod) || forbiddnTaskLis.conainsKy(dpsNod)){ coninu; } skipTaskNodLis.conainsKy(dpsNod)){ rurn DpndRsul.FAILED; } // !complTaskLis.conainsKy(dpsNod)){ rurn DpndRsul.WAITING; } ExcuionSaus dpTaskSa = complTaskLis.g(dpsNod).gSa(); dpTaskSa.ypIsPaus() || dpTaskSa.ypIsCancl()){ rurn DpndRsul.WAITING; } // askNod.isCondiionsTask()){ coninu; } !dpndTaskSuccss(dpsNod, askNam)){ rurn DpndRsul.FAILED; } } loggr.info("askNam: {} complDpndTaskLis: {}", askNam, Arrays.oSring(complTaskLis.kyS().oArray()));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
rurn DpndRsul.SUCCESS; } /** * dpnd nod is compld, bu hr nd chck h condiion ask branch is h nx nod * @param dpndNodNam * @param nxNodNam * @rurn */ priva boolan dpndTaskSuccss(Sring dpndNodNam, Sring nxNodNam){ dag.gNod(dpndNodNam).isCondiionsTask()){ // Lis<Sring> nxTaskLis = parsCondiionTask(dpndNodNam); !nxTaskLis.conains(nxNodNam)){ rurn fals; } }ls { ExcuionSaus dpTaskSa = complTaskLis.g(dpndNodNam).gSa(); dpTaskSa.ypIsFailur()){ rurn fals; } } rurn ru; } /** * qury ask insanc by compl sa * @param sa sa * @rurn ask insanc lis */ priva Lis<TaskInsanc> gComplTaskBySa(ExcuionSaus sa){ Lis<TaskInsanc> rsulLis = nw ArrayLis<>();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
for (Map.Enry<Sring, TaskInsanc> nry: complTaskLis.nryS()) { nry.gValu().gSa() == sa){ rsulLis.add(nry.gValu()); } } rurn rsulLis; } /** * whr hr ar ongoing asks * @param sa sa * @rurn ExcuionSaus */ priva ExcuionSaus runningSa(ExcuionSaus sa){ sa == ExcuionSaus.READY_STOP || sa == ExcuionSaus.READY_PAUSE || sa == ExcuionSaus.WAITTING_THREAD){ // rurn sa; }ls{ rurn ExcuionSaus.RUNNING_EXEUTION; } } /** * xiss failur ask,conains submi failur、dpndncy failur,xcu failur(rry afr) * * @rurn Boolan whhr has faild ask */ priva boolan hasFaildTask(){ his.askFaildSubmi){ rurn ru;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} his.rrorTaskLis.siz() > 0){ rurn ru; } rurn his.dpndFaildTask.siz() > 0; } /** * procss insanc failur * * @rurn Boolan whhr procss insanc faild */ priva boolan procssFaild(){ hasFaildTask()) { procssInsanc.gFailurSragy() == FailurSragy.END){ rurn ru; } if (procssInsanc.gFailurSragy() == FailurSragy.CONTINUE) { rurn radyToSubmiTaskLis.siz() == 0 || acivTaskNod.siz() == 0; } } rurn fals; } /** * whhr ask for waiing hrad * @rurn Boolan whhr has waiing hrad ask */ priva boolan hasWaiingThradTask(){ Lis<TaskInsanc> waiingLis = gComplTaskBySa(ExcuionSaus.WAITTING_THREAD); rurn CollcionUils.isNoEmpy(waiingLis); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
/** * prpar for paus * 1,faild rry ask in h prparaion quu , rurns o failur dircly * 2,xiss paus ask,complmn no compld, pnding submission of asks, rurn o suspnsion * 3,succss * @rurn ExcuionSaus */ priva ExcuionSaus procssRadyPaus(){ hasRryTaskInSandBy()){ rurn ExcuionSaus.FAILURE; } Lis<TaskInsanc> pausLis = gComplTaskBySa(ExcuionSaus.PAUSE); CollcionUils.isNoEmpy(pausLis) || !isComplmnEnd() || radyToSubmiTaskLis.siz() > 0){ rurn ExcuionSaus.PAUSE; }ls{ rurn ExcuionSaus.SUCCESS; } } /** * gnra h las procss insanc saus by h asks sa * @rurn procss insanc xcuion saus */ priva ExcuionSaus gProcssInsancSa(){ ProcssInsanc insanc = procssSrvic.findProcssInsancById(procssInsanc.gId()); ExcuionSaus sa = insanc.gSa(); acivTaskNod.siz() > 0 || rryTaskExiss()){ // aciv a rurn runningSa(sa);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} // procss failur procssFaild()){ rurn ExcuionSaus.FAILURE; } // waiing hrad hasWaiingThradTask()){ rurn ExcuionSaus.WAITTING_THREAD; } // paus sa == ExcuionSaus.READY_PAUSE){ rurn procssRadyPaus(); } // sop sa == ExcuionSaus.READY_STOP){ Lis<TaskInsanc> sopLis = gComplTaskBySa(ExcuionSaus.STOP); Lis<TaskInsanc> killLis = gComplTaskBySa(ExcuionSaus.KILL); CollcionUils.isNoEmpy(sopLis) || CollcionUils.isNoEmpy(killLis) || !isComplmnEnd()){ rurn ExcuionSaus.STOP; }ls{ rurn ExcuionSaus.SUCCESS; } } // succss sa == ExcuionSaus.RUNNING_EXEUTION){ Lis<TaskInsanc> killTasks = gComplTaskBySa(ExcuionSaus.KILL); radyToSubmiTaskLis.siz() > 0){ //asks curr
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
rurn ExcuionSaus.RUNNING_EXEUTION; }ls CollcionUils.isNoEmpy(killTasks)){ // asks may rurn ExcuionSaus.FAILURE; }ls{ // if h w rurn ExcuionSaus.SUCCESS; } } rurn sa; } /** * whhr sandby ask lis hav rry asks * @rurn */ priva boolan rryTaskExiss() { boolan rsul = fals; for(Sring askNam : radyToSubmiTaskLis.kyS()){ TaskInsanc ask = radyToSubmiTaskLis.g(askNam); ask.gSa().ypIsFailur()){ rsul = ru; brak; } } rurn rsul; } /** * whhr complmn nd * @rurn Boolan whhr is complmn nd */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva boolan isComplmnEnd() { !procssInsanc.isComplmnDaa()){ rurn ru; } ry { Map<Sring, Sring> cmdParam = JSONUils.oMap(procssInsanc.gCommandParam()); Da ndTim = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_END_DATE)); rurn procssInsanc.gSchdulTim().quals(ndTim); } cach (Excpion ) { loggr.rror("complmn nd faild ",); rurn fals; } } /** * updaProcssInsanc procss insanc sa * afr ach bach of asks is xcud, h saus of h procss insanc is updad */ priva void updaProcssInsancSa() { ExcuionSaus sa = gProcssInsancSa(); procssInsanc.gSa() != sa){ loggr.info( "work flow procss insanc [id: {}, nam:{}], sa chang from {} o {}, cmd yp: {}", procssInsanc.gId(), procssInsanc.gNam(), procssInsanc.gSa(), sa, procssInsanc.gCommandTyp()); ProcssInsanc insanc = procssSrvic.findProcssInsancById(procssInsanc.gId()); insanc.sSa(sa); insanc.sProcssDfiniion(procssInsanc.gProcssDfiniion()); procssSrvic.updaProcssInsanc(insanc); procssInsanc = insanc;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} } /** * g ask dpndncy rsul * @param askInsanc ask insanc * @rurn DpndRsul */ priva DpndRsul gDpndRsulForTask(TaskInsanc askInsanc){ rurn isTaskDpsCompl(askInsanc.gNam()); } /** * add ask o sandby lis * @param askInsanc ask insanc */ priva void addTaskToSandByLis(TaskInsanc askInsanc){ loggr.info("add ask o sand by lis: {}", askInsanc.gNam()); radyToSubmiTaskLis.puIfAbsn(askInsanc.gNam(), askInsanc); } /** * rmov ask from sand by lis * @param askInsanc ask insanc */ priva void rmovTaskFromSandbyLis(TaskInsanc askInsanc){ loggr.info("rmov ask from sand by lis: {}", askInsanc.gNam()); radyToSubmiTaskLis.rmov(askInsanc.gNam()); } /** * has rry ask in sandby * @rurn Boolan whhr has rry ask in sandby */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva boolan hasRryTaskInSandBy(){ for (Map.Enry<Sring, TaskInsanc> nry: radyToSubmiTaskLis.nryS()) { nry.gValu().gSa().ypIsFailur()){ rurn ru; } } rurn fals; } /** * submi and wach h asks, unil h work flow sop */ priva void runProcss(){ // submi sar nod submiPosNod(null); boolan sndTimWarning = fals; whil(!procssInsanc.isProcssInsancSop()){ // snd warn !sndTimWarning && chckProcssTimOu(procssInsanc) ){ alrManagr.sndProcssTimouAlr(procssInsanc, procssSrvic.findProcssDfinById(procssInsanc.gProcssDfiniionId())); sndTimWarning = ru; } for(Map.Enry<MasrBasTaskExcThrad,Fuur<Boolan>> nry: acivTaskNod.nryS()) { Fuur<Boolan> fuur = nry.gValu(); TaskInsanc ask = nry.gKy().gTaskInsanc(); !fuur.isDon()){ coninu; } // nod moni ask = his.procssSrvic.findTaskInsancById(ask.gId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
ask == null){ his.askFaildSubmi = ru; acivTaskNod.rmov(nry.gKy()); coninu; } // nod moni ask.gSa().ypIsFinishd()){ acivTaskNod.rmov(nry.gKy()); } loggr.info("ask :{}, id:{} compl, sa is {} ", ask.gNam(), ask.gId(), ask.gSa()); // nod succ ask.gSa() == ExcuionSaus.SUCCESS){ complTaskLis.pu(ask.gNam(), ask); submiPosNod(ask.gNam()); coninu; } // nod fail ask.gSa().ypIsFailur()){ ask.gSa() == ExcuionSaus.NEED_FAULT_TOLERANCE){ his.rcovrTolrancFaulTaskLis.add(ask); } ask.askCanRry()){ addTaskToSandByLis(ask); }ls{ complTaskLis.pu(ask.gNam(), ask); ask.isCondiionsTask() || DagHlpr.havCondiionsAfrNod(ask.gNam(), dag)) { submiPosNod(ask.gNam()); }ls{
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
rrorTaskLis.pu(ask.gNam(), ask); procssInsanc.gFailurSragy() == FailurSragy.END){ killThOhrTasks(); } } } coninu; } // ohr sa complTaskLis.pu(ask.gNam(), ask); } // snd alr CollcionUils.isNoEmpy(his.rcovrTolrancFaulTaskLis)){ alrManagr.sndAlrWorkrTolrancFaul(procssInsanc, rcovrTolrancFaulTaskLis); his.rcovrTolrancFaulTaskLis.clar(); } // updaPro // failur p // if a ask rrorTaskLis.siz() > 0){ for(Map.Enry<Sring, TaskInsanc> nry: complTaskLis.nryS()) { TaskInsanc complTask = nry.gValu(); complTask.gSa()== ExcuionSaus.PAUSE){ complTask.sSa(ExcuionSaus.KILL); complTaskLis.pu(nry.gKy(), complTask); procssSrvic.updaTaskInsanc(complTask); } } } canSubmiTaskToQuu()){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
submiSandByTask(); } ry { Thrad.slp(Consans.SLEEP_TIME_MILLIS); } cach (InrrupdExcpion ) { loggr.rror(.gMssag(),); } updaProcssInsancSa(); } loggr.info("procss:{} nd, sa :{}", procssInsanc.gId(), procssInsanc.gSa()); } /** * whhr chck procss im ou * @param procssInsanc ask insanc * @rurn ru if im ou of procss insanc > running im of procss insanc */ priva boolan chckProcssTimOu(ProcssInsanc procssInsanc) { procssInsanc.gTimou() == 0 ){ rurn fals; } Da now = nw Da(); long runningTim = DaUils.diffMin(now, procssInsanc.gSarTim()); rurn runningTim > procssInsanc.gTimou(); } /** * whhr can submi ask o quu * @rurn boolan */ priva boolan canSubmiTaskToQuu() { rurn OSUils.chckRsourc(masrConfig.gMasrMaxCpuloadAvg(), masrConfig.gMasrRsrvdMmory());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} /** * clos h on going asks */ priva void killThOhrTasks() { loggr.info("kill calld on : {}, num: {}", procssInsanc.gId(), acivTaskNod.siz()); for (Map.Enry<MasrBasTaskExcThrad, Fuur<Boolan>> nry : acivTaskNod.nryS()) { MasrBasTaskExcThrad askExcThrad = nry.gKy(); Fuur<Boolan> fuur = nry.gValu(); TaskInsanc askInsanc = askExcThrad.gTaskInsanc(); askInsanc = procssSrvic.findTaskInsancById(askInsanc.gId()); askInsanc != null && askInsanc.gSa().ypIsFinishd()){ coninu; } if (!fuur.isDon()) { // rcord ki loggr.info("kill procss insanc, id: {}, ask: {}", procssInsanc.gId(), askExcThrad.gTaskInsanc().gId()); // kill nod askExcThrad.kill(); } } } /** * whhr h rry inrval is imd ou * @param askInsanc ask insanc * @rurn Boolan */ priva boolan rryTaskInrvalOvrTim(TaskInsanc askInsanc){ askInsanc.gSa() != ExcuionSaus.FAILURE){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
rurn ru; } askInsanc.gId() == 0 || askInsanc.gMaxRryTims() ==0 || askInsanc.gRryInrval() == 0 ){ rurn ru; } Da now = nw Da(); long faildTimInrval = DaUils.diffrSc(now, askInsanc.gEndTim()); // ask rry dos no ovr im, rurn fals rurn askInsanc.gRryInrval() * SEC_2_MINUTES_TIME_UNIT < faildTimInrval; } /** * handling h lis of asks o b submid */ priva void submiSandByTask(){ for(Map.Enry<Sring, TaskInsanc> nry: radyToSubmiTaskLis.nryS()) { TaskInsanc ask = nry.gValu(); DpndRsul dpndRsul = gDpndRsulForTask(ask); DpndRsul.SUCCESS == dpndRsul){ rryTaskInrvalOvrTim(ask)){ submiTaskExc(ask); rmovTaskFromSandbyLis(ask); } }ls DpndRsul.FAILED == dpndRsul){ // if h d dpndFaildTask.pu(nry.gKy(), ask); rmovTaskFromSandbyLis(ask); loggr.info("ask {},id:{} dpnd rsul : {}",ask.gNam(), ask.gId(), dpndRsul); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} } /** * g rcovry ask insanc * @param askId ask id * @rurn rcovry ask insanc */ priva TaskInsanc gRcovryTaskInsanc(Sring askId){ !SringUils.isNoEmpy(askId)){ rurn null; } ry { Ingr inId = Ingr.valuOf(askId); TaskInsanc ask = procssSrvic.findTaskInsancById(inId); ask == null){ loggr.rror("sar nod id canno b found: {}", askId); }ls { rurn ask; } }cach (Excpion ){ loggr.rror("g rcovry ask insanc faild ",); } rurn null; } /** * g sar ask insanc lis * @param cmdParam command param * @rurn ask insanc lis */ priva Lis<TaskInsanc> gSarTaskInsancLis(Sring cmdParam){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
Lis<TaskInsanc> insancLis = nw ArrayLis<>(); Map<Sring, Sring> paramMap = JSONUils.oMap(cmdParam); paramMap != null && paramMap.conainsKy(CMDPARAM_RECOVERY_START_NODE_STRING)){ Sring[] idLis = paramMap.g(CMDPARAM_RECOVERY_START_NODE_STRING).spli(Consans.COMMA); for(Sring nodId : idLis){ TaskInsanc ask = gRcovryTaskInsanc(nodId); ask != null){ insancLis.add(ask); } } } rurn insancLis; } /** * pars "SarNodNamLis" from cmd param * @param cmdParam command param * @rurn sar nod nam lis */ priva Lis<Sring> parsSarNodNam(Sring cmdParam){ Lis<Sring> sarNodNamLis = nw ArrayLis<>(); Map<Sring, Sring> paramMap = JSONUils.oMap(cmdParam); paramMap == null){ rurn sarNodNamLis; } paramMap.conainsKy(CMDPARAM_START_NODE_NAMES)){ sarNodNamLis = Arrays.asLis(paramMap.g(CMDPARAM_START_NODE_NAMES).spli(Consans.COMMA)); } rurn sarNodNamLis; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,324
[Bug][Master] there exists some problems in checking task dependency
**Describe the bug** There exists some problems in Master-Server executing logic. Some nodes could execute normally though their depenpency is not satisfied. Just like the screenshots below, if you get the same work flow, and you will find the result is wrong. **Screenshots** As you can see, task B shouldn't be executed which is the opposite of the result. When task X has condition-type node after, the tasks that depend on X will be probably executed. ![微信图片_20200727231746](https://user-images.githubusercontent.com/37466734/88561201-ac56db80-d061-11ea-9950-69cbeb4d5958.png) **Which version of Dolphin Scheduler:** -[1.3.2-snapshot] **Probable reason** - it's wrong because of the code below in the red rectangle. ![微信图片_20200727231733](https://user-images.githubusercontent.com/37466734/88561285-c8f31380-d061-11ea-966f-1b6a246021fc.png)
https://github.com/apache/dolphinscheduler/issues/3324
https://github.com/apache/dolphinscheduler/pull/3473
927985c012342f0c9f1dde397d66b5737571fed2
5756d6b02910d139f00b4b412078f32c5ca14c54
"2020-07-27T15:35:45Z"
java
"2020-08-13T11:02:14Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* gnra sar nod nam lis from parsing command param; * if "SarNodIdLis" xiss in command param, rurn SarNodIdLis * @rurn rcovry nod nam lis */ priva Lis<Sring> gRcovryNodNamLis(){ Lis<Sring> rcovryNodNamLis = nw ArrayLis<>(); CollcionUils.isNoEmpy(rcovrNodIdLis)) { for (TaskInsanc ask : rcovrNodIdLis) { rcovryNodNamLis.add(ask.gNam()); } } rurn rcovryNodNamLis; } /** * gnra flow dag * @param procssDfiniionJson procss dfiniion json * @param sarNodNamLis sar nod nam lis * @param rcovryNodNamLis rcovry nod nam lis * @param dpNodTyp dpnd nod yp * @rurn ProcssDag procss dag * @hrows Excpion xcpion */ public ProcssDag gnraFlowDag(Sring procssDfiniionJson, Lis<Sring> sarNodNamLis, Lis<Sring> rcovryNodNamLis, TaskDpndTyp dpNodTyp)hrows Excpion{ rurn DagHlpr.gnraFlowDag(procssDfiniionJson, sarNodNamLis, rcovryNodNamLis, dpNodTyp); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.controller; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang.StringUtils; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.exceptions.ApiException; import org.apache.dolphinscheduler.api.service.ResourcesService; import org.apache.dolphinscheduler.api.service.UdfFuncService; import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.ResourceType; import org.apache.dolphinscheduler.common.enums.UdfType;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
import org.apache.dolphinscheduler.common.utils.ParameterUtils; import org.apache.dolphinscheduler.dao.entity.User; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.Resource; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import springfox.documentation.annotations.ApiIgnore; import java.util.Map; import static org.apache.dolphinscheduler.api.enums.Status.*; /** * resources controller */ @Api(tags = "RESOURCES_TAG", position = 1) @RestController @RequestMapping("resources") public class ResourcesController extends BaseController { private static final Logger logger = LoggerFactory.getLogger(ResourcesController.class); @Autowired private ResourcesService resourceService; @Autowired private UdfFuncService udfFuncService; /** * create directory * * @param loginUser login user
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
* @param type type * @param alias alias * @param description description * @param pid parent id * @param currentDir current directory * @return create result code */ @ApiOperation(value = "createDirctory", notes = "CREATE_RESOURCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"), @ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataType = "String"), @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"), @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile") }) @PostMapping(value = "/directory/create") @ApiException(CREATE_RESOURCE_ERROR) public Result createDirectory(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "type") ResourceType type, @RequestParam(value = "name") String alias, @RequestParam(value = "description", required = false) String description, @RequestParam(value = "pid") int pid, @RequestParam(value = "currentDir") String currentDir) { logger.info("login user {}, create resource, type: {}, resource alias: {}, desc: {}, file: {},{}", loginUser.getUserName(), type, alias, description, pid, currentDir); return resourceService.createDirectory(loginUser, alias, description, type, pid, currentDir); } /** * create resource * * @param loginUser login user
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
* @param alias alias * @param description description * @param type type * @param file file * @return create result code */ @ApiOperation(value = "createResource", notes = "CREATE_RESOURCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"), @ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataType = "String"), @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"), @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile") }) @PostMapping(value = "/create") @ApiException(CREATE_RESOURCE_ERROR) public Result createResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "type") ResourceType type, @RequestParam(value = "name") String alias, @RequestParam(value = "description", required = false) String description, @RequestParam("file") MultipartFile file, @RequestParam(value = "pid") int pid, @RequestParam(value = "currentDir") String currentDir) { logger.info("login user {}, create resource, type: {}, resource alias: {}, desc: {}, file: {},{}", loginUser.getUserName(), type, alias, description, file.getName(), file.getOriginalFilename()); return resourceService.createResource(loginUser, alias, description, type, file, pid, currentDir); } /** * update resource * * @param loginUser login user
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
* @param alias alias * @param resourceId resource id * @param type resource type * @param description description * @param file resource file * @return update result code */ @ApiOperation(value = "updateResource", notes = "UPDATE_RESOURCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100"), @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"), @ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataType = "String"), @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"), @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile") }) @PostMapping(value = "/update") @ApiException(UPDATE_RESOURCE_ERROR) public Result updateResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "id") int resourceId, @RequestParam(value = "type") ResourceType type, @RequestParam(value = "name") String alias, @RequestParam(value = "description", required = false) String description, @RequestParam(value = "file" ,required = false) MultipartFile file) { logger.info("login user {}, update resource, type: {}, resource alias: {}, desc: {}, file: {}", loginUser.getUserName(), type, alias, description, file); return resourceService.updateResource(loginUser, resourceId, alias, description, type, file); } /** * query resources list *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
* @param loginUser login user * @param type resource type * @return resource list */ @ApiOperation(value = "queryResourceList", notes = "QUERY_RESOURCE_LIST_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType") }) @GetMapping(value = "/list") @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_RESOURCES_LIST_ERROR) public Result queryResourceList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "type") ResourceType type ) { logger.info("query resource list, login user:{}, resource type:{}", loginUser.getUserName(), type); Map<String, Object> result = resourceService.queryResourceList(loginUser, type); return returnDataList(result); } /** * query resources list paging * * @param loginUser login user * @param type resource type * @param searchVal search value * @param pageNo page number * @param pageSize page size * @return resource list page */ @ApiOperation(value = "queryResourceListPaging", notes = "QUERY_RESOURCE_LIST_PAGING_NOTES") @ApiImplicitParams({
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
@ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"), @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "int"), @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"), @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", dataType = "Int", example = "1"), @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", dataType = "Int", example = "20") }) @GetMapping(value = "/list-paging") @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_RESOURCES_LIST_PAGING) public Result queryResourceListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "type") ResourceType type, @RequestParam(value = "id") int id, @RequestParam("pageNo") Integer pageNo, @RequestParam(value = "searchVal", required = false) String searchVal, @RequestParam("pageSize") Integer pageSize ) { logger.info("query resource list, login user:{}, resource type:{}, search value:{}", loginUser.getUserName(), type, searchVal); Map<String, Object> result = checkPageParams(pageNo, pageSize); if (result.get(Constants.STATUS) != Status.SUCCESS) { return returnDataListPaging(result); } searchVal = ParameterUtils.handleEscapes(searchVal); result = resourceService.queryResourceListPaging(loginUser, id, type, searchVal, pageNo, pageSize); return returnDataListPaging(result); } /** * delete resource * * @param loginUser login user
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
* @param resourceId resource id * @return delete result code */ @ApiOperation(value = "deleteResource", notes = "DELETE_RESOURCE_BY_ID_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100") }) @GetMapping(value = "/delete") @ResponseStatus(HttpStatus.OK) @ApiException(DELETE_RESOURCE_ERROR) public Result deleteResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "id") int resourceId ) throws Exception { logger.info("login user {}, delete resource id: {}", loginUser.getUserName(), resourceId); return resourceService.delete(loginUser, resourceId); } /** * verify resource by alias and type * * @param loginUser login user * @param fullName resource full name * @param type resource type * @return true if the resource name not exists, otherwise return false */ @ApiOperation(value = "verifyResourceName", notes = "VERIFY_RESOURCE_NAME_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"), @ApiImplicitParam(name = "fullName", value = "RESOURCE_FULL_NAME", required = true, dataType = "String") })
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
@GetMapping(value = "/verify-name") @ResponseStatus(HttpStatus.OK) @ApiException(VERIFY_RESOURCE_BY_NAME_AND_TYPE_ERROR) public Result verifyResourceName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "fullName") String fullName, @RequestParam(value = "type") ResourceType type ) { logger.info("login user {}, verfiy resource alias: {},resource type: {}", loginUser.getUserName(), fullName, type); return resourceService.verifyResourceName(fullName, type, loginUser); } /** * query resources jar list * * @param loginUser login user * @param type resource type * @return resource list */ @ApiOperation(value = "queryResourceJarList", notes = "QUERY_RESOURCE_LIST_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType") }) @GetMapping(value = "/list/jar") @ResponseStatus(HttpStatus.OK) @ApiException(QUERY_RESOURCES_LIST_ERROR) public Result queryResourceJarList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "type") ResourceType type ) { logger.info("query resource list, login user:{}, resource type:{}", loginUser.getUserName(), type.toString()); Map<String, Object> result = resourceService.queryResourceJarList(loginUser, type);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
return returnDataList(result); } /** * query resource by full name and type * * @param loginUser login user * @param fullName resource full name * @param type resource type * @return true if the resource name not exists, otherwise return false */ @ApiOperation(value = "queryResource", notes = "QUERY_BY_RESOURCE_NAME") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"), @ApiImplicitParam(name = "fullName", value = "RESOURCE_FULL_NAME", required = true, dataType = "String") }) @GetMapping(value = "/queryResource") @ResponseStatus(HttpStatus.OK) @ApiException(RESOURCE_NOT_EXIST) public Result queryResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "fullName", required = false) String fullName, @RequestParam(value = "id", required = false) Integer id, @RequestParam(value = "type") ResourceType type ) { logger.info("login user {}, query resource by full name: {} or id: {},resource type: {}", loginUser.getUserName(), fullName, id, type); return resourceService.queryResource(fullName, id, type); } /** * view resource file online *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
* @param loginUser login user * @param resourceId resource id * @param skipLineNum skip line number * @param limit limit * @return resource content */ @ApiOperation(value = "viewResource", notes = "VIEW_RESOURCE_BY_ID_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100"), @ApiImplicitParam(name = "skipLineNum", value = "SKIP_LINE_NUM", required = true, dataType = "Int", example = "100"), @ApiImplicitParam(name = "limit", value = "LIMIT", required = true, dataType = "Int", example = "100") }) @GetMapping(value = "/view") @ApiException(VIEW_RESOURCE_FILE_ON_LINE_ERROR) public Result viewResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "id") int resourceId, @RequestParam(value = "skipLineNum") int skipLineNum, @RequestParam(value = "limit") int limit ) { logger.info("login user {}, view resource : {}, skipLineNum {} , limit {}", loginUser.getUserName(), resourceId, skipLineNum, limit); return resourceService.readResource(resourceId, skipLineNum, limit); } /** * create resource file online * * @param loginUser login user * @param type resource type * @param fileName file name * @param fileSuffix file suffix
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
* @param description description * @param content content * @return create result code */ @ApiOperation(value = "onlineCreateResource", notes = "ONLINE_CREATE_RESOURCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"), @ApiImplicitParam(name = "fileName", value = "RESOURCE_NAME", required = true, dataType = "String"), @ApiImplicitParam(name = "suffix", value = "SUFFIX", required = true, dataType = "String"), @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"), @ApiImplicitParam(name = "content", value = "CONTENT", required = true, dataType = "String") }) @PostMapping(value = "/online-create") @ApiException(CREATE_RESOURCE_FILE_ON_LINE_ERROR) public Result onlineCreateResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "type") ResourceType type, @RequestParam(value = "fileName") String fileName, @RequestParam(value = "suffix") String fileSuffix, @RequestParam(value = "description", required = false) String description, @RequestParam(value = "content") String content, @RequestParam(value = "pid") int pid, @RequestParam(value = "currentDir") String currentDir ) { logger.info("login user {}, online create resource! fileName : {}, type : {}, suffix : {},desc : {},content : {}", loginUser.getUserName(), fileName, type, fileSuffix, description, content, pid, currentDir); if (StringUtils.isEmpty(content)) { logger.error("resource file contents are not allowed to be empty"); return error(Status.RESOURCE_FILE_IS_EMPTY.getCode(), RESOURCE_FILE_IS_EMPTY.getMsg()); } return resourceService.onlineCreateResource(loginUser, type, fileName, fileSuffix, description, content, pid, currentDir);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
} /** * edit resource file online * * @param loginUser login user * @param resourceId resource id * @param content content * @return update result code */ @ApiOperation(value = "updateResourceContent", notes = "UPDATE_RESOURCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100"), @ApiImplicitParam(name = "content", value = "CONTENT", required = true, dataType = "String") }) @PostMapping(value = "/update-content") @ApiException(EDIT_RESOURCE_FILE_ON_LINE_ERROR) public Result updateResourceContent(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "id") int resourceId, @RequestParam(value = "content") String content ) { logger.info("login user {}, updateProcessInstance resource : {}", loginUser.getUserName(), resourceId); if (StringUtils.isEmpty(content)) { logger.error("The resource file contents are not allowed to be empty"); return error(Status.RESOURCE_FILE_IS_EMPTY.getCode(), RESOURCE_FILE_IS_EMPTY.getMsg()); } return resourceService.updateResourceContent(resourceId, content); } /** * download resource file
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
* * @param loginUser login user * @param resourceId resource id * @return resource content */ @ApiOperation(value = "downloadResource", notes = "DOWNLOAD_RESOURCE_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100") }) @GetMapping(value = "/download") @ResponseBody @ApiException(DOWNLOAD_RESOURCE_FILE_ERROR) public ResponseEntity downloadResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "id") int resourceId) throws Exception { logger.info("login user {}, download resource : {}", loginUser.getUserName(), resourceId); Resource file = resourceService.downloadResource(resourceId); if (file == null) { return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(Status.RESOURCE_NOT_EXIST.getMsg()); } return ResponseEntity .ok() .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getFilename() + "\"") .body(file); } /** * create udf function * * @param loginUser login user * @param type udf type
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
* @param funcName function name * @param argTypes argument types * @param database database * @param description description * @param className class name * @param resourceId resource id * @return create result code */ @ApiOperation(value = "createUdfFunc", notes = "CREATE_UDF_FUNCTION_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "UDF_TYPE", required = true, dataType = "UdfType"), @ApiImplicitParam(name = "funcName", value = "FUNC_NAME", required = true, dataType = "String"), @ApiImplicitParam(name = "suffix", value = "CLASS_NAME", required = true, dataType = "String"), @ApiImplicitParam(name = "argTypes", value = "ARG_TYPES", dataType = "String"), @ApiImplicitParam(name = "database", value = "DATABASE_NAME", dataType = "String"), @ApiImplicitParam(name = "description", value = "UDF_DESC", dataType = "String"), @ApiImplicitParam(name = "resourceId", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100") }) @PostMapping(value = "/udf-func/create") @ResponseStatus(HttpStatus.CREATED) @ApiException(CREATE_UDF_FUNCTION_ERROR) public Result createUdfFunc(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "type") UdfType type, @RequestParam(value = "funcName") String funcName, @RequestParam(value = "className") String className, @RequestParam(value = "argTypes", required = false) String argTypes, @RequestParam(value = "database", required = false) String database, @RequestParam(value = "description", required = false) String description, @RequestParam(value = "resourceId") int resourceId) { logger.info("login user {}, create udf function, type: {}, funcName: {},argTypes: {} ,database: {},desc: {},resourceId: {}",
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,469
[Bug] The program type of spark node is selected as PYTHON, how should the main jar package be selected?
**Describe the question** ![image](https://user-images.githubusercontent.com/45786444/89966662-459d0900-dc82-11ea-9299-910c9b1745d0.png) **Which version of DolphinScheduler:** -[1.3.0] **Additional context** The program type of spark node is selected as PYTHON, how should the main jar package be selected? Because on a linux machine, this command "spark-sumbit *.py" can run spark to run python files. **Requirement or improvement** no
https://github.com/apache/dolphinscheduler/issues/3469
https://github.com/apache/dolphinscheduler/pull/3498
e367f90bb73c9682739308a0a98887a1c0f407ef
5f5c08402fdcecca8c35f4dc3021cc089949ef13
"2020-08-12T02:09:30Z"
java
"2020-08-14T08:47:01Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
loginUser.getUserName(), type, funcName, argTypes, database, description, resourceId); return udfFuncService.createUdfFunction(loginUser, funcName, className, argTypes, database, description, type, resourceId); } /** * view udf function * * @param loginUser login user * @param id resource id * @return udf function detail */ @ApiOperation(value = "viewUIUdfFunction", notes = "VIEW_UDF_FUNCTION_NOTES") @ApiImplicitParams({ @ApiImplicitParam(name = "resourceId", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100") }) @GetMapping(value = "/udf-func/update-ui") @ResponseStatus(HttpStatus.OK) @ApiException(VIEW_UDF_FUNCTION_ERROR) public Result viewUIUdfFunction(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam("id") int id) { logger.info("login user {}, query udf{}", loginUser.getUserName(), id); Map<String, Object> map = udfFuncService.queryUdfFuncDetail(id); return returnDataList(map); } /** * update udf function * * @param loginUser login user * @param type resource type * @param funcName function name