beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xu Mingmin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BEAM-1660) does JdbcIO need withCoder() mandately
Date Wed, 08 Mar 2017 20:38:38 GMT
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)

Mime
View raw message