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

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

                Author: ASF GitHub Bot
            Created on: 20/Apr/18 23:21
            Start Date: 20/Apr/18 23:21
    Worklog Time Spent: 10m 
      Work Description: bsidhom commented on a change in pull request #5152: 
[BEAM-3327] Harness Manager Interfaces
URL: https://github.com/apache/beam/pull/5152#discussion_r183188114
 
 

 ##########
 File path: 
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/manager/SdkHarnessManager.java
 ##########
 @@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.beam.runners.fnexecution.manager;
+
+import org.apache.beam.model.fnexecution.v1.ProvisionApi;
+import org.apache.beam.runners.core.construction.graph.ExecutableStage;
+import org.apache.beam.runners.fnexecution.artifact.ArtifactSource;
+import org.apache.beam.runners.fnexecution.control.RemoteBundle;
+import org.apache.beam.runners.fnexecution.state.StateRequestHandler;
+
+/**
+ * A manager of resources related to the SDK Harness, capable of providing 
RemoteBundles to runner
+ * operators.
+ *
+ * <p>In order to provide a simple interface to runner operators, the 
SdkHarnessManager is
+ * responsible for owning and managing the lifetimes of resources such as RPC 
servers and remote
+ * environments. It is responsible for both instantiation and cleanup of these 
resources.  Since all
+ * managed resources are owned by the SdkHarnessManager, it is responsible for 
cleaning them up when
+ * its close function is called.
+ */
+public interface SdkHarnessManager extends AutoCloseable {
+  /**
+   * Get a new {@link RemoteBundle bundle} for processing the data in an 
executable stage.
+   *
+   * <p>If necessary, this blocks while provisioning the remote resources 
necessary to support
+   * bundle processing.
+   */
+  <InputT> RemoteBundle<InputT> getBundle(
 
 Review comment:
   Keeping each harness manager scoped to a job is an interesting idea. On the 
other hand, doing so does require us to use another layer to actually cache and 
manage the managers so that we don't have more than one per job per JVM. The 
entire point of the harness manager is precisely to scope and reuse 
environments for different operators running on the same machine (for the same 
job).
   
   It seems like the worker id should be part of the `EnvironmentSession` or 
whatever we want to call it now. That also changes the flow of information to 
and from the docker factory a bit (whoever creates/manages sessions is now 
responsible for worker id generation), but that should be a simple refactor.

----------------------------------------------------------------
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: 93483)
    Time Spent: 15h 20m  (was: 15h 10m)

> 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 20m
>  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