Joe McDonnell has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22599 )

Change subject: IMPALA-13795: Support serving webUI content with gzip 
compression
......................................................................


Patch Set 2:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/22599/2/be/src/util/codec.cc
File be/src/util/codec.cc:

http://gerrit.cloudera.org:8080/#/c/22599/2/be/src/util/codec.cc@105
PS2, Line 105:       compressor->reset(new GzipCompressor(GzipCompressor::GZIP, 
mem_pool, reuse,
             :           codec_info.compression_level_));
> I didn't pay attention to this in my first review round, but after Riza add
CodecInfo's compression_level_ defaults to 0, which would turn off compression 
for zlib. I've toyed with compression levels for other compression codecs like 
snappy/lz4 in the past, and I ended up adding the concept of 
UNSET_COMPRESSION_LEVEL which I set to INTMAXVAL. Zero can be a valid 
compression level, but INTMAXVAL won't be. Individual codecs can detect 
UNSET_COMPRESSION_LEVEL and use the default.

I agree with Alexey that this change seems unnecessary for the webserver change.


http://gerrit.cloudera.org:8080/#/c/22599/2/be/src/util/compress.cc
File be/src/util/compress.cc:

http://gerrit.cloudera.org:8080/#/c/22599/2/be/src/util/compress.cc@49
PS2, Line 49:   DCHECK_IN_RANGE(compression_level, -1, 9);
We don't want to hard-code these values. There are macros in zlib.h that 
correspond to these values, so use those and include a comment here.


http://gerrit.cloudera.org:8080/#/c/22599/2/be/src/util/compress.cc@334
PS2, Line 334:     DCHECK_IN_RANGE(clevel, -7, 29);
We don't want to hard-code these values. zstd.h has functions that return the 
min/max levels (and we use them to validate the compression_codec query 
option). Sometimes compression libraries add new compression levels and we 
don't want to need to maintain these numbers ourselves.



--
To view, visit http://gerrit.cloudera.org:8080/22599
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I431088a30337bbef2c8d6e16dd15fb6572db0f15
Gerrit-Change-Number: 22599
Gerrit-PatchSet: 2
Gerrit-Owner: Surya Hebbar <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Surya Hebbar <[email protected]>
Gerrit-Comment-Date: Fri, 28 Mar 2025 20:24:17 +0000
Gerrit-HasComments: Yes

Reply via email to