mcvsubbu commented on a change in pull request #4795: Enhance RoutingTable to
use ServerInstance
URL: https://github.com/apache/incubator-pinot/pull/4795#discussion_r343817291
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/transport/QueryRouter.java
##########
@@ -55,25 +56,27 @@ public QueryRouter(String brokerId, BrokerMetrics
brokerMetrics) {
}
public AsyncQueryResponse submitQuery(long requestId, String rawTableName,
- @Nullable BrokerRequest offlineBrokerRequest, @Nullable Map<String,
List<String>> offlineRoutingTable,
- @Nullable BrokerRequest realtimeBrokerRequest, @Nullable Map<String,
List<String>> realtimeRoutingTable,
+ @Nullable BrokerRequest offlineBrokerRequest, @Nullable
Map<ServerInstance, List<String>> offlineRoutingTable,
+ @Nullable BrokerRequest realtimeBrokerRequest, @Nullable
Map<ServerInstance, List<String>> realtimeRoutingTable,
long timeoutMs) {
assert offlineBrokerRequest != null || realtimeBrokerRequest != null;
// Build map from server to request based on the routing table
Map<Server, InstanceRequest> requestMap = new HashMap<>();
if (offlineBrokerRequest != null) {
assert offlineRoutingTable != null;
- for (Map.Entry<String, List<String>> entry :
offlineRoutingTable.entrySet()) {
- Server server = new Server(entry.getKey(), TableType.OFFLINE);
+ for (Map.Entry<ServerInstance, List<String>> entry :
offlineRoutingTable.entrySet()) {
Review comment:
You are probably planning to do that in the next step, but does it make
sense to get rid of the Server object, given that ServerInstance has everything
that Server has (and calls resolve by host name everytime it needs to log ?)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]