Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::DiskIoMgrTest Class Reference
Inheritance diagram for impala::DiskIoMgrTest:
Collaboration diagram for impala::DiskIoMgrTest:

Public Member Functions

void WriteValidateCallback (int num_writes, DiskIoMgr::WriteRange **written_range, DiskIoMgr *io_mgr, DiskIoMgr::RequestContext *reader, int32_t *data, Status expected_status, const Status &status)
 
void WriteCompleteCallback (int num_writes, const Status &status)
 

Protected Member Functions

void CreateTempFile (const char *filename, const char *data)
 
int CreateTempFile (const char *filename, int file_size)
 
DiskIoMgr::ScanRangeInitRange (int num_buffers, const char *file_path, int offset, int len, int disk_id, int64_t mtime, void *meta_data=NULL, bool is_cached=false)
 

Static Protected Member Functions

static void ValidateEmptyOrCorrect (const char *expected, const char *buffer, int len)
 
static void ValidateSyncRead (DiskIoMgr *io_mgr, DiskIoMgr::RequestContext *reader, DiskIoMgr::ScanRange *range, const char *expected, int expected_len=-1)
 
static void ValidateScanRange (DiskIoMgr::ScanRange *range, const char *expected, int expected_len, const Status &expected_status)
 
static void ScanRangeThread (DiskIoMgr *io_mgr, DiskIoMgr::RequestContext *reader, const char *expected_result, int expected_len, const Status &expected_status, int max_ranges, AtomicInt< int > *num_ranges_processed)
 

Protected Attributes

scoped_ptr< ObjectPoolpool_
 
mutex written_mutex_
 
condition_variable writes_done_
 
int num_ranges_written_
 

Detailed Description

Definition at line 41 of file disk-io-mgr-test.cc.

Member Function Documentation

void impala::DiskIoMgrTest::CreateTempFile ( const char *  filename,
const char *  data 
)
inlineprotected

Definition at line 76 of file disk-io-mgr-test.cc.

int impala::DiskIoMgrTest::CreateTempFile ( const char *  filename,
int  file_size 
)
inlineprotected

Definition at line 83 of file disk-io-mgr-test.cc.

DiskIoMgr::ScanRange* impala::DiskIoMgrTest::InitRange ( int  num_buffers,
const char *  file_path,
int  offset,
int  len,
int  disk_id,
int64_t  mtime,
void *  meta_data = NULL,
bool  is_cached = false 
)
inlineprotected
static void impala::DiskIoMgrTest::ScanRangeThread ( DiskIoMgr io_mgr,
DiskIoMgr::RequestContext reader,
const char *  expected_result,
int  expected_len,
const Status expected_status,
int  max_ranges,
AtomicInt< int > *  num_ranges_processed 
)
inlinestaticprotected
static void impala::DiskIoMgrTest::ValidateEmptyOrCorrect ( const char *  expected,
const char *  buffer,
int  len 
)
inlinestaticprotected

Definition at line 95 of file disk-io-mgr-test.cc.

Referenced by ValidateScanRange().

static void impala::DiskIoMgrTest::ValidateSyncRead ( DiskIoMgr io_mgr,
DiskIoMgr::RequestContext reader,
DiskIoMgr::ScanRange range,
const char *  expected,
int  expected_len = -1 
)
inlinestaticprotected
void impala::DiskIoMgrTest::WriteCompleteCallback ( int  num_writes,
const Status status 
)
inline

Definition at line 66 of file disk-io-mgr-test.cc.

References num_ranges_written_, impala::Status::ok(), writes_done_, and written_mutex_.

Referenced by impala::TEST_F().

void impala::DiskIoMgrTest::WriteValidateCallback ( int  num_writes,
DiskIoMgr::WriteRange **  written_range,
DiskIoMgr io_mgr,
DiskIoMgr::RequestContext reader,
int32_t *  data,
Status  expected_status,
const Status status 
)
inline

Member Data Documentation

int impala::DiskIoMgrTest::num_ranges_written_
protected

Definition at line 165 of file disk-io-mgr-test.cc.

Referenced by WriteCompleteCallback(), and WriteValidateCallback().

scoped_ptr<ObjectPool> impala::DiskIoMgrTest::pool_
protected

Definition at line 161 of file disk-io-mgr-test.cc.

Referenced by InitRange(), and WriteValidateCallback().

condition_variable impala::DiskIoMgrTest::writes_done_
protected

Definition at line 164 of file disk-io-mgr-test.cc.

Referenced by WriteCompleteCallback(), and WriteValidateCallback().

mutex impala::DiskIoMgrTest::written_mutex_
protected

Definition at line 163 of file disk-io-mgr-test.cc.

Referenced by WriteCompleteCallback(), and WriteValidateCallback().


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