Github user kohlmu-pivotal commented on a diff in the pull request: https://github.com/apache/geode/pull/716#discussion_r133779835 --- Diff: geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/operations/GetAvailableServersOperationHandler.java --- @@ -50,51 +37,19 @@ @Override public Result<ServerAPI.GetAvailableServersResponse> process( SerializationService serializationService, ServerAPI.GetAvailableServersRequest request, - Cache cache) { - - InternalDistributedSystem distributedSystem = - (InternalDistributedSystem) cache.getDistributedSystem(); - Properties properties = distributedSystem.getProperties(); - String locatorsString = properties.getProperty(ConfigurationProperties.LOCATORS); - - HashSet<DistributionLocatorId> locators = new HashSet(); - StringTokenizer stringTokenizer = new StringTokenizer(locatorsString, ","); - while (stringTokenizer.hasMoreTokens()) { - String locator = stringTokenizer.nextToken(); - if (StringUtils.isNotEmpty(locator)) { - locators.add(new DistributionLocatorId(locator)); - } - } + ExecutionContext executionContext) throws InvalidExecutionContextException { - TcpClient tcpClient = getTcpClient(); - for (DistributionLocatorId locator : locators) { - try { - return getGetAvailableServersFromLocator(tcpClient, locator.getHost()); - } catch (IOException | ClassNotFoundException e) { - // try the next locator - } - } - return Failure.of(ProtobufResponseUtilities.makeErrorResponse( - ProtocolErrorCode.DATA_UNREACHABLE.codeValue, "Unable to find a locator")); - } + InternalLocator locator = executionContext.getLocator(); + ArrayList servers2 = locator.getServerLocatorAdvisee().getLoadSnapshot().getServers(null); --- End diff -- I think if a 'null' is passed into the 'getServers' method, it should at least be explained that currently the server group functionality is not supported. Then a TODO could be added or a ticket can be raised to make sure this is not missed when server groups are supported
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---