Closed sarthakaggarwal97 closed 6 months ago
@reta please take a look! Thank you :D I've added a test for the getters, however lmk if I should remove it. I think, in general, we don't need to test the getters/accessors.
I've added a test for the getters, however lmk if I should remove it. I think, in general, we don't need to test the getters/accessors.
@sarthakaggarwal97 sure, what is the practical reason of exposing these properties?
@reta I'm working on a plugin which requires me to have my own implementation of the Lucene90CompressingStoredFieldsFormat to optimize on read operations. With this implementation, I would like to add support for ZstdCompressionMode and ZstdNoDictCompressionMode which requires me to pass them as arguments, and custom-codecs package would be able to provide the compression modes out of the box while avoiding any code/implementation duplication. I don't see any risks in exposing the compression modes via getters. Please lmk if you see any concerns.
I don't see any risks in exposing the compression modes via getters. Please lmk if you see any concerns.
@sarthakaggarwal97 There are few issues here:
public CompressionMode getCompressionMode() {
return mode == ZSTD_NO_DICT ? zstdNoDictCompressionMode : zstdCompressionMode;
}
@reta yes, if we want to just fetch the compression mode, we should use the API you suggested. I've updated the PR to now return a map of compression modes against the respective Mode.
Description
Enables accessors for custom compression modes.
Issues Resolved
88
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.