This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 7873b7bb90 Minor improve on leaf execution stats NPE handling (#11805)
7873b7bb90 is described below
commit 7873b7bb90950f0eebcbde9d24eef732261d3050
Author: Xiaotian (Jackie) Jiang <[email protected]>
AuthorDate: Fri Oct 13 23:54:16 2023 -0700
Minor improve on leaf execution stats NPE handling (#11805)
---
.../runtime/operator/LeafStageTransferableBlockOperator.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/LeafStageTransferableBlockOperator.java
b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/LeafStageTransferableBlockOperator.java
index 2eba9b5f9c..a6eae5b795 100644
---
a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/LeafStageTransferableBlockOperator.java
+++
b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/LeafStageTransferableBlockOperator.java
@@ -24,7 +24,6 @@ import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
@@ -96,7 +95,6 @@ public class LeafStageTransferableBlockOperator extends
MultiStageOperator {
_dataSchema = dataSchema;
_queryExecutor = queryExecutor;
_executorService = executorService;
- _executionStats = new HashMap<>();
Integer maxStreamingPendingBlocks =
QueryOptionsUtils.getMaxStreamingPendingBlocks(context.getOpChainMetadata());
_blockingQueue = new ArrayBlockingQueue<>(maxStreamingPendingBlocks !=
null ? maxStreamingPendingBlocks
: QueryOptionValue.DEFAULT_MAX_STREAMING_PENDING_BLOCKS);
@@ -142,8 +140,10 @@ public class LeafStageTransferableBlockOperator extends
MultiStageOperator {
private TransferableBlock constructMetadataBlock() {
// All data blocks have been returned. Record the stats and return EOS.
Map<String, String> executionStats = _executionStats;
- OperatorStats operatorStats = _opChainStats.getOperatorStats(_context,
getOperatorId());
- operatorStats.recordExecutionStats(executionStats);
+ if (executionStats != null) {
+ OperatorStats operatorStats = _opChainStats.getOperatorStats(_context,
getOperatorId());
+ operatorStats.recordExecutionStats(executionStats);
+ }
return TransferableBlockUtils.getEndOfStreamTransferableBlock();
}
@@ -195,7 +195,7 @@ public class LeafStageTransferableBlockOperator extends
MultiStageOperator {
// Collect the execution stats
Map<String, String> executionStats =
instanceResponseBlock.getResponseMetadata();
synchronized (LeafStageTransferableBlockOperator.this) {
- if (_executionStats.size() == 0) {
+ if (_executionStats == null) {
_executionStats = executionStats;
} else {
aggregateExecutionStats(_executionStats, executionStats);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]