[ https://issues.apache.org/jira/browse/BEAM-5850?focusedWorklogId=158291&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-158291 ]
ASF GitHub Bot logged work on BEAM-5850: ---------------------------------------- Author: ASF GitHub Bot Created on: 24/Oct/18 20:11 Start Date: 24/Oct/18 20:11 Worklog Time Spent: 10m Work Description: lukecwik commented on a change in pull request #6786: [BEAM-5850] Add BeamFnDataReceiver and make process, finish and start run on the same thread to support metrics. URL: https://github.com/apache/beam/pull/6786#discussion_r227942433 ########## File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/EnqueuingFnDataReceiver.java ########## @@ -0,0 +1,41 @@ +/* + * 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.fn.harness.data; + +import java.util.concurrent.SynchronousQueue; +import org.apache.beam.sdk.fn.data.FnDataReceiver; + + +/** + * A {@link FnDataReceiver} which forwards all received inputs to a collection of {@link + * FnDataReceiver receivers}. + */ +public class EnqueuingFnDataReceiver<T> implements FnDataReceiver<T> { + + private final SynchronousQueue<T> queue; Review comment: I don't know how much value there is to make this a public class. Lets hide it as an implementation detail (static class) within BeamFnDataReadRunner.java ---------------------------------------------------------------- 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: 158291) Time Spent: 10m Remaining Estimate: 0h > Make process, finish and start run on the same thread to support metrics. > ------------------------------------------------------------------------- > > Key: BEAM-5850 > URL: https://issues.apache.org/jira/browse/BEAM-5850 > Project: Beam > Issue Type: New Feature > Components: java-fn-execution > Reporter: Alex Amato > Assignee: Alex Amato > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > Update BeamFnDataReceiver to place elements into a Queue and consumer then > and call the element processing receiver in blockTillReadFinishes -- This message was sent by Atlassian JIRA (v7.6.3#76005)