You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/02 23:51:00 UTC

[jira] [Work logged] (BEAM-3914) 'Unzip' flattens before performing fusion

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

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

                Author: ASF GitHub Bot
            Created on: 02/Apr/18 23:50
            Start Date: 02/Apr/18 23:50
    Worklog Time Spent: 10m 
      Work Description: youngoli commented on a change in pull request #4977: [BEAM-3914] Deduplicate Unzipped Flattens after Pipeline Fusion
URL: https://github.com/apache/beam/pull/4977#discussion_r178635373
 
 

 ##########
 File path: runners/core-construction-java/src/test/java/org/apache/beam/runners/core/construction/graph/GreedyPipelineFuserTest.java
 ##########
 @@ -452,26 +466,59 @@ public void flattenWithHeterogenousInputsAndOutputsEntirelyMaterialized() {
     FusedPipeline fused =
         GreedyPipelineFuser.fuse(Pipeline.newBuilder().setComponents(components).build());
 
+    assertThat(fused.getRunnerExecutedTransforms(), hasSize(3));
     assertThat(
+        "The runner should include the impulses for both languages, plus an introduced flatten",
         fused.getRunnerExecutedTransforms(),
-        containsInAnyOrder(
+        hasItems(
             PipelineNode.pTransform("pyImpulse", components.getTransformsOrThrow("pyImpulse")),
             PipelineNode.pTransform("goImpulse", components.getTransformsOrThrow("goImpulse"))));
+
+    PTransformNode flattenNode = null;
+    for (PTransformNode runnerTransform : fused.getRunnerExecutedTransforms()) {
+      if (!(runnerTransform.getId().equals("pyImpulse")
+          || runnerTransform.getId().equals("goImpulse"))) {
+        flattenNode = runnerTransform;
 
 Review comment:
   This for loop is attempting to get the synthetic flatten, right? Could the condition be changed to make that more obvious, for example by checking for the flatten's ID instead?

----------------------------------------------------------------
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: 86850)
    Time Spent: 40m  (was: 0.5h)

> 'Unzip' flattens before performing fusion
> -----------------------------------------
>
>                 Key: BEAM-3914
>                 URL: https://issues.apache.org/jira/browse/BEAM-3914
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-core
>            Reporter: Thomas Groh
>            Assignee: Thomas Groh
>            Priority: Major
>              Labels: portability
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> This consists of duplicating nodes downstream of a flatten that exist within an environment, and reintroducing the flatten immediately upstream of a runner-executed transform (the flatten should be executed within the runner)



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