Source:
<code>public List<String> getSegmentMetadataFromServer(String tableNameWithType, Map<String, List<String>> serversToSegmentsMap, BiMap<String, String> endpoints, int timeoutMs) { LOGGER.debug("Reading segment metadata from servers for table {}.", tableNameWithType); List<String> serverURLs = new ArrayList<>(); for (Map.Entry<String, List<String>> serverToSegments : serversToSegmentsMap.entrySet()) { List<String> segments = serverToSegments.getValue(); for (String segment : segments) { serverURLs.add(generateSegmentMetadataServerURL(tableNameWithType, segment, endpoints.get(serverToSegments.getKey()))); } } BiMap<String, String> endpointsToServers = endpoints.inverse(); CompletionServiceHelper completionServiceHelper = new CompletionServiceHelper(_executor, _connectionManager, endpointsToServers); CompletionServiceHelper.CompletionServiceResponse serviceResponse = completionServiceHelper.doMultiGetRequest(serverURLs, tableNameWithType, timeoutMs); List<String> segmentsMetadata = new ArrayList<>(); int failedParses = 0; for (Map.Entry<String, String> streamResponse : serviceResponse._httpResponses.entrySet()) { try { JsonNode segmentMetadata = JsonUtils.stringToJsonNode(streamResponse.getValue()); segmentsMetadata.add(JsonUtils.objectToString(segmentMetadata)); } catch (IOException e) { failedParses++; <START> LOGGER.error("Unable to parse server response due to an error: ", e); <END> } } if (failedParses != 0) { LOGGER.warn("Failed to parse segment metadata responses from server.", failedParses); } LOGGER.debug("Retrieved segment metadata from servers."); return segmentsMetadata; }</code><technical_language>Add server name in log</technical_language>

Target:
public List<String> getSegmentMetadataFromServer(String tableNameWithType, Map<String, List<String>> serversToSegmentsMap, BiMap<String, String> endpoints, int timeoutMs) { LOGGER.debug("Reading segment metadata from servers for table {}.", tableNameWithType); List<String> serverURLs = new ArrayList<>(); for (Map.Entry<String, List<String>> serverToSegments : serversToSegmentsMap.entrySet()) { List<String> segments = serverToSegments.getValue(); for (String segment : segments) { serverURLs.add(generateSegmentMetadataServerURL(tableNameWithType, segment, endpoints.get(serverToSegments.getKey()))); } } BiMap<String, String> endpointsToServers = endpoints.inverse(); CompletionServiceHelper completionServiceHelper = new CompletionServiceHelper(_executor, _connectionManager, endpointsToServers); CompletionServiceHelper.CompletionServiceResponse serviceResponse = completionServiceHelper.doMultiGetRequest(serverURLs, tableNameWithType, timeoutMs); List<String> segmentsMetadata = new ArrayList<>(); int failedParses = 0; for (Map.Entry<String, String> streamResponse : serviceResponse._httpResponses.entrySet()) { try { String segmentMetadata = streamResponse.getValue(); segmentsMetadata.add(segmentMetadata); } catch (Exception e) { failedParses++; LOGGER.error("Unable to parse server response due to an error: ", streamResponse.getKey(), e); } } if (failedParses != 0) { LOGGER.error("Unable to parse server / response due to an error: ", failedParses, serverURLs.size()); } LOGGER.debug("Retrieved segment metadata from servers."); return segmentsMetadata; }