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

ASF GitHub Bot logged work on BEAM-12370:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/May/21 20:54
            Start Date: 27/May/21 20:54
    Worklog Time Spent: 10m 
      Work Description: xinyuiscool commented on a change in pull request 
#14883:
URL: https://github.com/apache/beam/pull/14883#discussion_r640959195



##########
File path: 
runners/samza/src/main/java/org/apache/beam/runners/samza/translation/SamzaPublishViewTranslator.java
##########
@@ -35,18 +36,25 @@ public void translate(
       SamzaPublishView<ElemT, ViewT> transform,
       TransformHierarchy.Node node,
       TranslationContext ctx) {
-    doTranslate(transform, node, ctx);
-  }
-
-  private static <ElemT, ViewT> void doTranslate(
-      SamzaPublishView<ElemT, ViewT> transform,
-      TransformHierarchy.Node node,
-      TranslationContext ctx) {
-
     final PCollection<List<ElemT>> input = ctx.getInput(transform);
     final MessageStream<OpMessage<Iterable<ElemT>>> inputStream = 
ctx.getMessageStream(input);
     @SuppressWarnings("unchecked")
     final Coder<WindowedValue<Iterable<ElemT>>> elementCoder = (Coder) 
SamzaCoders.of(input);
+    final String viewId = ctx.getViewId(transform.getView());
+
+    final MessageStream<OpMessage<Iterable<ElemT>>> outputStream =
+        doTranslate(
+            inputStream, elementCoder, ctx.getTransformId(), viewId, 
ctx.getPipelineOptions());
+
+    ctx.registerViewStream(transform.getView(), outputStream);
+  }
+
+  static <ElemT> MessageStream<OpMessage<Iterable<ElemT>>> doTranslate(

Review comment:
       This is what we chatted offline. The SamzaPublishView transform will 
only be created in native java. In the portable pipeline, we don't have this 
transform. Instead we need to analyze the sideinputIds from the executable 
stage proto payload to reconstruct the view.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 603256)
    Time Spent: 2.5h  (was: 2h 20m)

> Support side input in Samza portable runner
> -------------------------------------------
>
>                 Key: BEAM-12370
>                 URL: https://issues.apache.org/jira/browse/BEAM-12370
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-samza
>            Reporter: Xinyu Liu
>            Assignee: Xinyu Liu
>            Priority: P2
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> Add support of side input inside Samza portable runner.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to