MCPcopy Create free account
hub / github.com/apache/impala / GetCompressionCodec

Function GetCompressionCodec

be/src/kudu/util/compression/compression_codec.cc:247–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245};
246
247Status GetCompressionCodec(CompressionType compression,
248 const CompressionCodec** codec) {
249 switch (compression) {
250 case NO_COMPRESSION:
251 *codec = nullptr;
252 break;
253 case SNAPPY:
254 *codec = SnappyCodec::GetSingleton();
255 break;
256 case LZ4:
257 *codec = Lz4Codec::GetSingleton();
258 break;
259 case ZLIB:
260 *codec = ZlibCodec::GetSingleton();
261 break;
262 default:
263 return Status::NotFound("bad compression type");
264 }
265 return Status::OK();
266}
267
268CompressionType GetCompressionCodecType(const std::string& name) {
269 std::string uname;

Callers 3

TestCompressionCodecFunction · 0.85
BenchmarkFunction · 0.85
TEST_FFunction · 0.85

Calls 2

NotFoundFunction · 0.85
OKFunction · 0.85

Tested by 3

TestCompressionCodecFunction · 0.68
BenchmarkFunction · 0.68
TEST_FFunction · 0.68