smiklosovic commented on code in PR #4523:
URL: https://github.com/apache/cassandra/pull/4523#discussion_r2620315003
##########
src/java/org/apache/cassandra/io/compress/ZstdDictionaryCompressor.java:
##########
@@ -76,9 +80,28 @@ public static ZstdDictionaryCompressor create(Map<String,
String> options)
{
int level = getOrDefaultCompressionLevel(options);
validateCompressionLevel(level);
+ validateTrainingParameter(TRAINING_MAX_DICTIONARY_SIZE_PARAMETER_NAME,
+
options.getOrDefault(TRAINING_MAX_DICTIONARY_SIZE_PARAMETER_NAME,
+
DEFAULT_TRAINING_MAX_DICTIONARY_SIZE_PARAMETER_VALUE));
+
validateTrainingParameter(TRAINING_MAX_TOTAL_SAMPLE_SIZE_PARAMETER_NAME,
+
options.getOrDefault(TRAINING_MAX_TOTAL_SAMPLE_SIZE_PARAMETER_NAME,
+
DEFAULT_TRAINING_MAX_TOTAL_SAMPLE_SIZE_PARAMETER_VALUE));
return getOrCreate(level, null);
}
+ private static void validateTrainingParameter(String parameterName, String
resolvedValue)
Review Comment:
we might probably move this to `IDictionaryCompressor`. If some other dict
compressor is introduced, it would be there to reuse in the impl of that
compressor.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]