[ https://issues.apache.org/jira/browse/BEAM-5187?focusedWorklogId=139599&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-139599 ]
ASF GitHub Bot logged work on BEAM-5187: ---------------------------------------- Author: ASF GitHub Bot Created on: 30/Aug/18 08:27 Start Date: 30/Aug/18 08:27 Worklog Time Spent: 10m Work Description: mxm commented on a change in pull request #6287: [BEAM-5187] Add a ProcessJobBundleFactory for process-based execution URL: https://github.com/apache/beam/pull/6287#discussion_r213943954 ########## File path: runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/environment/ProcessManager.java ########## @@ -0,0 +1,157 @@ +/* + * 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.environment; + +import static com.google.common.base.Preconditions.checkNotNull; + +import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.ImmutableList; +import java.io.File; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.concurrent.ThreadSafe; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** A simple process manager which forks processes and kills them if necessary. */ +@ThreadSafe +class ProcessManager { + private static final Logger LOG = LoggerFactory.getLogger(ProcessManager.class); + + private static final ProcessManager INSTANCE = new ProcessManager(); + + private final Map<String, Process> processes; + + public static ProcessManager getInstance() { + return INSTANCE; Review comment: Absolutely, the `ProcessManager` needs to be instantiated per `ProcessEnvironmentFactory`. Getting rid of the static instance also makes testing easier. ---------------------------------------------------------------- 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: 139599) Time Spent: 5.5h (was: 5h 20m) > Create a ProcessJobBundleFactory for non-dockerized SDK harness > --------------------------------------------------------------- > > Key: BEAM-5187 > URL: https://issues.apache.org/jira/browse/BEAM-5187 > Project: Beam > Issue Type: New Feature > Components: runner-core > Reporter: Maximilian Michels > Assignee: Maximilian Michels > Priority: Minor > Time Spent: 5.5h > Remaining Estimate: 0h > > As discussed on the mailing list [1], we want to giver users an option to > execute portable pipelines without Docker. Analog to the > {{DockerJobBundleFactory}}, a {{ProcessJobBundleFactory}} could be added to > directly fork SDK harness processes. > Artifacts will be provided by an artifact directory or could be setup similar > to the existing bootstrapping code ("boot.go") which we use for containers. > The process-based execution can optionally be configured via the pipeline > options. > [1] > [https://lists.apache.org/thread.html/d8b81e9f74f77d74c8b883cda80fa48efdcaf6ac2ad313c4fe68795a@%3Cdev.beam.apache.org%3E] -- This message was sent by Atlassian JIRA (v7.6.3#76005)