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 acbbd01317 reduce Java enum .values() usage in TimerContext (#12579)
acbbd01317 is described below
commit acbbd01317e9a65b8baa51a982442d22b7eeebd1
Author: sullis <[email protected]>
AuthorDate: Wed Mar 6 13:59:40 2024 -0800
reduce Java enum .values() usage in TimerContext (#12579)
---
.../java/org/apache/pinot/core/query/request/context/TimerContext.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/TimerContext.java
b/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/TimerContext.java
index 175da9258a..be6fbbd7f1 100644
---
a/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/TimerContext.java
+++
b/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/TimerContext.java
@@ -25,10 +25,11 @@ import org.apache.pinot.common.metrics.ServerQueryPhase;
public class TimerContext {
+ private static final int SERVER_QUERY_PHASE_COUNT =
ServerQueryPhase.values().length;
private final String _tableNameWithType;
private final ServerMetrics _serverMetrics;
private final long _queryArrivalTimeMs;
- private final Timer[] _phaseTimers = new
Timer[ServerQueryPhase.values().length];
+ private final Timer[] _phaseTimers = new Timer[SERVER_QUERY_PHASE_COUNT];
public class Timer {
private final ServerQueryPhase _queryPhase;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]