[jira] [Updated] (BEAM-8140) Python API: PTransform should be immutable and reusable

2020-06-10 Thread Beam JIRA Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/BEAM-8140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Beam JIRA Bot updated BEAM-8140:

Labels:   (was: stale-assigned)

> Python API: PTransform should be immutable and reusable
> ---
>
> Key: BEAM-8140
> URL: https://issues.apache.org/jira/browse/BEAM-8140
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Chris Suchanek
>Priority: P2
>
> While the Java API seems fine the Python API is (at least) counterintuitive.
> Let's see the following example:
> {code:python}
> p1 = beam.Pipeline()
> p2 = beam.Pipeline()
> node = 'ReadTrainData' >> beam.io.ReadFromText("/tmp/aaa.txt")
> p1 | node 
> p2 | node //fails here {code}
> The code above will fail because the _node_ somehow remembers that it was 
> already attached to _p1_. In fact, unlike in Java, the | (apply) method is 
> defined on the _PTransform_.
> If any, only the pipeline object should be mutable here.



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


[jira] [Updated] (BEAM-8140) Python API: PTransform should be immutable and reusable

2020-06-01 Thread Kenneth Knowles (Jira)


 [ 
https://issues.apache.org/jira/browse/BEAM-8140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kenneth Knowles updated BEAM-8140:
--
Labels: stale-assigned  (was: )

> Python API: PTransform should be immutable and reusable
> ---
>
> Key: BEAM-8140
> URL: https://issues.apache.org/jira/browse/BEAM-8140
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Chris Suchanek
>Assignee: Robert Bradshaw
>Priority: P2
>  Labels: stale-assigned
>
> While the Java API seems fine the Python API is (at least) counterintuitive.
> Let's see the following example:
> {code:python}
> p1 = beam.Pipeline()
> p2 = beam.Pipeline()
> node = 'ReadTrainData' >> beam.io.ReadFromText("/tmp/aaa.txt")
> p1 | node 
> p2 | node //fails here {code}
> The code above will fail because the _node_ somehow remembers that it was 
> already attached to _p1_. In fact, unlike in Java, the | (apply) method is 
> defined on the _PTransform_.
> If any, only the pipeline object should be mutable here.



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


[jira] [Updated] (BEAM-8140) Python API: PTransform should be immutable and reusable

2019-10-15 Thread Kenneth Knowles (Jira)


 [ 
https://issues.apache.org/jira/browse/BEAM-8140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kenneth Knowles updated BEAM-8140:
--
Summary: Python API: PTransform should be immutable and reusable  (was: 
Python API: PTransform should be immutable)

> Python API: PTransform should be immutable and reusable
> ---
>
> Key: BEAM-8140
> URL: https://issues.apache.org/jira/browse/BEAM-8140
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Chris Suchandk
>Assignee: Robert Bradshaw
>Priority: Major
>
> While the Java API seems fine the Python API is (at least) counterintuitive.
> Let's see the following example:
> {code:python}
> p1 = beam.Pipeline()
> p2 = beam.Pipeline()
> node = 'ReadTrainData' >> beam.io.ReadFromText("/tmp/aaa.txt")
> p1 | node 
> p2 | node //fails here {code}
> The code above will fail because the _node_ somehow remembers that it was 
> already attached to _p1_. In fact, unlike in Java, the | (apply) method is 
> defined on the _PTransform_.
> If any, only the pipeline object should be mutable here.



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