use of com.webank.wedatasphere.qualitis.exception.PermissionDeniedRequestException in project Qualitis by WeBankFinTech.
the class RuleMetricServiceImpl method download.
@Override
public GeneralResponse<?> download(DownloadRuleMetricRequest request, HttpServletResponse response) throws UnExpectedRequestException, IOException, WriteExcelException, PermissionDeniedRequestException {
// Check rule metric IDs permission.
PageRequest pageRequest = new PageRequest(0, Integer.MAX_VALUE);
List<RuleMetricResponse> ownRuleMetric = getAllRuleMetric(pageRequest).getData().getData().stream().collect(Collectors.toList());
if (ownRuleMetric.size() <= 0 || ownRuleMetric.size() >= MAX_RULE_METRIC_COUNT) {
throw new UnExpectedRequestException("The number of metrics is illegal");
}
List<Long> downloadIds = request.getRuleMetricIds();
List<Long> ownIds = ownRuleMetric.stream().map(RuleMetricResponse::getId).collect(Collectors.toList());
if (ownIds.containsAll(downloadIds)) {
List<RuleMetricResponse> downloadRuleMetric = ownRuleMetric.stream().filter(ruleMetricResponse -> downloadIds.contains(ruleMetricResponse.getId())).collect(Collectors.toList());
List<ExcelRuleMetric> excelRuleMetrics = new ArrayList<>(downloadRuleMetric.size());
for (RuleMetricResponse ruleMetricResponse : downloadRuleMetric) {
ExcelRuleMetric excelRuleMetric = new ExcelRuleMetric();
excelRuleMetric.setName(ruleMetricResponse.getName());
excelRuleMetric.setChName(ruleMetricResponse.getCnName());
excelRuleMetric.setMetricDesc(ruleMetricResponse.getMetricDesc());
int bussCode = ruleMetricResponse.getBussCode();
excelRuleMetric.setDimension(bussCode + "");
if (RuleMetricBussCodeEnum.SUBSYSTEM.getCode().equals(bussCode)) {
excelRuleMetric.setFullCnName(ruleMetricResponse.getFullCnName());
excelRuleMetric.setSubSystemName(ruleMetricResponse.getSubSystemName());
excelRuleMetric.setSubSystemId(String.valueOf(ruleMetricResponse.getSubSystemId()));
} else if (RuleMetricBussCodeEnum.PRODUCT.getCode().equals(bussCode)) {
excelRuleMetric.setProductId(ruleMetricResponse.getProductId());
excelRuleMetric.setProductName(ruleMetricResponse.getProductName());
} else if (RuleMetricBussCodeEnum.CUSTOM.getCode().equals(bussCode)) {
excelRuleMetric.setBussCustom(ruleMetricResponse.getBussCustom());
}
excelRuleMetric.setFrequency(String.valueOf(ruleMetricResponse.getFrequency()));
excelRuleMetric.setDevDepartmentName(ruleMetricResponse.getDevDepartmentName());
excelRuleMetric.setOpsDepartmentName(ruleMetricResponse.getOpsDepartmentName());
excelRuleMetric.setDepartmentCode(ruleMetricResponse.getDepartmentCode());
excelRuleMetric.setDepartmentName(ruleMetricResponse.getDepartmentName());
excelRuleMetric.setAvailable(ruleMetricResponse.getAvailable());
excelRuleMetric.setEnCode(ruleMetricResponse.getEnCode());
excelRuleMetric.setType(ruleMetricResponse.getType());
excelRuleMetrics.add(excelRuleMetric);
}
String fileName = "batch_metrics_export_" + FILE_DATE_FORMATTER.format(new Date());
fileName = URLEncoder.encode(fileName, "UTF-8");
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment;filename*=UTF-8''" + fileName);
response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
OutputStream outputStream = response.getOutputStream();
writeExcelToOutput(excelRuleMetrics, outputStream);
outputStream.flush();
} else {
throw new PermissionDeniedRequestException("HAS_NO_PERMISSION_TO_ACCESS", 403);
}
LOGGER.info("Succeed to download all rule metrics in type of excel");
return null;
}
use of com.webank.wedatasphere.qualitis.exception.PermissionDeniedRequestException in project Qualitis by WeBankFinTech.
the class RuleMetricServiceImpl method deleteRuleMetric.
@Override
@Transactional(rollbackFor = { Exception.class, RuntimeException.class, UnExpectedRequestException.class })
public GeneralResponse<RuleMetricResponse> deleteRuleMetric(long id) throws UnExpectedRequestException, PermissionDeniedRequestException {
if (id <= 0) {
throw new UnExpectedRequestException("{&REQUEST_CAN_NOT_BE_NULL}");
}
// Check rule metric existence.
RuleMetric ruleMetricInDb = ruleMetricDao.findById(id);
if (ruleMetricInDb == null) {
throw new UnExpectedRequestException("Rule Metric ID [" + id + "] {&DOES_NOT_EXIST}");
}
String userName = HttpUtils.getUserName(httpServletRequest);
LOGGER.info("Start to delete rule metric, rule metric ID: [{}], user: [{}]", id, userName);
User loginUser = userDao.findByUsername(userName);
List<UserRole> userRoles = userRoleDao.findByUser(loginUser);
Integer roleType = roleService.getRoleType(userRoles);
if (roleType.equals(RoleDefaultTypeEnum.ADMIN.getCode())) {
LOGGER.info("SYS_ADMIN will delete rule metric.");
RuleMetricDepartmentUser ruleMetricDepartmentUser = ruleMetricDepartmentUserDao.findByRuleMetric(ruleMetricInDb);
if (ruleMetricDepartmentUser != null) {
LOGGER.info("Rule metric[{}] will be delete.", ruleMetricInDb.toString());
ruleMetricDepartmentUserDao.delete(ruleMetricDepartmentUser);
}
} else if (roleType.equals(RoleDefaultTypeEnum.DEPARTMENT_ADMIN.getCode())) {
LOGGER.info("DEPARTMENT_ADMIN will delete rule metric.");
if (ruleMetricInDb.getLevel().equals(RuleMetricLevelEnum.DEFAULT_METRIC.getCode())) {
throw new PermissionDeniedRequestException("User {&HAS_NO_PERMISSION_TO_ACCESS}", 403);
}
List<Department> managedDepartment = new ArrayList<>();
for (UserRole userRole : userRoles) {
Department department = userRole.getRole().getDepartment();
if (department != null) {
managedDepartment.add(department);
}
}
RuleMetricDepartmentUser ruleMetricDepartmentUser = ruleMetricDepartmentUserDao.findByRuleMetric(ruleMetricInDb);
if (ruleMetricDepartmentUser != null && managedDepartment.contains(ruleMetricDepartmentUser.getDepartment())) {
LOGGER.info("Rule metric[{}] will be delete.", ruleMetricInDb.toString());
ruleMetricDepartmentUserDao.delete(ruleMetricDepartmentUser);
} else {
throw new PermissionDeniedRequestException("User {&HAS_NO_PERMISSION_TO_ACCESS}", 403);
}
} else {
LOGGER.info("PROJECTOR will delete rule metric.");
if (!ruleMetricInDb.getLevel().equals(RuleMetricLevelEnum.PERSONAL_METRIC.getCode()) || !ruleMetricInDb.getCreateUser().equals(loginUser.getUserName())) {
throw new PermissionDeniedRequestException("User {&HAS_NO_PERMISSION_TO_ACCESS}", 403);
}
RuleMetricDepartmentUser ruleMetricDepartmentUser = ruleMetricDepartmentUserDao.findByRuleMetric(ruleMetricInDb);
if (ruleMetricDepartmentUser != null) {
LOGGER.info("Rule metric[{}] will be delete.", ruleMetricInDb.toString());
ruleMetricDepartmentUserDao.delete(ruleMetricDepartmentUser);
} else {
throw new PermissionDeniedRequestException("User {&HAS_NO_PERMISSION_TO_ACCESS}", 403);
}
}
ruleMetricDao.delete(ruleMetricInDb);
return new GeneralResponse<>("200", "{&DELETE_RULE_METRIC_SUCCESSFULLY}", null);
}
use of com.webank.wedatasphere.qualitis.exception.PermissionDeniedRequestException in project Qualitis by WeBankFinTech.
the class OuterExecutionServiceImpl method groupExecution.
@Override
public GeneralResponse<?> groupExecution(GroupExecutionRequest request, Integer invokeCode) throws UnExpectedRequestException, PermissionDeniedRequestException {
LOGGER.info("Execute application by group. group_id: {}", request.getGroupId());
LOGGER.info("Execute application by nodename. nodename: {}", request.getNodeName());
// Check Arguments
GroupExecutionRequest.checkRequest(request);
String loginUser = getLoginUser(httpServletRequest, request.getCreateUser(), request.getAsync());
// Check existence of project
RuleGroup ruleGroupInDb = ruleGroupDao.findById(request.getGroupId());
if (null == ruleGroupInDb) {
throw new UnExpectedRequestException("Group_id " + request.getGroupId() + " {&DOES_NOT_EXIST}");
}
LOGGER.info("Succeed to find rule group. group_id: {}", ruleGroupInDb.getId());
Project projectInDb = projectDao.findById(ruleGroupInDb.getProjectId());
// Check permissions of project
List<Integer> permissions = new ArrayList<>();
permissions.add(ProjectUserPermissionEnum.OPERATOR.getCode());
projectService.checkProjectPermission(projectInDb, loginUser, permissions);
checkPermissionCreateUserProxyExecuteUser(request.getCreateUser(), request.getExecutionUser());
// Find all rules
List<Rule> rules = ruleDao.findByRuleGroup(ruleGroupInDb);
if (CollectionUtils.isEmpty(rules)) {
throw new UnExpectedRequestException("{&NO_RULE_CAN_BE_EXECUTED}");
}
List<Long> ruleIds = rules.stream().map(Rule::getId).collect(Collectors.toList());
StringBuffer runDate = new StringBuffer();
StringBuffer partition = new StringBuffer();
Map<String, String> execParamMap = new HashMap<>(5);
parseExecParams(partition, runDate, request.getExecutionParam(), execParamMap);
List<ApplicationSubmitRequest> applicationSubmitRequests = new ArrayList<>();
// Construct dynamic partition.
try {
submitRulesWithDynamicPartition(applicationSubmitRequests, projectInDb.getId(), ruleGroupInDb.getId(), rules, ruleIds, request.getExecutionUser(), request.getDyNamicPartition(), request.getClusterName(), partition, request.getDyNamicPartitionPrefix());
} catch (ResourceAccessException e) {
generateAbnormalApplicationInfo(projectInDb.getId(), request.getGroupId(), request.getCreateUser(), request.getExecutionUser(), new Date(), invokeCode, partition.toString(), request.getStartupParamName(), request.getExecutionParam(), e, ApplicationCommentEnum.METADATA_ISSUES.getCode(), ApplicationStatusEnum.TASK_SUBMIT_FAILED.getCode(), rules);
LOGGER.error("One group execution[id={}] of the project execution start failed!", request.getGroupId());
} catch (NoPartitionException e) {
generateAbnormalApplicationInfo(projectInDb.getId(), request.getGroupId(), request.getCreateUser(), request.getExecutionUser(), new Date(), invokeCode, partition.toString(), request.getStartupParamName(), request.getExecutionParam(), e, ApplicationCommentEnum.METADATA_ISSUES.getCode(), ApplicationStatusEnum.TASK_SUBMIT_FAILED.getCode(), rules);
LOGGER.error("One group execution[id={}] of the project execution start failed!", request.getGroupId());
} catch (Exception e) {
generateAbnormalApplicationInfo(projectInDb.getId(), request.getGroupId(), request.getCreateUser(), request.getExecutionUser(), new Date(), invokeCode, partition.toString(), request.getStartupParamName(), request.getExecutionParam(), e, ApplicationCommentEnum.UNKNOWN_ERROR_ISSUES.getCode(), ApplicationStatusEnum.TASK_SUBMIT_FAILED.getCode(), rules);
LOGGER.error("One group execution[id={}] of the project execution start failed!", request.getGroupId());
}
if (CollectionUtils.isEmpty(ruleIds)) {
return new GeneralResponse<>("200", "{&SUCCEED_TO_DISPATCH_TASK}", null);
}
GeneralResponse<ApplicationTaskSimpleResponse> generalResponse = (GeneralResponse<ApplicationTaskSimpleResponse>) outerExecutionService.submitRules(ruleIds, partition, loginUser, request.getExecutionUser(), request.getNodeName(), projectInDb.getId(), ruleGroupInDb.getId(), request.getStartupParamName(), request.getClusterName(), request.getSetFlag(), execParamMap, request.getExecutionParam(), runDate, invokeCode);
// Record project event.
projectEventService.record(projectInDb.getId(), loginUser, "submit group execution", "group[name=" + ruleGroupInDb.getRuleGroupName() + "].", EventTypeEnum.SUBMIT_PROJECT.getCode());
return generalResponse;
}
use of com.webank.wedatasphere.qualitis.exception.PermissionDeniedRequestException in project Qualitis by WeBankFinTech.
the class OuterExecutionServiceImpl method projectExecution.
@Override
@Transactional(rollbackFor = { RuntimeException.class, UnExpectedRequestException.class })
public GeneralResponse<?> projectExecution(ProjectExecutionRequest request, Integer invokeCode) throws UnExpectedRequestException, PermissionDeniedRequestException {
LOGGER.info("Execute application by project. project_id: {}", request.getProjectId());
// Check Arguments
ProjectExecutionRequest.checkRequest(request);
String executionUser = request.getExecutionUser();
String loginUser = getLoginUser(httpServletRequest, request.getCreateUser(), request.getAsync());
LOGGER.info("Qualitis execution user: {}", executionUser);
LOGGER.info("Qualitis login or create user: {}", loginUser);
// Check existence of project
Project projectInDb = projectDao.findById(request.getProjectId());
if (null == projectInDb) {
throw new UnExpectedRequestException("Project_id " + request.getProjectId() + " {&DOES_NOT_EXIST}");
}
// Check permissions of project
List<Integer> permissions = new ArrayList<>();
permissions.add(ProjectUserPermissionEnum.OPERATOR.getCode());
projectService.checkProjectPermission(projectInDb, loginUser, permissions);
checkPermissionCreateUserProxyExecuteUser(request.getCreateUser(), request.getExecutionUser());
// Find all rule group
List<RuleGroup> ruleGroups = ruleGroupDao.findByProjectId(projectInDb.getId());
if (CollectionUtils.isEmpty(ruleGroups)) {
throw new UnExpectedRequestException("{&NO_RULE_CAN_BE_EXECUTED}");
}
LOGGER.info("Succeed to find rule group list from project[id={}], rule group[{}]", projectInDb.getId(), Arrays.toString(ruleGroups.toArray()));
// Parse partition and run date from execution parameters.
StringBuffer partition = new StringBuffer();
StringBuffer runDate = new StringBuffer();
Map<String, String> execParamMap = new HashMap<>(5);
parseExecParams(partition, runDate, request.getExecutionParam(), execParamMap);
ApplicationProjectResponse applicationProjectResponse = new ApplicationProjectResponse();
List<ApplicationSubmitRequest> applicationSubmitRequests = new ArrayList<>(ruleGroups.size());
for (RuleGroup ruleGroup : ruleGroups) {
// Find all rules
List<Rule> rules = ruleDao.findByRuleGroup(ruleGroup);
if (CollectionUtils.isEmpty(rules)) {
ruleGroupDao.delete(ruleGroup);
continue;
}
LOGGER.info("Succeed to get rules from rule group[id={}].", ruleGroup.getId());
List<Long> ruleIds = rules.stream().map(Rule::getId).collect(Collectors.toList());
try {
// Dynamic partition.
submitRulesWithDynamicPartition(applicationSubmitRequests, projectInDb.getId(), ruleGroup.getId(), rules, ruleIds, executionUser, request.getDyNamicPartition(), request.getClusterName(), partition, request.getDyNamicPartitionPrefix());
if (CollectionUtils.isEmpty(ruleIds)) {
continue;
}
} catch (ResourceAccessException e) {
generateAbnormalApplicationInfo(request.getProjectId(), ruleGroup.getId(), request.getCreateUser(), executionUser, new Date(), invokeCode, partition.toString(), request.getStartupParamName(), request.getExecutionParam(), e, ApplicationCommentEnum.METADATA_ISSUES.getCode(), ApplicationStatusEnum.TASK_SUBMIT_FAILED.getCode(), rules);
LOGGER.error("One group execution[id={}] of the project execution start failed!", ruleGroup.getId());
} catch (NoPartitionException e) {
generateAbnormalApplicationInfo(request.getProjectId(), ruleGroup.getId(), request.getCreateUser(), executionUser, new Date(), invokeCode, partition.toString(), request.getStartupParamName(), request.getExecutionParam(), e, ApplicationCommentEnum.METADATA_ISSUES.getCode(), ApplicationStatusEnum.TASK_SUBMIT_FAILED.getCode(), rules);
LOGGER.error("One group execution[id={}] of the project execution start failed!", ruleGroup.getId());
} catch (Exception e) {
generateAbnormalApplicationInfo(request.getProjectId(), ruleGroup.getId(), request.getCreateUser(), executionUser, new Date(), invokeCode, partition.toString(), request.getStartupParamName(), request.getExecutionParam(), e, ApplicationCommentEnum.UNKNOWN_ERROR_ISSUES.getCode(), ApplicationStatusEnum.TASK_SUBMIT_FAILED.getCode(), rules);
LOGGER.error("One group execution[id={}] of the project execution start failed!", ruleGroup.getId());
}
applicationSubmitRequests.add(new ApplicationSubmitRequest(projectInDb.getId(), ruleGroup.getId(), ruleIds, partition));
}
for (ApplicationSubmitRequest applicationSubmitRequest : applicationSubmitRequests) {
GeneralResponse<?> generalResponse = outerExecutionService.submitRules(applicationSubmitRequest.getRuleIds(), applicationSubmitRequest.getPartition(), loginUser, executionUser, DEFAULT_NODE_NAME, projectInDb.getId(), applicationSubmitRequest.getRuleGroupId(), request.getStartupParamName(), request.getClusterName(), request.getSetFlag(), execParamMap, request.getExecutionParam(), runDate, invokeCode);
applicationProjectResponse.getApplicationTaskSimpleResponses().add((ApplicationTaskSimpleResponse) generalResponse.getData());
}
// Record project event.
projectEventService.record(projectInDb.getId(), loginUser, "submit project execution", ".", EventTypeEnum.SUBMIT_PROJECT.getCode());
return new GeneralResponse<>("200", "{&SUCCEED_TO_DISPATCH_TASK}", applicationProjectResponse);
}
use of com.webank.wedatasphere.qualitis.exception.PermissionDeniedRequestException in project Qualitis by WeBankFinTech.
the class OuterExecutionServiceImpl method dataSourceExecution.
@Override
public GeneralResponse<?> dataSourceExecution(DataSourceExecutionRequest request) throws UnExpectedRequestException, PermissionDeniedRequestException {
LOGGER.info("Execute application by datasource. cluster: {}, database: {}, table: {}", request.getCluster(), request.getDatabase(), request.getTable());
// Check Arguments.
DataSourceExecutionRequest.checkRequest(request);
String loginUser = getLoginUser(httpServletRequest, request.getCreateUser(), request.getAsync());
// Find all rule datasources by user.
List<RuleDataSource> ruleDataSources = new ArrayList<>();
ruleDataSources.addAll(ruleDataSourceDao.findDatasourcesByUser(loginUser, request.getCluster(), request.getDatabase(), request.getTable()));
List<Rule> rules = ruleDataSources.stream().filter(r -> r.getClusterName().equals(request.getCluster()) && r.getDbName().equals(request.getDatabase()) && r.getTableName().equals(request.getTable())).map(RuleDataSource::getRule).distinct().filter(rule -> {
if (!request.getCrossTable()) {
return rule.getRuleDataSources().size() == 1;
}
return true;
}).collect(Collectors.toList());
if (CollectionUtils.isEmpty(rules)) {
throw new UnExpectedRequestException("{&NO_RULE_CAN_BE_EXECUTED}");
}
checkPermissionCreateUserProxyExecuteUser(request.getCreateUser(), request.getExecutionUser());
ApplicationProjectResponse applicationProjectResponse = new ApplicationProjectResponse();
List<ApplicationSubmitRequest> applicationSubmitRequests = new ArrayList<>();
StringBuffer partition = new StringBuffer();
StringBuffer runDate = new StringBuffer();
Map<String, String> execParamMap = new HashMap<>(5);
parseExecParams(partition, runDate, request.getExecutionParam(), execParamMap);
List<Project> projects = rules.stream().map(Rule::getProject).distinct().collect(Collectors.toList());
for (Project projectInDb : projects) {
// Check permissions of project
List<Integer> permissions = new ArrayList<>();
permissions.add(ProjectUserPermissionEnum.OPERATOR.getCode());
projectService.checkProjectPermission(projectInDb, loginUser, permissions);
List<Rule> currentRules = rules.stream().filter(rule -> rule.getProject().getId().equals(projectInDb.getId())).collect(Collectors.toList());
List<RuleGroup> currentRuleGroups = currentRules.stream().map(Rule::getRuleGroup).distinct().collect(Collectors.toList());
for (RuleGroup ruleGroup : currentRuleGroups) {
List<Rule> currentRulesOfGroup = currentRules.stream().filter(rule -> rule.getRuleGroup().getRuleGroupName().equals(ruleGroup.getRuleGroupName())).distinct().collect(Collectors.toList());
List<Long> currentRuleIds = currentRulesOfGroup.stream().map(Rule::getId).distinct().collect(Collectors.toList());
LOGGER.info("Succeed to find current rules of one group with datasource. rule_id: {}", currentRuleIds);
// Dynamic partition.
try {
submitRulesWithDynamicPartition(applicationSubmitRequests, projectInDb.getId(), ruleGroup.getId(), rules, currentRuleIds, request.getExecutionUser(), request.getDyNamicPartition(), request.getClusterName(), partition, request.getDyNamicPartitionPrefix());
} catch (ResourceAccessException e) {
// Record submit failed applicatoin.
generateAbnormalApplicationInfo(projectInDb.getId(), ruleGroup.getId(), request.getCreateUser(), request.getExecutionUser(), new Date(), InvokeTypeEnum.BDP_CLIENT_API_INVOKE.getCode(), partition.toString(), request.getStartupParamName(), request.getExecutionParam(), e, ApplicationCommentEnum.METADATA_ISSUES.getCode(), ApplicationStatusEnum.TASK_SUBMIT_FAILED.getCode(), rules);
LOGGER.error("One group execution[id={}] of the datasource execution start failed!", ruleGroup.getId());
} catch (NoPartitionException e) {
// Record submit failed applicatoin.
generateAbnormalApplicationInfo(projectInDb.getId(), ruleGroup.getId(), request.getCreateUser(), request.getExecutionUser(), new Date(), InvokeTypeEnum.BDP_CLIENT_API_INVOKE.getCode(), partition.toString(), request.getStartupParamName(), request.getExecutionParam(), e, ApplicationCommentEnum.METADATA_ISSUES.getCode(), ApplicationStatusEnum.TASK_SUBMIT_FAILED.getCode(), rules);
LOGGER.error("One group execution[id={}] of the datasource execution start failed!", ruleGroup.getId());
} catch (Exception e) {
// Record submit failed applicatoin.
generateAbnormalApplicationInfo(projectInDb.getId(), ruleGroup.getId(), request.getCreateUser(), request.getExecutionUser(), new Date(), InvokeTypeEnum.BDP_CLIENT_API_INVOKE.getCode(), partition.toString(), request.getStartupParamName(), request.getExecutionParam(), e, ApplicationCommentEnum.UNKNOWN_ERROR_ISSUES.getCode(), ApplicationStatusEnum.TASK_SUBMIT_FAILED.getCode(), rules);
LOGGER.error("One group execution[id={}] of the datasource execution start failed!", ruleGroup.getId());
}
if (CollectionUtils.isNotEmpty(currentRuleIds)) {
applicationSubmitRequests.add(new ApplicationSubmitRequest(request.getJobId(), projectInDb.getId(), ruleGroup.getId(), currentRuleIds, partition));
}
}
projectEventService.record(projectInDb.getId(), loginUser, "submit datasource execution", "rule name[" + Arrays.toString(rules.stream().filter(rule -> rule.getProject().getId().equals(projectInDb.getId())).toArray()) + "].", EventTypeEnum.SUBMIT_PROJECT.getCode());
}
GeneralResponse<ApplicationTaskSimpleResponse> generalResponse;
for (ApplicationSubmitRequest applicationSubmitRequest : applicationSubmitRequests) {
if (StringUtils.isNotBlank(request.getJobId())) {
applicationSubmitRequest.setJobId(request.getJobId());
}
generalResponse = (GeneralResponse<ApplicationTaskSimpleResponse>) outerExecutionService.submitRules(applicationSubmitRequest.getRuleIds(), applicationSubmitRequest.getPartition(), loginUser, request.getExecutionUser(), DEFAULT_NODE_NAME, applicationSubmitRequest.getProjectId(), applicationSubmitRequest.getRuleGroupId(), request.getStartupParamName(), request.getClusterName(), request.getSetFlag(), execParamMap, request.getExecutionParam(), runDate, InvokeTypeEnum.BDP_CLIENT_API_INVOKE.getCode());
applicationProjectResponse.getApplicationTaskSimpleResponses().add(generalResponse.getData());
}
return new GeneralResponse<>("200", "{&SUCCEED_TO_DISPATCH_TASK}", applicationProjectResponse);
}
Aggregations