Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <disk-io-mgr.h>
Public Member Functions | |
ScanRange * | scan_range () |
char * | buffer () |
int64_t | buffer_len () |
int64_t | len () |
bool | eosr () |
int64_t | scan_range_offset () const |
Returns the offset within the scan range that this buffer starts at. More... | |
void | SetMemTracker (MemTracker *tracker) |
void | Return () |
Private Member Functions | |
BufferDescriptor (DiskIoMgr *io_mgr) | |
void | Reset (RequestContext *reader, ScanRange *range, char *buffer, int64_t buffer_len) |
Resets the buffer descriptor state for a new reader, range and data buffer. More... | |
Private Attributes | |
DiskIoMgr * | io_mgr_ |
RequestContext * | reader_ |
Reader that this buffer is for. More... | |
MemTracker * | mem_tracker_ |
The current tracker this buffer is associated with. More... | |
ScanRange * | scan_range_ |
Scan range that this buffer is for. More... | |
char * | buffer_ |
buffer with the read contents More... | |
int64_t | buffer_len_ |
length of buffer_. For buffers from cached reads, the length is 0. More... | |
int64_t | len_ |
length of read contents More... | |
bool | eosr_ |
true if the current scan range is complete More... | |
Status | status_ |
Status of the read to this buffer. if status is not ok, 'buffer' is NULL. More... | |
int64_t | scan_range_offset_ |
Friends | |
class | DiskIoMgr |
Buffer struct that is used by the caller and IoMgr to pass read buffers. It is is expected that only one thread has ownership of this object at a time.
Definition at line 196 of file disk-io-mgr.h.
|
private |
Definition at line 161 of file disk-io-mgr.cc.
|
inline |
Definition at line 199 of file disk-io-mgr.h.
References buffer_.
Referenced by impala::DiskIoMgrStress::ClientThread(), impala::BufferedBlockMgr::PinBlock(), impala::HdfsParquetScanner::ProcessFooter(), impala::TEST_F(), impala::DiskIoMgrTest::ValidateScanRange(), and impala::DiskIoMgrTest::ValidateSyncRead().
|
inline |
Definition at line 200 of file disk-io-mgr.h.
References buffer_len_.
Referenced by impala::RowBatch::AcquireState(), impala::RowBatch::AddIoBuffer(), and impala::RowBatch::TransferResourceOwnership().
|
inline |
Definition at line 202 of file disk-io-mgr.h.
References eosr_.
Referenced by impala::DiskIoMgr::ScanRange::EnqueueBuffer(), impala::DiskIoMgr::ScanRange::GetNext(), and impala::BufferedBlockMgr::PinBlock().
|
inline |
Definition at line 201 of file disk-io-mgr.h.
References len_.
Referenced by impala::DiskIoMgrStress::ClientThread(), impala::BufferedBlockMgr::PinBlock(), impala::HdfsParquetScanner::ProcessFooter(), impala::TEST_F(), impala::DiskIoMgrTest::ValidateScanRange(), and impala::DiskIoMgrTest::ValidateSyncRead().
|
private |
Resets the buffer descriptor state for a new reader, range and data buffer.
Definition at line 165 of file disk-io-mgr.cc.
References impala::Status::OK.
Referenced by impala::DiskIoMgr::GetBufferDesc().
void DiskIoMgr::BufferDescriptor::Return | ( | ) |
Returns the buffer to the IoMgr. This must be called for every buffer returned by GetNext()/Read() that did not return an error. This is non-blocking.
Definition at line 182 of file disk-io-mgr.cc.
Referenced by impala::DiskIoMgr::ScanRange::CleanupQueuedBuffers(), impala::DiskIoMgrStress::ClientThread(), impala::DiskIoMgr::ScanRange::EnqueueBuffer(), impala::BufferedBlockMgr::PinBlock(), impala::HdfsParquetScanner::ProcessFooter(), impala::DiskIoMgrTest::ValidateScanRange(), and impala::DiskIoMgrTest::ValidateSyncRead().
|
inline |
Definition at line 198 of file disk-io-mgr.h.
References scan_range_.
|
inline |
Returns the offset within the scan range that this buffer starts at.
Definition at line 205 of file disk-io-mgr.h.
References scan_range_offset_.
Referenced by impala::DiskIoMgrStress::ClientThread(), impala::TEST_F(), and impala::DiskIoMgrTest::ValidateScanRange().
void DiskIoMgr::BufferDescriptor::SetMemTracker | ( | MemTracker * | tracker | ) |
Updates this buffer buffer to be owned by the new tracker. Consumption is release from the current tracker and added to the new one.
Definition at line 187 of file disk-io-mgr.cc.
References impala::MemTracker::Consume(), and tracker.
Referenced by impala::RowBatch::AcquireState(), impala::RowBatch::AddIoBuffer(), impala::DiskIoMgr::GetBufferDesc(), impala::DiskIoMgr::ReturnFreeBuffer(), and impala::RowBatch::TransferResourceOwnership().
|
friend |
Definition at line 216 of file disk-io-mgr.h.
|
private |
buffer with the read contents
Definition at line 235 of file disk-io-mgr.h.
Referenced by buffer(), impala::DiskIoMgr::ScanRange::EnqueueBuffer(), impala::DiskIoMgr::HandleReadFinished(), impala::DiskIoMgr::ReturnBuffer(), and impala::DiskIoMgr::ReturnFreeBuffer().
|
private |
length of buffer_. For buffers from cached reads, the length is 0.
Definition at line 238 of file disk-io-mgr.h.
Referenced by buffer_len(), and impala::DiskIoMgr::ReturnFreeBuffer().
|
private |
true if the current scan range is complete
Definition at line 244 of file disk-io-mgr.h.
Referenced by eosr(), impala::DiskIoMgr::HandleReadFinished(), impala::DiskIoMgr::ScanRange::ReadFromCache(), impala::DiskIoMgr::ReadRange(), and impala::DiskIoMgr::ReturnBuffer().
|
private |
Definition at line 223 of file disk-io-mgr.h.
|
private |
length of read contents
Definition at line 241 of file disk-io-mgr.h.
Referenced by len(), impala::DiskIoMgr::ScanRange::ReadFromCache(), and impala::DiskIoMgr::ReadRange().
|
private |
The current tracker this buffer is associated with.
Definition at line 229 of file disk-io-mgr.h.
|
private |
Reader that this buffer is for.
Definition at line 226 of file disk-io-mgr.h.
Referenced by impala::DiskIoMgr::ReturnBuffer().
|
private |
Scan range that this buffer is for.
Definition at line 232 of file disk-io-mgr.h.
Referenced by impala::DiskIoMgr::HandleReadFinished(), impala::DiskIoMgr::ReturnBuffer(), and scan_range().
|
private |
Definition at line 249 of file disk-io-mgr.h.
Referenced by impala::DiskIoMgr::ScanRange::ReadFromCache(), impala::DiskIoMgr::ReadRange(), and scan_range_offset().
|
private |
Status of the read to this buffer. if status is not ok, 'buffer' is NULL.
Definition at line 247 of file disk-io-mgr.h.
Referenced by impala::DiskIoMgr::HandleReadFinished(), impala::DiskIoMgr::ReadRange(), and impala::DiskIoMgr::ReturnBuffer().