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

Method ReadBlockHeader

be/src/exec/sequence/hdfs-sequence-scanner.cc:499–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497}
498
499Status HdfsSequenceScanner::ReadBlockHeader() {
500 RETURN_IF_FALSE(stream_->ReadInt(&current_block_length_, &parse_status_));
501 if (current_block_length_ < 0) {
502 stringstream ss;
503 int64_t position = stream_->file_offset();
504 position -= sizeof(int32_t);
505 ss << stream_->filename() << " Bad block length: " << current_block_length_
506 << " at offset " << position;
507 return Status(ss.str());
508 }
509
510 RETURN_IF_FALSE(stream_->ReadInt(&current_key_length_, &parse_status_));
511 if (current_key_length_ < 0) {
512 stringstream ss;
513 int64_t position = stream_->file_offset();
514 position -= sizeof(int32_t);
515 ss << stream_->filename() << " Bad key length: " << current_key_length_
516 << " at offset " << position;
517 return Status(ss.str());
518 }
519
520 return Status::OK();
521}
522
523Status HdfsSequenceScanner::ReadCompressedBlock() {
524 int64_t num_buffered_records;

Callers

nothing calls this directly

Calls 6

OKFunction · 0.85
ReadIntMethod · 0.80
file_offsetMethod · 0.80
StatusClass · 0.50
filenameMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected