RustedBones commented on a change in pull request #16271:
URL: https://github.com/apache/beam/pull/16271#discussion_r778182570
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/coders/AvroCoder.java
##########
@@ -272,26 +263,8 @@ public Schema get() {
}
}
- /**
- * A {@link Serializable} object that lazily supplies a {@link ReflectData}
built from the
- * appropriate {@link ClassLoader} for the type encoded by this {@link
AvroCoder}.
- */
- private static class SerializableReflectDataSupplier
- implements Serializable, Supplier<ReflectData> {
-
- private final Class<?> clazz;
-
- private SerializableReflectDataSupplier(Class<?> clazz) {
- this.clazz = clazz;
- }
-
- @Override
- public ReflectData get() {
- ReflectData reflectData = new ReflectData(clazz.getClassLoader());
- reflectData.addLogicalTypeConversion(new JodaTimestampConversion());
- return reflectData;
- }
- }
+ private final AvroSource.DatumReaderFactory<T> readerFactory;
+ private final AvroSink.DatumWriterFactory<T> writerFactory;
Review comment:
Edit: I've added the factories in the constructor.
`AvroCoderCloudObjectTranslator` will not take in account custom factories
in current versions
--
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]