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 <awong@cloudera.com>
Reviewed-by: Alexey Serbin <aserbin@cloudera.com>
8 files changed