beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugene Kirpichov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-1660) withCoder() error in JdbcIO JavaDoc example
Date Thu, 09 Mar 2017 14:33:38 GMT

    [ https://issues.apache.org/jira/browse/BEAM-1660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15903124#comment-15903124
] 

Eugene Kirpichov commented on BEAM-1660:
----------------------------------------

Agreed about the coder issue: we should take advantage of coder inference if possible. Though
that should probably be a separate JIRA, and a feature request rather than a bug.

> withCoder() error in JdbcIO JavaDoc example
> -------------------------------------------
>
>                 Key: BEAM-1660
>                 URL: https://issues.apache.org/jira/browse/BEAM-1660
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-extensions
>    Affects Versions: 0.6.0
>            Reporter: Xu Mingmin
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>              Labels: JavaDoc, JdbcIO
>
> Follow the JavaDoc of JdbcIO, job fails with exception:
> {code}
> Exception in thread "main" java.lang.IllegalStateException: JdbcIO.read() requires a
coder to be set via withCoder(coder)
> 	at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
> 	at org.apache.beam.sdk.io.jdbc.JdbcIO$Read.validate(JdbcIO.java:329)
> 	at org.apache.beam.sdk.io.jdbc.JdbcIO$Read.validate(JdbcIO.java:249)
> 	at org.apache.beam.sdk.Pipeline.applyInternal(Pipeline.java:419)
> 	at org.apache.beam.sdk.Pipeline.applyTransform(Pipeline.java:350)
> 	at org.apache.beam.sdk.values.PBegin.apply(PBegin.java:58)
> 	at org.apache.beam.sdk.Pipeline.apply(Pipeline.java:172)
> {code}
> It requires a Coder provided by withCoder. Need to add it in the example.
> Other point is, does it really need to specify a Coder? Users should register it with
CoderRegistry I think.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message