Skip to content

Commit

Permalink
Merge pull request apache#298 from WeDataSphere/dev-1.1.16-engine-err…
Browse files Browse the repository at this point in the history
…or-msg

【1.1.16】Empty pointer exception prompt when optimizing query task logs
  • Loading branch information
casionone committed Oct 7, 2023
2 parents 97e5627 + d22a35a commit ce4e5dc
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

import javax.servlet.http.HttpServletRequest;

import java.text.MessageFormat;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
Expand Down Expand Up @@ -436,6 +437,12 @@ public Message openEngineLog(HttpServletRequest req, @RequestBody JsonNode jsonN

private Message executeECMOperation(
EMNode ecmNode, String engineInstance, ECMOperateRequest ecmOperateRequest) {
if (Objects.isNull(ecmNode)) {
return Message.error(
MessageFormat.format(
"ECM node :[{0}] does not exist, Unable to open engine log(ECM节点:[{1}] 异常,无法打开日志,可能是该节点服务重启或者服务异常导致)",
engineInstance, engineInstance));
}
String operationName = OperateRequest$.MODULE$.getOperationName(ecmOperateRequest.parameters());
String userName = ecmOperateRequest.user();
if (ArrayUtils.contains(adminOperations, operationName) && Configuration.isNotAdmin(userName)) {
Expand Down

0 comments on commit ce4e5dc

Please sign in to comment.