You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/11/22 03:03:30 UTC
(iotdb) branch OptLOGGERDEBUG created (now 40b39b3a1af)
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a change to branch OptLOGGERDEBUG
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 40b39b3a1af Add isDebugEnable for each LOGGER.DEBUG
This branch includes the following new commits:
new 40b39b3a1af Add isDebugEnable for each LOGGER.DEBUG
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(iotdb) 01/01: Add isDebugEnable for each LOGGER.DEBUG
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch OptLOGGERDEBUG
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 40b39b3a1afe6d9258c87e3a7dff3c683c837257
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Wed Nov 22 11:03:17 2023 +0800
Add isDebugEnable for each LOGGER.DEBUG
---
.../execution/exchange/MPPDataExchangeManager.java | 172 ++++++++++++++-------
.../exchange/source/LocalSourceHandle.java | 34 ++--
.../execution/exchange/source/SourceHandle.java | 60 ++++---
.../execution/operator/AbstractOperator.java | 8 +-
4 files changed, 185 insertions(+), 89 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java
index 886befdf4e9..178e9735358 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java
@@ -101,10 +101,12 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
req.sourceFragmentInstanceId.queryId,
req.sourceFragmentInstanceId.fragmentId,
req.sourceFragmentInstanceId.instanceId))) {
- LOGGER.debug(
- "[ProcessGetTsBlockRequest] sequence ID in [{}, {})",
- req.getStartSequenceId(),
- req.getEndSequenceId());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "[ProcessGetTsBlockRequest] sequence ID in [{}, {})",
+ req.getStartSequenceId(),
+ req.getEndSequenceId());
+ }
TGetDataBlockResponse resp = new TGetDataBlockResponse(new ArrayList<>());
ISinkHandle sinkHandle = shuffleSinkHandles.get(req.getSourceFragmentInstanceId());
if (sinkHandle == null) {
@@ -142,16 +144,20 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
e.sourceFragmentInstanceId.queryId,
e.sourceFragmentInstanceId.fragmentId,
e.sourceFragmentInstanceId.instanceId))) {
- LOGGER.debug(
- "Received AcknowledgeDataBlockEvent for TsBlocks whose sequence ID are in [{}, {}) from {}.",
- e.getStartSequenceId(),
- e.getEndSequenceId(),
- e.getSourceFragmentInstanceId());
- ISinkHandle sinkHandle = shuffleSinkHandles.get(e.getSourceFragmentInstanceId());
- if (sinkHandle == null) {
+ if (LOGGER.isDebugEnabled()) {
LOGGER.debug(
- "received ACK event but target FragmentInstance[{}] is not found.",
+ "Received AcknowledgeDataBlockEvent for TsBlocks whose sequence ID are in [{}, {}) from {}.",
+ e.getStartSequenceId(),
+ e.getEndSequenceId(),
e.getSourceFragmentInstanceId());
+ }
+ ISinkHandle sinkHandle = shuffleSinkHandles.get(e.getSourceFragmentInstanceId());
+ if (sinkHandle == null) {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "received ACK event but target FragmentInstance[{}] is not found.",
+ e.getSourceFragmentInstanceId());
+ }
return;
}
// index of the channel must be a SinkChannel
@@ -177,15 +183,20 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
e.sourceFragmentInstanceId.queryId,
e.sourceFragmentInstanceId.fragmentId,
e.sourceFragmentInstanceId.instanceId))) {
- LOGGER.debug(
- "Closed source handle of ShuffleSinkHandle {}, channel index: {}.",
- e.getSourceFragmentInstanceId(),
- e.getIndex());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "Closed source handle of ShuffleSinkHandle {}, channel index: {}.",
+ e.getSourceFragmentInstanceId(),
+ e.getIndex());
+ }
+
ISinkHandle sinkHandle = shuffleSinkHandles.get(e.getSourceFragmentInstanceId());
if (sinkHandle == null) {
- LOGGER.debug(
- "received CloseSinkChannelEvent but target FragmentInstance[{}] is not found.",
- e.getSourceFragmentInstanceId());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "received CloseSinkChannelEvent but target FragmentInstance[{}] is not found.",
+ e.getSourceFragmentInstanceId());
+ }
return;
}
sinkHandle.getChannel(e.getIndex()).close();
@@ -204,11 +215,13 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
long startTime = System.nanoTime();
try (SetThreadName fragmentInstanceName =
new SetThreadName(createFullIdFrom(e.targetFragmentInstanceId, e.targetPlanNodeId))) {
- LOGGER.debug(
- "New data block event received, for plan node {} of {} from {}.",
- e.getTargetPlanNodeId(),
- e.getTargetFragmentInstanceId(),
- e.getSourceFragmentInstanceId());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "New data block event received, for plan node {} of {} from {}.",
+ e.getTargetPlanNodeId(),
+ e.getTargetFragmentInstanceId(),
+ e.getSourceFragmentInstanceId());
+ }
Map<String, ISourceHandle> sourceHandleMap =
sourceHandles.get(e.getTargetFragmentInstanceId());
@@ -222,9 +235,11 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
// may
// have already been stopped. For example, in the read whit LimitOperator, the downstream
// FragmentInstance may be finished, although the upstream is still working.
- LOGGER.debug(
- "received NewDataBlockEvent but the downstream FragmentInstance[{}] is not found",
- e.getTargetFragmentInstanceId());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "received NewDataBlockEvent but the downstream FragmentInstance[{}] is not found",
+ e.getTargetFragmentInstanceId());
+ }
return;
}
@@ -241,11 +256,13 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
public void onEndOfDataBlockEvent(TEndOfDataBlockEvent e) throws TException {
try (SetThreadName fragmentInstanceName =
new SetThreadName(createFullIdFrom(e.targetFragmentInstanceId, e.targetPlanNodeId))) {
- LOGGER.debug(
- "End of data block event received, for plan node {} of {} from {}.",
- e.getTargetPlanNodeId(),
- e.getTargetFragmentInstanceId(),
- e.getSourceFragmentInstanceId());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "End of data block event received, for plan node {} of {} from {}.",
+ e.getTargetPlanNodeId(),
+ e.getTargetFragmentInstanceId(),
+ e.getSourceFragmentInstanceId());
+ }
Map<String, ISourceHandle> sourceHandleMap =
sourceHandles.get(e.getTargetFragmentInstanceId());
@@ -255,9 +272,11 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
: (SourceHandle) sourceHandleMap.get(e.getTargetPlanNodeId());
if (sourceHandle == null || sourceHandle.isAborted() || sourceHandle.isFinished()) {
- LOGGER.debug(
- "received onEndOfDataBlockEvent but the downstream FragmentInstance[{}] is not found",
- e.getTargetFragmentInstanceId());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "received onEndOfDataBlockEvent but the downstream FragmentInstance[{}] is not found",
+ e.getTargetFragmentInstanceId());
+ }
return;
}
@@ -299,11 +318,14 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
@Override
public void onFinished(ISourceHandle sourceHandle) {
- LOGGER.debug("[ScHListenerOnFinish]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[ScHListenerOnFinish]");
+ }
Map<String, ISourceHandle> sourceHandleMap =
sourceHandles.get(sourceHandle.getLocalFragmentInstanceId());
if (sourceHandleMap == null
- || sourceHandleMap.remove(sourceHandle.getLocalPlanNodeId()) == null) {
+ || sourceHandleMap.remove(sourceHandle.getLocalPlanNodeId()) == null
+ && (LOGGER.isDebugEnabled())) {
LOGGER.debug("[ScHListenerAlreadyReleased]");
}
@@ -314,7 +336,9 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
@Override
public void onAborted(ISourceHandle sourceHandle) {
- LOGGER.debug("[ScHListenerOnAbort]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[ScHListenerOnAbort]");
+ }
onFinished(sourceHandle);
}
@@ -342,12 +366,16 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
@Override
public void onFinished(ISourceHandle sourceHandle) {
- LOGGER.debug("[ScHListenerOnFinish]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[ScHListenerOnFinish]");
+ }
}
@Override
public void onAborted(ISourceHandle sourceHandle) {
- LOGGER.debug("[ScHListenerOnAbort]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[ScHListenerOnAbort]");
+ }
}
@Override
@@ -374,20 +402,26 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
@Override
public void onFinish(ISink sink) {
- LOGGER.debug("[ShuffleSinkHandleListenerOnFinish]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[ShuffleSinkHandleListenerOnFinish]");
+ }
shuffleSinkHandles.remove(sink.getLocalFragmentInstanceId());
context.finished();
}
@Override
public void onEndOfBlocks(ISink sink) {
- LOGGER.debug("[ShuffleSinkHandleListenerOnEndOfTsBlocks]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[ShuffleSinkHandleListenerOnEndOfTsBlocks]");
+ }
context.transitionToFlushing();
}
@Override
public Optional<Throwable> onAborted(ISink sink) {
- LOGGER.debug("[ShuffleSinkHandleListenerOnAbort]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[ShuffleSinkHandleListenerOnAbort]");
+ }
shuffleSinkHandles.remove(sink.getLocalFragmentInstanceId());
return context.getFailureCause();
}
@@ -426,18 +460,24 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
@Override
public void onFinish(ISink sink) {
- LOGGER.debug("[SkHListenerOnFinish]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[SkHListenerOnFinish]");
+ }
decrementCnt();
}
@Override
public void onEndOfBlocks(ISink sink) {
- LOGGER.debug("[SkHListenerOnEndOfTsBlocks]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[SkHListenerOnEndOfTsBlocks]");
+ }
}
@Override
public Optional<Throwable> onAborted(ISink sink) {
- LOGGER.debug("[SkHListenerOnAbort]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[SkHListenerOnAbort]");
+ }
decrementCnt();
return context.getFailureCause();
}
@@ -487,17 +527,23 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
@Override
public void onFinish(ISink sink) {
- LOGGER.debug("[SkHListenerOnFinish]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[SkHListenerOnFinish]");
+ }
}
@Override
public void onEndOfBlocks(ISink sink) {
- LOGGER.debug("[SkHListenerOnEndOfTsBlocks]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[SkHListenerOnEndOfTsBlocks]");
+ }
}
@Override
public Optional<Throwable> onAborted(ISink sink) {
- LOGGER.debug("[SkHListenerOnAbort]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[SkHListenerOnAbort]");
+ }
return context.getFailureCause();
}
@@ -590,10 +636,14 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
LocalSourceHandle localSourceHandle =
sourceHandleMap == null ? null : (LocalSourceHandle) sourceHandleMap.get(remotePlanNodeId);
if (localSourceHandle != null) {
- LOGGER.debug("Get SharedTsBlockQueue from local source handle");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Get SharedTsBlockQueue from local source handle");
+ }
queue = localSourceHandle.getSharedTsBlockQueue();
} else {
- LOGGER.debug("Create SharedTsBlockQueue");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Create SharedTsBlockQueue");
+ }
queue =
new SharedTsBlockQueue(
localFragmentInstanceId, localPlanNodeId, localMemoryManager, executorService);
@@ -770,10 +820,14 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
SharedTsBlockQueue queue;
ISinkHandle sinkHandle = shuffleSinkHandles.get(remoteFragmentInstanceId);
if (sinkHandle != null) {
- LOGGER.debug("Get SharedTsBlockQueue from local sink handle");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Get SharedTsBlockQueue from local sink handle");
+ }
queue = ((LocalSinkChannel) (sinkHandle.getChannel(index))).getSharedTsBlockQueue();
} else {
- LOGGER.debug("Create SharedTsBlockQueue");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Create SharedTsBlockQueue");
+ }
queue =
new SharedTsBlockQueue(
remoteFragmentInstanceId, remotePlanNodeId, localMemoryManager, executorService);
@@ -841,7 +895,9 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
* <p>This method should be called when a fragment instance finished in an abnormal state.
*/
public void forceDeregisterFragmentInstance(TFragmentInstanceId fragmentInstanceId) {
- LOGGER.debug("[StartForceReleaseFIDataExchangeResource]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[StartForceReleaseFIDataExchangeResource]");
+ }
ISink sinkHandle = shuffleSinkHandles.get(fragmentInstanceId);
if (sinkHandle != null) {
sinkHandle.abort();
@@ -850,12 +906,16 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
Map<String, ISourceHandle> planNodeIdToSourceHandle = sourceHandles.get(fragmentInstanceId);
if (planNodeIdToSourceHandle != null) {
for (Entry<String, ISourceHandle> entry : planNodeIdToSourceHandle.entrySet()) {
- LOGGER.debug("[CloseSourceHandle] {}", entry.getKey());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[CloseSourceHandle] {}", entry.getKey());
+ }
entry.getValue().abort();
}
sourceHandles.remove(fragmentInstanceId);
}
- LOGGER.debug("[EndForceReleaseFIDataExchangeResource]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[EndForceReleaseFIDataExchangeResource]");
+ }
}
/**
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/LocalSourceHandle.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/LocalSourceHandle.java
index ec37a64b95a..51ac04d5fea 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/LocalSourceHandle.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/LocalSourceHandle.java
@@ -113,10 +113,12 @@ public class LocalSourceHandle implements ISourceHandle {
tsBlock = queue.remove();
}
if (tsBlock != null) {
- LOGGER.debug(
- "[GetTsBlockFromQueue] TsBlock:{} size:{}",
- currSequenceId,
- tsBlock.getRetainedSizeInBytes());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "[GetTsBlockFromQueue] TsBlock:{} size:{}",
+ currSequenceId,
+ tsBlock.getRetainedSizeInBytes());
+ }
currSequenceId++;
}
checkAndInvokeOnFinished();
@@ -182,7 +184,9 @@ public class LocalSourceHandle implements ISourceHandle {
return;
}
try (SetThreadName sourceHandleName = new SetThreadName(threadName)) {
- LOGGER.debug("[StartAbortLocalSourceHandle]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[StartAbortLocalSourceHandle]");
+ }
synchronized (queue) {
synchronized (this) {
if (aborted || closed) {
@@ -193,7 +197,9 @@ public class LocalSourceHandle implements ISourceHandle {
sourceHandleListener.onAborted(this);
}
}
- LOGGER.debug("[EndAbortLocalSourceHandle]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[EndAbortLocalSourceHandle]");
+ }
}
}
@@ -203,7 +209,9 @@ public class LocalSourceHandle implements ISourceHandle {
return;
}
try (SetThreadName sourceHandleName = new SetThreadName(threadName)) {
- LOGGER.debug("[StartAbortLocalSourceHandle]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[StartAbortLocalSourceHandle]");
+ }
synchronized (queue) {
synchronized (this) {
if (aborted || closed) {
@@ -214,7 +222,9 @@ public class LocalSourceHandle implements ISourceHandle {
sourceHandleListener.onAborted(this);
}
}
- LOGGER.debug("[EndAbortLocalSourceHandle]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[EndAbortLocalSourceHandle]");
+ }
}
}
@@ -224,7 +234,9 @@ public class LocalSourceHandle implements ISourceHandle {
return;
}
try (SetThreadName sourceHandleName = new SetThreadName(threadName)) {
- LOGGER.debug("[StartCloseLocalSourceHandle]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[StartCloseLocalSourceHandle]");
+ }
synchronized (queue) {
synchronized (this) {
if (aborted || closed) {
@@ -235,7 +247,9 @@ public class LocalSourceHandle implements ISourceHandle {
sourceHandleListener.onFinished(this);
}
}
- LOGGER.debug("[EndCloseLocalSourceHandle]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[EndCloseLocalSourceHandle]");
+ }
}
}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java
index bbf716a303c..500ac1ad417 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java
@@ -184,7 +184,9 @@ public class SourceHandle implements ISourceHandle {
return null;
}
long retainedSize = sequenceIdToDataBlockSize.remove(currSequenceId);
- LOGGER.debug("[GetTsBlockFromBuffer] sequenceId:{}, size:{}", currSequenceId, retainedSize);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[GetTsBlockFromBuffer] sequenceId:{}, size:{}", currSequenceId, retainedSize);
+ }
currSequenceId += 1;
bufferRetainedSizeInBytes -= retainedSize;
localMemoryManager
@@ -196,7 +198,9 @@ public class SourceHandle implements ISourceHandle {
retainedSize);
if (sequenceIdToTsBlock.isEmpty() && !isFinished()) {
- LOGGER.debug("[WaitForMoreTsBlock]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[WaitForMoreTsBlock]");
+ }
blocked = SettableFuture.create();
}
if (isFinished()) {
@@ -293,7 +297,9 @@ public class SourceHandle implements ISourceHandle {
}
public synchronized void setNoMoreTsBlocks(int lastSequenceId) {
- LOGGER.debug("[ReceiveNoMoreTsBlockEvent]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[ReceiveNoMoreTsBlockEvent]");
+ }
this.lastSequenceId = lastSequenceId;
if (!blocked.isDone() && remoteTsBlockedConsumedUp()) {
blocked.set(null);
@@ -305,11 +311,13 @@ public class SourceHandle implements ISourceHandle {
public synchronized void updatePendingDataBlockInfo(
int startSequenceId, List<Long> dataBlockSizes) {
- LOGGER.debug(
- "[ReceiveNewTsBlockNotification] [{}, {}), each size is: {}",
- startSequenceId,
- startSequenceId + dataBlockSizes.size(),
- dataBlockSizes);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "[ReceiveNewTsBlockNotification] [{}, {}), each size is: {}",
+ startSequenceId,
+ startSequenceId + dataBlockSizes.size(),
+ dataBlockSizes);
+ }
for (int i = 0; i < dataBlockSizes.size(); i++) {
sequenceIdToDataBlockSize.put(i + startSequenceId, dataBlockSizes.get(i));
}
@@ -497,12 +505,14 @@ public class SourceHandle implements ISourceHandle {
@SuppressWarnings("squid:S3776")
public void run() {
try (SetThreadName sourceHandleName = new SetThreadName(threadName)) {
- LOGGER.debug(
- "[StartPullTsBlocksFromRemote] {}-{} [{}, {}) ",
- remoteFragmentInstanceId,
- indexOfUpstreamSinkHandle,
- startSequenceId,
- endSequenceId);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "[StartPullTsBlocksFromRemote] {}-{} [{}, {}) ",
+ remoteFragmentInstanceId,
+ indexOfUpstreamSinkHandle,
+ startSequenceId,
+ endSequenceId);
+ }
TGetDataBlockRequest req =
new TGetDataBlockRequest(
remoteFragmentInstanceId,
@@ -534,7 +544,9 @@ public class SourceHandle implements ISourceHandle {
List<ByteBuffer> tsBlocks = new ArrayList<>(tsBlockNum);
tsBlocks.addAll(resp.getTsBlocks());
- LOGGER.debug("[EndPullTsBlocksFromRemote] Count:{}", tsBlockNum);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[EndPullTsBlocksFromRemote] Count:{}", tsBlockNum);
+ }
DATA_EXCHANGE_COUNT_METRIC_SET.recordDataBlockNum(
GET_DATA_BLOCK_NUM_CALLER, tsBlockNum);
executorService.submit(
@@ -546,7 +558,9 @@ public class SourceHandle implements ISourceHandle {
for (int i = startSequenceId; i < endSequenceId; i++) {
sequenceIdToTsBlock.put(i, tsBlocks.get(i - startSequenceId));
}
- LOGGER.debug("[PutTsBlocksIntoBuffer]");
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[PutTsBlocksIntoBuffer]");
+ }
if (!blocked.isDone()) {
blocked.set(null);
}
@@ -614,7 +628,9 @@ public class SourceHandle implements ISourceHandle {
@Override
public void run() {
try (SetThreadName sourceHandleName = new SetThreadName(threadName)) {
- LOGGER.debug("[SendACKTsBlock] [{}, {}).", startSequenceId, endSequenceId);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("[SendACKTsBlock] [{}, {}).", startSequenceId, endSequenceId);
+ }
int attempt = 0;
TAcknowledgeDataBlockEvent acknowledgeDataBlockEvent =
new TAcknowledgeDataBlockEvent(
@@ -665,10 +681,12 @@ public class SourceHandle implements ISourceHandle {
@Override
public void run() {
try (SetThreadName sourceHandleName = new SetThreadName(threadName)) {
- LOGGER.debug(
- "[SendCloseSinkChannelEvent] to [ShuffleSinkHandle: {}, index: {}]).",
- remoteFragmentInstanceId,
- indexOfUpstreamSinkHandle);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "[SendCloseSinkChannelEvent] to [ShuffleSinkHandle: {}, index: {}]).",
+ remoteFragmentInstanceId,
+ indexOfUpstreamSinkHandle);
+ }
int attempt = 0;
TCloseSinkChannelEvent closeSinkChannelEvent =
new TCloseSinkChannelEvent(remoteFragmentInstanceId, indexOfUpstreamSinkHandle);
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/AbstractOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/AbstractOperator.java
index b062998368a..c1b716d5894 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/AbstractOperator.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/AbstractOperator.java
@@ -51,7 +51,9 @@ public abstract class AbstractOperator implements Operator {
} else {
this.maxTupleSizeOfTsBlock = (int) (maxReturnSize / oneTupleSize);
}
- LOGGER.debug("maxTupleSizeOfTsBlock is:{}", maxTupleSizeOfTsBlock);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("maxTupleSizeOfTsBlock is:{}", maxTupleSizeOfTsBlock);
+ }
}
public TsBlock checkTsBlockSizeAndGetResult() {
@@ -86,7 +88,9 @@ public abstract class AbstractOperator implements Operator {
res = retainedTsBlock.getRegion(startOffset, maxTupleSizeOfTsBlock);
startOffset += maxTupleSizeOfTsBlock;
}
- LOGGER.debug("Current tsBlock size is : {}", res.getRetainedSizeInBytes());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Current tsBlock size is : {}", res.getRetainedSizeInBytes());
+ }
return res;
}