mouyang commented on issue #29577:
URL: https://github.com/apache/beam/issues/29577#issuecomment-1879160227
I tried a few things since this appeared similar to an issue I was
experiencing. It turned out my issue was not similar, but I'll share the mods
that ended up working.
1. Made Pojo implement Serializable => Got past initial exception (new
exception is expected).
```
java.lang.IllegalStateException: the keyCoder of a GroupByKey must be
deterministic
...
Caused by: org.apache.beam.sdk.coders.Coder$NonDeterministicException:
SerializableCoder(GithubIssue29577$Pojo) is not deterministic because:
```
2. Registered a Coder manually
```
CoderRegistry coderRegistry = p.getCoderRegistry();
SchemaRegistry schemaRegistry = p.getSchemaRegistry();
coderRegistry.registerCoderForClass(Pojo.class,
schemaRegistry.getSchemaCoder(Pojo.class));
```
The issue appears to be that the Coder for the corresponding Schema at
runtime (https://stackoverflow.com/a/70352977) but this is not sufficient for
your code because the exception is happening at build time (there isn't even a
Pipeline.run statement).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]