beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
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

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

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
URL: https://github.com/apache/beam/pull/5456#discussion_r191034956
 
 

 ##########
 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:
   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:
users@infra.apache.org


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: 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: 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
(v7.6.3#76005)

Mime
View raw message