danny0405 commented on code in PR #12949:
URL: https://github.com/apache/hudi/pull/12949#discussion_r1990386625
##########
hudi-common/src/main/java/org/apache/hudi/avro/AvroSchemaCache.java:
##########
@@ -32,19 +32,16 @@
public class AvroSchemaCache {
- // Ensure that there is only one variable instance of the same schema within
a entire JVM lifetime
- private static final Interner<Schema> SCHEMA_INTERNER =
Interners.newWeakInterner();
+ // Ensure that there is only one variable instance of the same schema within
an entire JVM lifetime
+ private static final LoadingCache<Schema, Schema> SCHEMA_CACHE =
Caffeine.newBuilder().maximumSize(1024).build(k -> k);
Review Comment:
... .weakValues().build()
--
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]