[ 
https://issues.apache.org/jira/browse/BEAM-3327?focusedWorklogId=93486&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-93486
 ]

ASF GitHub Bot logged work on BEAM-3327:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Apr/18 23:25
            Start Date: 20/Apr/18 23:25
    Worklog Time Spent: 10m 
      Work Description: angoenka commented on a change in pull request #5189: 
[BEAM-3327] Basic Docker environment factory
URL: https://github.com/apache/beam/pull/5189#discussion_r183186307
 
 

 ##########
 File path: 
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/FnApiControlClientPoolService.java
 ##########
 @@ -17,45 +17,50 @@
  */
 package org.apache.beam.runners.fnexecution.control;
 
+import static com.google.common.base.Preconditions.checkState;
+
 import io.grpc.stub.StreamObserver;
+import java.util.ArrayList;
 import java.util.Collection;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.atomic.AtomicBoolean;
+import javax.annotation.concurrent.GuardedBy;
 import org.apache.beam.model.fnexecution.v1.BeamFnApi;
 import org.apache.beam.model.fnexecution.v1.BeamFnControlGrpc;
 import org.apache.beam.runners.fnexecution.FnService;
 import org.apache.beam.runners.fnexecution.HeaderAccessor;
-import org.apache.beam.sdk.fn.function.ThrowingConsumer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** A Fn API control service which adds incoming SDK harness connections to a 
pool. */
+/** A Fn API control service which adds incoming SDK harness connections to a 
sink. */
 public class FnApiControlClientPoolService extends 
BeamFnControlGrpc.BeamFnControlImplBase
     implements FnService {
   private static final Logger LOGGER = 
LoggerFactory.getLogger(FnApiControlClientPoolService.class);
 
-  private final ThrowingConsumer<? super FnApiControlClient> clientPool;
-  private final Collection<FnApiControlClient> vendedClients = new 
CopyOnWriteArrayList<>();
+  private final Object lock = new Object();
+  private final ControlClientPool.Sink clientSink;
   private final HeaderAccessor headerAccessor;
-  private AtomicBoolean closed = new AtomicBoolean();
+
+  @GuardedBy("lock")
 
 Review comment:
   Nice!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 93486)
    Time Spent: 15h 40m  (was: 15.5h)

> Add abstractions to manage Environment Instance lifecycles.
> -----------------------------------------------------------
>
>                 Key: BEAM-3327
>                 URL: https://issues.apache.org/jira/browse/BEAM-3327
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-core
>            Reporter: Thomas Groh
>            Assignee: Ben Sidhom
>            Priority: Major
>              Labels: portability
>          Time Spent: 15h 40m
>  Remaining Estimate: 0h
>
> This permits remote stage execution for arbitrary environments



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to