Adar Dembo has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/15078 )

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
Reviewed-on: http://gerrit.cloudera.org:8080/15078
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
---
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(-)

Approvals:
  Kudu Jenkins: Verified
  Andrew Wong: Looks good to me, approved
  Alexey Serbin: Looks good to me, approved

--
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: merged
Gerrit-Change-Id: I900458b7c7ed4be02906479becaaf60bad379029
Gerrit-Change-Number: 15078
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to