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

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

                Author: ASF GitHub Bot
            Created on: 13/Apr/18 19:00
            Start Date: 13/Apr/18 19:00
    Worklog Time Spent: 10m 
      Work Description: bsidhom commented on a change in pull request #5118: 
[BEAM-4056] Identify side inputs by transform id and local name
URL: https://github.com/apache/beam/pull/5118#discussion_r181474184
 
 

 ##########
 File path: 
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/graph/ExecutableStage.java
 ##########
 @@ -122,11 +123,16 @@ default PTransform toPTransform() {
     pt.putInputs("input", getInputPCollection().getId());
     payload.setInput(input.getId());
 
-    int sideInputIndex = 0;
-    for (PCollectionNode sideInputNode : getSideInputPCollections()) {
-      pt.putInputs(String.format("side_input_%s", sideInputIndex), 
sideInputNode.getId());
-      payload.addSideInputs(sideInputNode.getId());
-      sideInputIndex++;
+    for (SideInputReference sideInput : getSideInputs()) {
+      // Side inputs of the ExecutableStage itself can be uniquely identified 
by inner PTransform
+      // name and local name.
+      String outerLocalName = String.format("%s:%s",
+          sideInput.transformId(), sideInput.localName());
+      pt.putInputs(outerLocalName, sideInput.getCollection().getId());
+      payload.addSideInputs(SideInputId.newBuilder()
 
 Review comment:
   Let me know if this is better.

----------------------------------------------------------------
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: 90943)
    Time Spent: 1h  (was: 50m)

> Identify Side Inputs by PTransform ID and local name
> ----------------------------------------------------
>
>                 Key: BEAM-4056
>                 URL: https://issues.apache.org/jira/browse/BEAM-4056
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-core
>            Reporter: Ben Sidhom
>            Assignee: Ben Sidhom
>            Priority: Minor
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> This is necessary in order to correctly identify side inputs during all 
> phases of portable pipeline execution (fusion, translation, and SDK 
> execution).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to