[ https://issues.apache.org/jira/browse/BEAM-9577?focusedWorklogId=431572&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-431572 ]
ASF GitHub Bot logged work on BEAM-9577: ---------------------------------------- Author: ASF GitHub Bot Created on: 07/May/20 06:20 Start Date: 07/May/20 06:20 Worklog Time Spent: 10m Work Description: ihji commented on a change in pull request #11521: URL: https://github.com/apache/beam/pull/11521#discussion_r421047427 ########## File path: runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/GrpcFnServer.java ########## @@ -39,6 +43,59 @@ return new GrpcFnServer<>(server, service, apiServiceDescriptor.build()); } + /** + * Create a {@link GrpcFnServer}s for the provided {@link FnService}s running on an arbitrary + * port. + */ + public static List<GrpcFnServer<? extends FnService>> allocatePortAndCreateFor( + List<? extends FnService> services, ServerFactory factory) throws IOException { + ApiServiceDescriptor.Builder apiServiceDescriptor = ApiServiceDescriptor.newBuilder(); + Server server = + factory.allocateAddressAndCreate( + Collections.unmodifiableList(services), apiServiceDescriptor); + AtomicInteger countdown = new AtomicInteger(services.size()); + return Lists.transform( + services, + service -> + new SharedGrpcFnServer<>(server, service, apiServiceDescriptor.build(), countdown)); + } + + /** + * Create a {@link GrpcFnServer}s for the provided {@link FnService}s running on a specified port. Review comment: `Create {@link GrpcFnServer}s`? ########## File path: runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/GrpcFnServer.java ########## @@ -39,6 +43,59 @@ return new GrpcFnServer<>(server, service, apiServiceDescriptor.build()); } + /** + * Create a {@link GrpcFnServer}s for the provided {@link FnService}s running on an arbitrary Review comment: `Create {@link GrpcFnServer}s`? ########## File path: runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/DefaultJobBundleFactory.java ########## @@ -613,7 +620,7 @@ public synchronized void close() { // These will be closed in the reverse creation order: try (AutoCloseable envCloser = environment; AutoCloseable provisioningServer = serverInfo.getProvisioningServer(); - AutoCloseable retrievalServer = serverInfo.getRetrievalServer(); + AutoCloseable retrievalServer = serverInfo.getLegacyRetrievalServer(); Review comment: Shouldn't we also close `retrievalServer`? ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 431572) Time Spent: 20.5h (was: 20h 20m) > Update artifact staging and retrieval protocols to be dependency aware. > ----------------------------------------------------------------------- > > Key: BEAM-9577 > URL: https://issues.apache.org/jira/browse/BEAM-9577 > Project: Beam > Issue Type: Improvement > Components: beam-model > Reporter: Robert Bradshaw > Assignee: Robert Bradshaw > Priority: Major > Time Spent: 20.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)