danny0405 commented on code in PR #13445:
URL: https://github.com/apache/hudi/pull/13445#discussion_r2155800910
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/BufferedRecordSerializer.java:
##########
@@ -34,49 +36,83 @@
*
*/
public class BufferedRecordSerializer<T> implements
CustomSerializer<BufferedRecord<T>> {
- public static final int KRYO_SERIALIZER_INITIAL_BUFFER_SIZE = 1048576;
- private final Kryo kryo;
- // Caching ByteArrayOutputStream to avoid recreating it for every operation
- private final ByteArrayOutputStream baos;
- private final RecordSerializer<T> recordSerializer;
+ // Caching kryo serializer to avoid creating kryo instance for every serde
operation
+ private static final ThreadLocal<InternalSerializerInstance> SERIALIZER_REF =
Review Comment:
The kryo creation happens once for each file group reader so the cost should
be low?
--
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]