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

Method UpdateDecompressor

be/src/exec/hdfs-scanner.cc:744–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

742}
743
744Status HdfsScanner::UpdateDecompressor(const THdfsCompression::type& compression) {
745 // Check whether the file in the stream has different compression from the last one.
746 if (compression != decompression_type_) {
747 if (decompression_type_ != THdfsCompression::NONE) {
748 // Close the previous decompressor before creating a new one.
749 DCHECK(decompressor_.get() != NULL);
750 decompressor_->Close();
751 decompressor_.reset(NULL);
752 }
753 // The LZO-compression scanner is implemented in a dynamically linked library and it
754 // is not created at Codec::CreateDecompressor().
755 if (compression != THdfsCompression::NONE && compression != THdfsCompression::LZO) {
756 RETURN_IF_ERROR(Codec::CreateDecompressor(data_buffer_pool_.get(),
757 scan_node_->tuple_desc()->string_slots().empty(), compression, &decompressor_));
758 }
759 decompression_type_ = compression;
760 }
761 return Status::OK();
762}
763
764Status HdfsScanner::UpdateDecompressor(const string& codec) {
765 map<const string, const THdfsCompression::type>::const_iterator

Callers

nothing calls this directly

Calls 10

OKFunction · 0.85
StatusClass · 0.70
getMethod · 0.65
resetMethod · 0.65
CloseMethod · 0.45
emptyMethod · 0.45
tuple_descMethod · 0.45
findMethod · 0.45
endMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected