Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 288A4165D4E for ; Tue, 22 Aug 2017 02:06:11 +0200 (CEST) Received: (qmail 93569 invoked by uid 500); 22 Aug 2017 00:06:09 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 93077 invoked by uid 99); 22 Aug 2017 00:06:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2017 00:06:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 21618E00C5; Tue, 22 Aug 2017 00:06:08 +0000 (UTC) From: galen-pivotal To: dev@geode.apache.org Reply-To: dev@geode.apache.org References: In-Reply-To: Subject: [GitHub] geode pull request #716: GEODE-3406: Locator accepts Protobuf requests Content-Type: text/plain Message-Id: <20170822000608.21618E00C5@git1-us-west.apache.org> Date: Tue, 22 Aug 2017 00:06:08 +0000 (UTC) Github user galen-pivotal commented on a diff in the pull request: https://github.com/apache/geode/pull/716#discussion_r134358612 --- Diff: geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/operations/GetAvailableServersOperationHandler.java --- @@ -50,51 +37,23 @@ @Override public Result process( SerializationService serializationService, ServerAPI.GetAvailableServersRequest request, - Cache cache) { - - InternalDistributedSystem distributedSystem = - (InternalDistributedSystem) cache.getDistributedSystem(); - Properties properties = distributedSystem.getProperties(); - String locatorsString = properties.getProperty(ConfigurationProperties.LOCATORS); + MessageExecutionContext executionContext) throws InvalidExecutionContextException { - HashSet locators = new HashSet(); - StringTokenizer stringTokenizer = new StringTokenizer(locatorsString, ","); - while (stringTokenizer.hasMoreTokens()) { - String locator = stringTokenizer.nextToken(); - if (StringUtils.isNotEmpty(locator)) { - locators.add(new DistributionLocatorId(locator)); - } + InternalLocator locator = executionContext.getLocator(); + ArrayList serversFromSnapshot = --- End diff -- I don't like that this has to go so far in to get a list of servers. I'd like to see the DUnit test (or an integration test using a real Locator) come back just so we can have some guarantee that `InternalLocator` doesn't change on us. --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---