beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Work logged] (BEAM-4145) Java SDK Harness populates control request headers with worker id
Date Sat, 26 May 2018 00:58:00 GMT


ASF GitHub Bot logged work on BEAM-4145:

                Author: ASF GitHub Bot
            Created on: 26/May/18 00:57
            Start Date: 26/May/18 00:57
    Worklog Time Spent: 10m 
      Work Description: tgroh commented on a change in pull request #5456: [BEAM-4145] Populate
the worker_id metadata in the Java SDK Harness

 File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/
 @@ -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
- *
  * 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;
+package org.apache.beam.fn.harness.control;
- * A {@link} 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:
   I find this much more readable as a factory method than as an inline key and `MetadataUtils`
call - it tells us exactly the thing it does.

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:

Issue Time Tracking

    Worklog Id:     (was: 106090)
    Time Spent: 2h 50m  (was: 2h 40m)

> Java SDK Harness populates control request headers with worker id
> -----------------------------------------------------------------
>                 Key: BEAM-4145
>                 URL:
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-harness
>            Reporter: Ben Sidhom
>            Assignee: Thomas Groh
>            Priority: Minor
>          Time Spent: 2h 50m
>  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

View raw message