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

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

                Author: ASF GitHub Bot
            Created on: 28/Mar/18 15:59
            Start Date: 28/Mar/18 15:59
    Worklog Time Spent: 10m 
      Work Description: bsidhom commented on a change in pull request #4963: 
[BEAM-3326] Abstract away closing the inbound receiver, waiting for the bundle 
to finish, waiting for outbound to complete within the ActiveBundle.
URL: https://github.com/apache/beam/pull/4963#discussion_r177798196
 
 

 ##########
 File path: 
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/SdkHarnessClient.java
 ##########
 @@ -146,22 +154,92 @@ private BundleProcessor(
   }
 
   /** An active bundle for a particular {@link 
BeamFnApi.ProcessBundleDescriptor}. */
-  @AutoValue
-  public abstract static class ActiveBundle<InputT> {
-    public abstract String getBundleId();
-
-    public abstract CompletionStage<BeamFnApi.ProcessBundleResponse> 
getBundleResponse();
+  public static class ActiveBundle<InputT> implements AutoCloseable {
+    private final String bundleId;
+    private final CompletionStage<BeamFnApi.ProcessBundleResponse> response;
+    private final CloseableFnDataReceiver<WindowedValue<InputT>> inputReceiver;
+    private final Map<BeamFnApi.Target, InboundDataClient> outputClients;
 
-    public abstract CloseableFnDataReceiver<WindowedValue<InputT>> 
getInputReceiver();
-    public abstract Map<BeamFnApi.Target, InboundDataClient> 
getOutputClients();
-
-    public static <InputT> ActiveBundle<InputT> create(
+    private ActiveBundle(
         String bundleId,
         CompletionStage<BeamFnApi.ProcessBundleResponse> response,
-        CloseableFnDataReceiver<WindowedValue<InputT>> dataReceiver,
+        CloseableFnDataReceiver<WindowedValue<InputT>> inputReceiver,
         Map<BeamFnApi.Target, InboundDataClient> outputClients) {
-      return new AutoValue_SdkHarnessClient_ActiveBundle<>(
-          bundleId, response, dataReceiver, outputClients);
+      this.bundleId = bundleId;
+      this.response = response;
+      this.inputReceiver = inputReceiver;
+      this.outputClients = outputClients;
+    }
+
+    /**
+     * Returns an id used to represent this bundle.
+     */
+    public String getBundleId() {
+      return bundleId;
+    }
+
+    /**
+     * Returns a {@link FnDataReceiver receiver} which consumes input elements 
forwarding them
+     * to the SDK. When
 
 Review comment:
   Did you mean to complete this comment?

----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 85311)
    Time Spent: 4h 50m  (was: 4h 40m)

> Execute a Stage via the portability framework in the ReferenceRunner
> --------------------------------------------------------------------
>
>                 Key: BEAM-3326
>                 URL: https://issues.apache.org/jira/browse/BEAM-3326
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-core
>            Reporter: Thomas Groh
>            Assignee: Thomas Groh
>            Priority: Major
>              Labels: portability
>          Time Spent: 4h 50m
>  Remaining Estimate: 0h
>
> This is the supertask for remote execution in the Universal Local Runner 
> (BEAM-2899).
> This executes a stage remotely via portability framework APIs



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

Reply via email to