Hello Alexey Serbin, Andrew Wong,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/15078

to review the following change.


Change subject: compression: fix handling of NO_COMPRESSION
......................................................................

compression: fix handling of NO_COMPRESSION

The string values of CompressionType and GetCompressionCodecType() did not
agree: the former used NO_COMPRESSION and the latter NONE to indicate the
lack of compression. This led to some unnecessary warnings when a
stringified CompressionType was fed into GetCompressionCodecType(), as is
done in log-test.

This patch changes GetCompressionCodecType() to expect NO_COMPRESSION rather
than NONE. It shouldn't affect backwards compatibility: if someone really
does use NONE (i.e. in a gflag), they'll just get no compression anyway,
albeit with the ugly warning. That's not ideal, but the alternative (use
NONE in CompressionType) may break backwards compatibility in JSON encoding,
and NO_COMPRESSION is the value we use in our public APIs.

Change-Id: I900458b7c7ed4be02906479becaaf60bad379029
---
M src/kudu/cfile/cfile_writer.cc
M src/kudu/consensus/log-test.cc
M src/kudu/consensus/log.cc
M src/kudu/integration-tests/disk_reservation-itest.cc
M src/kudu/integration-tests/raft_consensus-itest-base.cc
M src/kudu/integration-tests/raft_consensus-itest.cc
M src/kudu/integration-tests/ts_recovery-itest.cc
M src/kudu/util/compression/compression_codec.cc
8 files changed, 13 insertions(+), 23 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/78/15078/1
--
To view, visit http://gerrit.cloudera.org:8080/15078
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I900458b7c7ed4be02906479becaaf60bad379029
Gerrit-Change-Number: 15078
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>

Reply via email to