ankitsultana commented on code in PR #13999:
URL: https://github.com/apache/pinot/pull/13999#discussion_r1762433863
##########
pinot-core/src/main/java/org/apache/pinot/core/query/request/ServerQueryRequest.java:
##########
@@ -107,6 +107,28 @@ public ServerQueryRequest(Server.ServerRequest
serverRequest, ServerMetrics serv
_timerContext = new TimerContext(_queryContext.getTableName(),
serverMetrics, queryArrivalTimeMs);
}
+ /**
+ * To be used by Time Series Query Engine.
+ */
+ public ServerQueryRequest(QueryContext queryContext, List<String>
segmentsToQuery, Map<String, String> metadata,
+ ServerMetrics serverMetrics) {
+ long queryArrivalTimeMs = System.currentTimeMillis();
+ _queryContext = queryContext;
+
+ // Initialize metadata
+ _requestId =
Long.parseLong(metadata.getOrDefault(Request.MetadataKeys.REQUEST_ID, "0"));
+ _brokerId = metadata.getOrDefault(Request.MetadataKeys.BROKER_ID,
"unknown");
+ _enableTrace =
Boolean.parseBoolean(metadata.getOrDefault(Request.MetadataKeys.ENABLE_TRACE,
"false"));
+ _enableStreaming =
Boolean.parseBoolean(metadata.getOrDefault(Request.MetadataKeys.ENABLE_STREAMING,
"false"));
+ _queryId = QueryIdUtils.getQueryId(_brokerId, _requestId,
+
TableNameBuilder.getTableTypeFromTableName(_queryContext.getTableName()));
+
+ _segmentsToQuery = segmentsToQuery;
+ _optionalSegments = null;
+
+ _timerContext = new TimerContext(_queryContext.getTableName(),
serverMetrics, queryArrivalTimeMs);
Review Comment:
We will require more metrics for sure. We will pick it up next month since
we need to productionize this in October.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]