You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sumitagrawl (via GitHub)" <gi...@apache.org> on 2025/03/14 08:41:46 UTC
Re: [PR] HDDS-12582. TypedTable support using different codec [ozone]
sumitagrawl commented on code in PR #8073:
URL: https://github.com/apache/ozone/pull/8073#discussion_r1995120804
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/TypedTable.java:
##########
@@ -94,25 +95,33 @@ public TypedTable(RDBTable rawTable,
CodecRegistry codecRegistry, Class<KEY> keyType,
Class<VALUE> valueType,
CacheType cacheType, String threadNamePrefix) throws IOException {
- this.rawTable = Objects.requireNonNull(rawTable, "rawTable==null");
- Objects.requireNonNull(codecRegistry, "codecRegistry == null");
-
- this.keyType = Objects.requireNonNull(keyType, "keyType == null");
- this.keyCodec = codecRegistry.getCodecFromClass(keyType);
- Objects.requireNonNull(keyCodec, "keyCodec == null");
-
- this.valueType = Objects.requireNonNull(valueType, "valueType == null");
- this.valueCodec = codecRegistry.getCodecFromClass(valueType);
- Objects.requireNonNull(valueCodec, "valueCodec == null");
-
- this.supportCodecBuffer = keyCodec.supportCodecBuffer()
Review Comment:
We can not put above check before being used as java restriction,
public TypedTable(RDBTable rawTable,
CodecRegistry codecRegistry, Class<KEY> keyType,
Class<VALUE> valueType,
CacheType cacheType, String threadNamePrefix) throws IOException {
> **<---- before this(), its not allowed to add above check, and after this() has no meaning of this check.**
this(rawTable, codecRegistry.getCodecFromClass(keyType), codecRegistry.getCodecFromClass(valueType),
cacheType, threadNamePrefix);
}
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org