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

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

                Author: ASF GitHub Bot
            Created on: 27/Nov/19 01:30
            Start Date: 27/Nov/19 01:30
    Worklog Time Spent: 10m 
      Work Description: sambvfx commented on pull request #10229: [BEAM-8836] 
Make ExternalTransform unique_name unique
URL: https://github.com/apache/beam/pull/10229
 
 
   Using more than one ExternalTransform within the same pipeline causes a 
unique name clash.
   
   For a minimal reproducable example:
   
   Start ExpansionService/JobService:
   ```bash
   ./gradlew -p runners/flink/1.8/job-server runShadow
   ```
   
   Run a simple pipeljne:
   ```python
   from __future__ import print_function
   
   import apache_beam as beam
   from apache_beam.io.external.generate_sequence import GenerateSequence
   
   
   def main(options):
     pipe = beam.Pipeline(options=options)
   
     p1 = (
       pipe
       | 'P1' >> GenerateSequence(start=1, stop=5, 
expansion_service='localhost:8097')
     )
   
     p2 = (
       pipe
       | 'P2' >> GenerateSequence(start=5, stop=10, 
expansion_service='localhost:8097')
     )
   
     (p1, p2) | beam.Flatten() | beam.Map(print)
   
     # print(pipe.to_runner_api())
     result = pipe.run()
     result.wait_until_finish()
   
   
   if __name__ == '__main__':
     import argparse
     from apache_beam.options.pipeline_options import PipelineOptions
     parser = argparse.ArgumentParser()
     _, pipeline_args = parser.parse_known_args()
     main(PipelineOptions(pipeline_args))
   ```
   
   This results in this error in the expansion service / job service:
   
   ```
   INFO org.apache.beam.runners.core.construction.expansion.ExpansionService - 
Expanding 'root' with URN 'beam:external:java:generate_sequence:v1'
   INFO org.apache.beam.runners.core.construction.expansion.ExpansionService - 
Expanding 'root' with URN 'beam:external:java:generate_sequence:v1'
   WARN org.apache.beam.runners.fnexecution.jobsubmission.InMemoryJobService - 
Encountered Unexpected Exception during validation
   java.lang.IllegalArgumentException: pipeline: PCollections 
external_2root/Read(BoundedCountingSource)/Reshuffle.ViaRandomKey/Values/Values/Map/ParMultiDo(Anonymous).output
 and 
external_1root/Read(BoundedCountingSource)/Reshuffle.ViaRandomKey/Values/Values/Map/ParMultiDo(Anonymous).output
 both have unique_name 
"root/Read(BoundedCountingSource)/Reshuffle.ViaRandomKey/Values/Values/Map/ParMultiDo(Anonymous).output"
   ```
   
   This small change changes the expansion service log to:
   ```
   INFO org.apache.beam.runners.core.construction.expansion.ExpansionService - 
Expanding 'P1' with URN 'beam:external:java:generate_sequence:v1'
   INFO org.apache.beam.runners.core.construction.expansion.ExpansionService - 
Expanding 'P2' with URN 'beam:external:java:generate_sequence:v1'
   ```
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [ ] [**Choose 
reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and 
mention them in a comment (`R: @username`).
    - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA 
issue, if applicable. This will automatically link the pull request to the 
issue.
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more 
tips on [how to make review process 
smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
   
   Post-Commit Tests Status (on master branch)
   
------------------------------------------------------------------------------------------------
   
   Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
   --- | --- | --- | --- | --- | --- | --- | ---
   Go | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/)
 | --- | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/)
 | --- | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/)
   Java | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/)
   Python | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Python2/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python2/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Python35/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python35/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Python37/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python37/lastCompletedBuild/)
 | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Python35_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python35_VR_Flink/lastCompletedBuild/)
 | --- | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/)
   XLang | --- | --- | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/)
 | --- | --- | ---
   
   Pre-Commit Tests Status (on master branch)
   
------------------------------------------------------------------------------------------------
   
   --- |Java | Python | Go | Website
   --- | --- | --- | --- | ---
   Non-portable | [![Build 
Status](https://builds.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/)
 
   Portable | --- | [![Build 
Status](https://builds.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/)
 | --- | ---
   
   See 
[.test-infra/jenkins/README](https://github.com/apache/beam/blob/master/.test-infra/jenkins/README.md)
 for trigger phrase, status and link of all Jenkins jobs.
   
 
----------------------------------------------------------------
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: 350153)
    Remaining Estimate: 0h
            Time Spent: 10m

> ExternalTransform is not providing a unique name
> ------------------------------------------------
>
>                 Key: BEAM-8836
>                 URL: https://issues.apache.org/jira/browse/BEAM-8836
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Sam Bourne
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Using multiple ExternalTransform results in a naming collision. A simple 
> pipeline example:
> A minimal reproducable example:
> Start ExpansionService/JobService:
> ./gradlew -p runners/flink/1.8/job-server runShadow
> Then run a baisc pipeline with two ExternalTransforms:
> https://gist.github.com/sambvfx/e8b08acac8ded19e86ecefaa79a8a272



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

Reply via email to