Skip to content

Source.getDefaultOutputCoder() - add a version that allows access to a CoderRegistry #18177

@kennknowles

Description

@kennknowles

The Source API's getDefaultOutputCoder currently takes no parameters. This means that you can't access the coder registry to ask for coders based on the type.

The PTransform API's version of getDefaultOutputCoder has 3 different form, which do allow access to the coder registry if necessary.

However, while working on BEAM-1040 (Hadoop IO connector), we realized that a source does not always know it's output type, and thus will need to calculate the coder at run time. To do this, it would be helpful to have a reference to the CoderRegistry - we should look at what we're doing on PTransform and decide if we should port that over onto Source.

Imported from Jira BEAM-1171. Original Jira may contain additional context.
Reported by: sisk.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions