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

Method ValidateScanRange

be/src/runtime/io/disk-io-mgr.cc:713–733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711}
712
713Status DiskIoMgr::ValidateScanRange(ScanRange* range) {
714 int disk_id = range->disk_id();
715 if (disk_id < 0 || disk_id >= disk_queues_.size()) {
716 return Status(TErrorCode::DISK_IO_ERROR, GetBackendString(),
717 Substitute("Invalid scan range. Bad disk id: $0", disk_id));
718 }
719 if (range->offset() < 0) {
720 return Status(TErrorCode::DISK_IO_ERROR, GetBackendString(),
721 Substitute("Invalid scan range. Negative offset $0", range->offset()));
722 }
723 if (range->len() <= 0) {
724 return Status(TErrorCode::DISK_IO_ERROR, GetBackendString(),
725 Substitute("Invalid scan range. Non-positive length $0", range->len()));
726 }
727 if (range->bytes_to_read() <= 0) {
728 return Status(TErrorCode::DISK_IO_ERROR, GetBackendString(),
729 Substitute("Invalid scan range. Non-positive bytes to read $0",
730 range->bytes_to_read()));
731 }
732 return Status::OK();
733}
734
735Status DiskIoMgr::AllocateBuffersForRange(
736 BufferPool::ClientHandle* bp_client, ScanRange* range, int64_t max_bytes) {

Callers 2

AddScanRangesMethod · 0.45
StartScanRangeMethod · 0.45

Calls 9

GetBackendStringFunction · 0.85
SubstituteFunction · 0.85
OKFunction · 0.85
bytes_to_readMethod · 0.80
StatusClass · 0.50
disk_idMethod · 0.45
sizeMethod · 0.45
offsetMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected