Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::DiskIoMgr::DiskQueue Struct Reference

Per disk state. More...

#include <disk-io-mgr-internal.h>

Collaboration diagram for impala::DiskIoMgr::DiskQueue:

Public Member Functions

void EnqueueContext (RequestContext *worker)
 Enqueue the request context to the disk queue. The DiskQueue lock must not be taken. More...
 
 DiskQueue (int id)
 

Public Attributes

int disk_id
 Disk id (0-based) More...
 
boost::mutex lock
 Lock that protects access to 'request_contexts' and 'work_available'. More...
 
boost::condition_variable work_available
 
std::list< RequestContext * > request_contexts
 list of all request contexts that have work queued on this disk More...
 

Detailed Description

Per disk state.

Definition at line 39 of file disk-io-mgr-internal.h.

Constructor & Destructor Documentation

impala::DiskIoMgr::DiskQueue::DiskQueue ( int  id)
inline

Definition at line 67 of file disk-io-mgr-internal.h.

Member Function Documentation

void impala::DiskIoMgr::DiskQueue::EnqueueContext ( RequestContext worker)
inline

Enqueue the request context to the disk queue. The DiskQueue lock must not be taken.

Check that the reader is not already on the queue

Definition at line 56 of file disk-io-mgr-internal.h.

References lock, request_contexts, and work_available.

Member Data Documentation

int impala::DiskIoMgr::DiskQueue::disk_id
boost::mutex impala::DiskIoMgr::DiskQueue::lock

Lock that protects access to 'request_contexts' and 'work_available'.

Definition at line 44 of file disk-io-mgr-internal.h.

Referenced by EnqueueContext(), and impala::DiskIoMgr::GetNextRequestRange().

std::list<RequestContext*> impala::DiskIoMgr::DiskQueue::request_contexts

list of all request contexts that have work queued on this disk

Definition at line 53 of file disk-io-mgr-internal.h.

Referenced by EnqueueContext(), and impala::DiskIoMgr::GetNextRequestRange().

boost::condition_variable impala::DiskIoMgr::DiskQueue::work_available

Condition variable to signal the disk threads that there is work to do or the thread should shut down. A disk thread will be woken up when there is a reader added to the queue. A reader is only on the queue when it has at least one scan range that is not blocked on available buffers.

Definition at line 50 of file disk-io-mgr-internal.h.

Referenced by EnqueueContext(), and impala::DiskIoMgr::GetNextRequestRange().


The documentation for this struct was generated from the following file: