GitHub user jkff opened a pull request:
https://github.com/apache/beam/pull/3649
[BEAM-2686] Towards deprecating PCollection.setCoder()
https://issues.apache.org/jira/browse/BEAM-2686
- Renames Source.getDefaultOutputCoder to Source.getOutputCoder (in a
compatible way), to avoid the implication that it is optional: it is not
optional.
- Requires specifying a Coder on PCollection.createPrimitiveOutputInternal:
as of this PR it can still be null (in which case coder will stay unset), but
eventually it won't be
- Removes all overrides of PTransform.getDefaultOutputCoder and deprecates
it: instead, PTransform's should explicitly .setCoder() on their output
collection
This PR is 3 boring, almost mechanical commits, each of which is large but
should be individually easy to review.
The next step (in a separate PR) will be getting rid of .setCoder() calls
in the SDK. Nearly all such calls are on results of ParDo.of() and
MapElements.via() and such - I'll need to add optional .withOutputCoder()
parameters to those transforms.
R: @robertwb
CC: @kennknowles
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jkff/incubator-beam set-coder
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/3649.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3649
----
commit c71762662812bb9b02b747790280c5d0a542b8e7
Author: Eugene Kirpichov <[email protected]>
Date: 2017-07-26T23:05:27Z
Makes all Source classes override getOutputCoder instead of
getDefaultOutputCoder
commit 7bb48421f739eef4ebca0faedae2b8af69cae567
Author: Eugene Kirpichov <[email protected]>
Date: 2017-07-27T00:14:58Z
Requires specifying a Coder on PCollection.createPrimitiveOutputInternal
The coder can still be null, in which case it is left unspecified.
commit 3653e56b885eeccf9d749d7d5b32969e9af5e043
Author: Eugene Kirpichov <[email protected]>
Date: 2017-07-26T23:33:36Z
Removes all overrides of PTransform.getDefaultOutputCoder and deprecates it
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---