diff --git a/fe/src/main/java/org/apache/doris/qe/Coordinator.java b/fe/src/main/java/org/apache/doris/qe/Coordinator.java index 20c4477138..c409e97747 100644 --- a/fe/src/main/java/org/apache/doris/qe/Coordinator.java +++ b/fe/src/main/java/org/apache/doris/qe/Coordinator.java @@ -377,12 +377,12 @@ public class Coordinator { // be for a query like 'SELECT 1'). // A call to Exec() must precede all other member function calls. public void exec() throws Exception { - if (!scanNodes.isEmpty()) { + if (LOG.isDebugEnabled() && !scanNodes.isEmpty()) { LOG.debug("debug: in Coordinator::exec. query id: {}, planNode: {}", DebugUtil.printId(queryId), scanNodes.get(0).treeToThrift()); } - if (!fragments.isEmpty()) { + if (LOG.isDebugEnabled() && !fragments.isEmpty()) { LOG.debug("debug: in Coordinator::exec. query id: {}, fragment: {}", DebugUtil.printId(queryId), fragments.get(0).toThrift()); } @@ -461,8 +461,10 @@ public class Coordinator { backendExecStates.add(execState); if (needCheckBackendState) { needCheckBackendExecStates.add(execState); - LOG.debug("add need check backend {} for fragment, {} job: {}", execState.backend.getId(), - fragment.getFragmentId().asInt(), jobId); + if (LOG.isDebugEnabled()) { + LOG.debug("add need check backend {} for fragment, {} job: {}", execState.backend.getId(), + fragment.getFragmentId().asInt(), jobId); + } } futures.add(Pair.create(execState, execState.execRemoteFragmentAsync())); @@ -722,7 +724,9 @@ public class Coordinator { // assign instance ids instanceIds.clear(); for (FragmentExecParams params : fragmentExecParamsMap.values()) { - LOG.debug("fragment {} has instances {}", params.fragment.getFragmentId(), params.instanceExecParams.size()); + if (LOG.isDebugEnabled()) { + LOG.debug("fragment {} has instances {}", params.fragment.getFragmentId(), params.instanceExecParams.size()); + } for (int j = 0; j < params.instanceExecParams.size(); ++j) { // we add instance_num to query_id.lo to create a // globally-unique instance id @@ -1373,9 +1377,11 @@ public class Coordinator { // cancel the fragment instance. // return true if cancel success. Otherwise, return false public synchronized boolean cancelFragmentInstance(PPlanFragmentCancelReason cancelReason) { - LOG.debug("cancelRemoteFragments initiated={} done={} hasCanceled={} backend: {}, fragment instance id={}, reason: {}", - this.initiated, this.done, this.hasCanceled, backend.getId(), - DebugUtil.printId(fragmentInstanceId()), cancelReason.name()); + if (LOG.isDebugEnabled()) { + LOG.debug("cancelRemoteFragments initiated={} done={} hasCanceled={} backend: {}, fragment instance id={}, reason: {}", + this.initiated, this.done, this.hasCanceled, backend.getId(), + DebugUtil.printId(fragmentInstanceId()), cancelReason.name()); + } try { if (!this.initiated) { return false;