vrajat commented on code in PR #14451:
URL: https://github.com/apache/pinot/pull/14451#discussion_r1861534450
##########
pinot-controller/src/main/java/org/apache/pinot/controller/util/ServerSegmentMetadataReader.java:
##########
@@ -397,6 +398,35 @@ public ValidDocIdsBitmapResponse
getValidDocIdsBitmapFromServer(String tableName
return response;
}
+ public Map<String, List<NeedRefreshResponse>>
getSegmentsForRefreshFromServer(
+ String tableNameWithType, Set<String> serverInstances, BiMap<String,
String> endpoints, int timeoutMs) {
+ LOGGER.debug("Getting list of segments for refresh from servers for table
{}.", tableNameWithType);
+ List<String> serverURLs = new ArrayList<>();
+ for (String serverInstance : serverInstances) {
+ serverURLs.add(generateNeedRefreshSegmentsServerURL(tableNameWithType,
endpoints.get(serverInstance)));
+ }
+ BiMap<String, String> endpointsToServers = endpoints.inverse();
+ CompletionServiceHelper completionServiceHelper =
+ new CompletionServiceHelper(_executor, _connectionManager,
endpointsToServers);
+ CompletionServiceHelper.CompletionServiceResponse serviceResponse =
+ completionServiceHelper.doMultiGetRequest(serverURLs,
tableNameWithType, true, timeoutMs);
+ Map<String, List<NeedRefreshResponse>> serverResponses = new HashMap<>();
+
+ for (Map.Entry<String, String> streamResponse :
serviceResponse._httpResponses.entrySet()) {
+ try {
+ // TODO: RV - get the instance name instead of the endpoint
Review Comment:
The key used to be a URL instead of the server name. Fixed now.
--
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]