From b9c2b521421266582ab59f0323f4eb2d19b7864b Mon Sep 17 00:00:00 2001 From: Gonzalo Ortiz Date: Wed, 5 Feb 2025 11:17:06 +0100 Subject: [PATCH] Fix checkstyle issues --- .../pinot/query/mailbox/channel/MailboxStatusLogger.java | 1 + .../apache/pinot/query/runtime/operator/BaseJoinOperator.java | 4 ++-- .../apache/pinot/query/runtime/operator/HashJoinOperator.java | 1 - .../runtime/operator/utils/BlockingMultiStreamConsumer.java | 2 +- .../query/runtime/plan/server/ServerPlanRequestUtils.java | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/channel/MailboxStatusLogger.java b/pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/channel/MailboxStatusLogger.java index fb85dc07c0e6..600239dabb03 100644 --- a/pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/channel/MailboxStatusLogger.java +++ b/pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/channel/MailboxStatusLogger.java @@ -63,6 +63,7 @@ public void onError(Throwable t) { default: LOGGER.warn("Mailbox from {} to {} failed with unknown GRPC error on server side", _context.getStageId(), _receiverStage, t); + break; } } else { LOGGER.warn("Mailbox from {} to {} failed with unknown error on server side", diff --git a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/BaseJoinOperator.java b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/BaseJoinOperator.java index 23d7c29710aa..106f837e45ac 100644 --- a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/BaseJoinOperator.java +++ b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/BaseJoinOperator.java @@ -27,7 +27,6 @@ import org.apache.pinot.calcite.rel.hint.PinotHintOptions.JoinHintOptions; import org.apache.pinot.common.datablock.DataBlock; import org.apache.pinot.common.datatable.StatMap; -import org.apache.pinot.common.exception.QueryException; import org.apache.pinot.common.response.ProcessingException; import org.apache.pinot.common.utils.DataSchema; import org.apache.pinot.common.utils.config.QueryOptionsUtils; @@ -40,6 +39,7 @@ import org.apache.pinot.query.runtime.operator.operands.TransformOperandFactory; import org.apache.pinot.query.runtime.plan.MultiStageQueryStats; import org.apache.pinot.query.runtime.plan.OpChainExecutionContext; +import org.apache.pinot.spi.exception.QException; import org.apache.pinot.spi.utils.BooleanUtils; import org.apache.pinot.spi.utils.CommonConstants.Broker.Request.QueryOptionKey; import org.apache.pinot.spi.utils.CommonConstants.MultiStageQueryRunner.JoinOverFlowMode; @@ -307,7 +307,7 @@ protected boolean isMaxRowsLimitReached(int numJoinedRows) protected static void throwProcessingExceptionForJoinRowLimitExceeded(String reason) throws ProcessingException { ProcessingException resourceLimitExceededException = - new ProcessingException(QueryException.SERVER_RESOURCE_LIMIT_EXCEEDED_ERROR_CODE); + new ProcessingException(QException.SERVER_RESOURCE_LIMIT_EXCEEDED_ERROR_CODE); resourceLimitExceededException.setMessage(reason + ". Consider increasing the limit for the maximum number of rows in a join either via the query option '" + QueryOptionKey.MAX_ROWS_IN_JOIN + "' or the '" + JoinHintOptions.MAX_ROWS_IN_JOIN + "' hint in the '" diff --git a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java index 56c8b7822262..b51fc216ecb6 100644 --- a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java +++ b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java @@ -32,7 +32,6 @@ import org.apache.pinot.query.runtime.blocks.TransferableBlock; import org.apache.pinot.query.runtime.blocks.TransferableBlockUtils; import org.apache.pinot.query.runtime.plan.OpChainExecutionContext; -import org.apache.pinot.spi.exception.QException; import org.apache.pinot.spi.utils.BooleanUtils; import org.apache.pinot.spi.utils.CommonConstants.MultiStageQueryRunner.JoinOverFlowMode; diff --git a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/utils/BlockingMultiStreamConsumer.java b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/utils/BlockingMultiStreamConsumer.java index 1d3fc9b6a792..830e093a1071 100644 --- a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/utils/BlockingMultiStreamConsumer.java +++ b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/utils/BlockingMultiStreamConsumer.java @@ -295,7 +295,7 @@ protected TransferableBlock onTimeout() { protected TransferableBlock onException(Exception e) { // TODO: Should we send the hostname to the users? String errMsg = "Server " + _serverAddress.hostname() + " found an error while reading on stage " - + _stats.getCurrentStageId() + " waiting for data sent by stage " + _senderStageId; + + _stats.getCurrentStageId() + " waiting for data sent by stage " + _senderStageId; // We log this case as warn because contrary to the timeout case, it should be rare to finish an execution // with an exception and the stack trace may be useful to find the root cause. LOGGER.warn(errMsg, e); diff --git a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/server/ServerPlanRequestUtils.java b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/server/ServerPlanRequestUtils.java index 9c9a69224d44..50799d5d06e4 100644 --- a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/server/ServerPlanRequestUtils.java +++ b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/server/ServerPlanRequestUtils.java @@ -64,7 +64,6 @@ import org.apache.pinot.sql.parsers.rewriter.PredicateComparisonRewriter; import org.apache.pinot.sql.parsers.rewriter.QueryRewriter; import org.apache.pinot.sql.parsers.rewriter.QueryRewriterFactory; -import org.slf4j.MDC; public class ServerPlanRequestUtils {