[ https://issues.apache.org/jira/browse/BEAM-4145?focusedWorklogId=108696&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-108696 ]
ASF GitHub Bot logged work on BEAM-4145: ---------------------------------------- Author: ASF GitHub Bot Created on: 04/Jun/18 18:47 Start Date: 04/Jun/18 18:47 Worklog Time Spent: 10m Work Description: angoenka commented on a change in pull request #5456: [BEAM-4145] Populate the worker_id metadata in the Java SDK Harness URL: https://github.com/apache/beam/pull/5456#discussion_r192842380 ########## File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/AddHarnessIdInterceptor.java ########## @@ -6,31 +6,33 @@ * 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.reference.testing; -import io.grpc.ManagedChannel; -import io.grpc.inprocess.InProcessChannelBuilder; -import org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor; -import org.apache.beam.sdk.fn.channel.ManagedChannelFactory; +package org.apache.beam.fn.harness.control; -/** - * A {@link org.apache.beam.sdk.fn.channel.ManagedChannelFactory} that uses in-process channels. - * - * <p>The channel builder uses {@link ApiServiceDescriptor#getUrl()} as the unique in-process name. - */ -public class InProcessManagedChannelFactory extends ManagedChannelFactory { +import io.grpc.ClientInterceptor; +import io.grpc.Metadata; +import io.grpc.Metadata.Key; +import io.grpc.stub.MetadataUtils; + +/** A {@link ClientInterceptor} that attaches a provided SDK Harness ID to outgoing messages. */ +public class AddHarnessIdInterceptor { Review comment: SG ---------------------------------------------------------------- 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: 108696) Time Spent: 3h 10m (was: 3h) > Java SDK Harness populates control request headers with worker id > ----------------------------------------------------------------- > > Key: BEAM-4145 > URL: https://issues.apache.org/jira/browse/BEAM-4145 > Project: Beam > Issue Type: New Feature > Components: sdk-java-harness > Reporter: Ben Sidhom > Assignee: Thomas Groh > Priority: Minor > Time Spent: 3h 10m > Remaining Estimate: 0h > > Runner code needs to be able to identify incoming harness connections by the > worker ids that it assigns to them on creation. This is currently done by the > go boot code when the harness runs in a docker container. However, in-process > harnesses never specify worker ids. This prevents in-process harnesses from > being multiplexed by a runner (most likely the ULR and test code). -- This message was sent by Atlassian JIRA (v7.6.3#76005)