You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Xu Mingmin (JIRA)" <ji...@apache.org> on 2017/03/08 20:38:38 UTC
[jira] [Created] (BEAM-1660) does JdbcIO need withCoder() mandately
Xu Mingmin created BEAM-1660:
--------------------------------
Summary: does JdbcIO need withCoder() mandately
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: Xu Mingmin
Priority: Minor
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)