Hi Tobias,
PubusbIO accepts .withCoder(Coder<T> coder) with T is the type of the
PCollection elements (PCollection<T>).
So, you TableRowJsonCoder should be a class implementing Coder interface
with Type T. Is it the case ?
Thanks,
Regards
JB
On 02/21/2017 12:03 PM, Tobias Feldhaus wrote:
Hi,
According to this commit [0] it seems to me that there were some changes
in the way the Coder interface is
being used.
Before switching from the Dataflow SDK 1.9 this code was working for me
(I already adjusted the way PubSubIO is accessed):
.apply("WriteToPubSub", PubsubIO.write()
.topic(topic)
.withCoder(TableRowJsonCoder.of())
.timestampLabel("ts"));
Now withCoder(Coder<T> coder) no longer accepts the instance of
TableRowJsonCoder. I have checked that
the TableRowJsonCoder is still registered as a StandardCoder [1] in the
current master - how is it being used now?
Thank you for all your effort,
Tobi
[0]
https://github.com/apache/beam/commit/7b98fa08d14e8121e8885f00a9a9a878b73f81a6
[1]
https://github.com/apache/beam/blob/d9657ffc37490b063835672e0b5287b4d18aba96/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/CoderRegistry.java#L94
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com