apurtell commented on code in PR #4353:
URL: https://github.com/apache/hbase/pull/4353#discussion_r855525069
##########
hbase-compression/hbase-compression-zstd/src/main/java/org/apache/hadoop/hbase/io/compress/zstd/ZstdCodec.java:
##########
@@ -121,10 +123,10 @@ static int getLevel(Configuration conf) {
}
static int getBufferSize(Configuration conf) {
- int size = conf.getInt(ZSTD_BUFFER_SIZE_KEY,
+ return conf.getInt(ZSTD_BUFFER_SIZE_KEY,
conf.getInt(CommonConfigurationKeys.IO_COMPRESSION_CODEC_ZSTD_BUFFER_SIZE_KEY,
-
CommonConfigurationKeys.IO_COMPRESSION_CODEC_ZSTD_BUFFER_SIZE_DEFAULT));
- return size > 0 ? size : 256 * 1024; // Don't change this default
+ // IO_COMPRESSION_CODEC_ZSTD_BUFFER_SIZE_DEFAULT is 0! We can't allow
that.
Review Comment:
It is Hadoop's default, IO_COMPRESSION_CODEC_ZSTD_BUFFER_SIZE_DEFAULT is a
Hadoop constant. We reuse these where we can. But the value of '0' gives an
error creating the (Hadoop) compression stream. So we don't accept it here.
--
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]