Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
megatree::HbaseStorage Class Reference

#include <hbase_storage.h>

Inheritance diagram for megatree::HbaseStorage:
Inheritance graph
[legend]

List of all members.

Classes

struct  ReadData
struct  WriteData

Public Member Functions

virtual void getAsync (const boost::filesystem::path &path, GetCallback callback)
virtual void getBatch (const std::vector< boost::filesystem::path > &paths, std::vector< ByteVec > &results)
virtual std::string getType ()
 HbaseStorage (const boost::filesystem::path &_root)
virtual void putAsync (const boost::filesystem::path &path, const ByteVec &data, PutCallback callback)
virtual void putBatch (const std::vector< boost::filesystem::path > &paths, std::vector< ByteVec > &data)
virtual ~HbaseStorage ()

Private Types

typedef std::deque< ReadDataReadQueue
typedef std::deque< WriteDataWriteQueue

Private Member Functions

void asyncReadThread ()
void asyncWriteThread ()
virtual void getBatch (boost::shared_ptr< apache::hadoop::hbase::thrift::HbaseClient > passed_client, const std::vector< boost::filesystem::path > &paths, std::vector< ByteVec > &results)
virtual void putBatch (boost::shared_ptr< apache::hadoop::hbase::thrift::HbaseClient > passed_client, const std::vector< boost::filesystem::path > &paths, std::vector< ByteVec > &data)
bool readFile (const std::string &row, std::string &buffer)
void writeFile (const std::string &row, const std::vector< unsigned char > &buffer)

Private Attributes

bool async_thread_keep_running
std::vector< boost::shared_ptr
< boost::thread > > 
async_threads
boost::shared_ptr
< apache::hadoop::hbase::thrift::HbaseClient
client
unsigned int port
boost::shared_ptr
< apache::thrift::protocol::TProtocol > 
protocol
ReadQueue read_queue
boost::condition read_queue_cond
boost::mutex read_queue_mutex
std::string server
boost::shared_ptr
< apache::thrift::transport::TSocket > 
socket
boost::mutex socket_mutex
std::string table
boost::shared_ptr
< apache::thrift::transport::TTransport > 
transport
WriteQueue write_queue
boost::condition write_queue_cond
boost::mutex write_queue_mutex

Detailed Description

Definition at line 32 of file hbase_storage.h.


Member Typedef Documentation

typedef std::deque<ReadData> megatree::HbaseStorage::ReadQueue [private]

Definition at line 79 of file hbase_storage.h.

typedef std::deque<WriteData> megatree::HbaseStorage::WriteQueue [private]

Definition at line 94 of file hbase_storage.h.


Constructor & Destructor Documentation

megatree::HbaseStorage::HbaseStorage ( const boost::filesystem::path &  _root)

Definition at line 46 of file hbase_storage.cpp.

Definition at line 88 of file hbase_storage.cpp.


Member Function Documentation

Definition at line 217 of file hbase_storage.cpp.

Definition at line 271 of file hbase_storage.cpp.

void megatree::HbaseStorage::getAsync ( const boost::filesystem::path &  path,
GetCallback  callback 
) [virtual]

Implements megatree::Storage.

Definition at line 201 of file hbase_storage.cpp.

void megatree::HbaseStorage::getBatch ( const std::vector< boost::filesystem::path > &  paths,
std::vector< ByteVec > &  results 
) [virtual]

Reimplemented from megatree::Storage.

Definition at line 122 of file hbase_storage.cpp.

void megatree::HbaseStorage::getBatch ( boost::shared_ptr< apache::hadoop::hbase::thrift::HbaseClient passed_client,
const std::vector< boost::filesystem::path > &  paths,
std::vector< ByteVec > &  results 
) [private, virtual]

Definition at line 128 of file hbase_storage.cpp.

virtual std::string megatree::HbaseStorage::getType ( ) [inline, virtual]

Implements megatree::Storage.

Definition at line 44 of file hbase_storage.h.

void megatree::HbaseStorage::putAsync ( const boost::filesystem::path &  path,
const ByteVec data,
PutCallback  callback 
) [virtual]

Implements megatree::Storage.

Definition at line 209 of file hbase_storage.cpp.

void megatree::HbaseStorage::putBatch ( const std::vector< boost::filesystem::path > &  paths,
std::vector< ByteVec > &  data 
) [virtual]

Reimplemented from megatree::Storage.

Definition at line 176 of file hbase_storage.cpp.

void megatree::HbaseStorage::putBatch ( boost::shared_ptr< apache::hadoop::hbase::thrift::HbaseClient passed_client,
const std::vector< boost::filesystem::path > &  paths,
std::vector< ByteVec > &  data 
) [private, virtual]

Definition at line 182 of file hbase_storage.cpp.

bool megatree::HbaseStorage::readFile ( const std::string &  row,
std::string &  buffer 
) [private]

Definition at line 307 of file hbase_storage.cpp.

void megatree::HbaseStorage::writeFile ( const std::string &  row,
const std::vector< unsigned char > &  buffer 
) [private]

Definition at line 330 of file hbase_storage.cpp.


Member Data Documentation

Definition at line 66 of file hbase_storage.h.

std::vector<boost::shared_ptr<boost::thread> > megatree::HbaseStorage::async_threads [private]

Definition at line 67 of file hbase_storage.h.

Definition at line 59 of file hbase_storage.h.

unsigned int megatree::HbaseStorage::port [private]

Definition at line 63 of file hbase_storage.h.

boost::shared_ptr<apache::thrift::protocol::TProtocol> megatree::HbaseStorage::protocol [private]

Definition at line 58 of file hbase_storage.h.

Definition at line 80 of file hbase_storage.h.

boost::condition megatree::HbaseStorage::read_queue_cond [private]

Definition at line 82 of file hbase_storage.h.

Definition at line 81 of file hbase_storage.h.

std::string megatree::HbaseStorage::server [private]

Definition at line 62 of file hbase_storage.h.

boost::shared_ptr<apache::thrift::transport::TSocket> megatree::HbaseStorage::socket [private]

Definition at line 56 of file hbase_storage.h.

boost::mutex megatree::HbaseStorage::socket_mutex [private]

Definition at line 55 of file hbase_storage.h.

std::string megatree::HbaseStorage::table [private]

Definition at line 60 of file hbase_storage.h.

boost::shared_ptr<apache::thrift::transport::TTransport> megatree::HbaseStorage::transport [private]

Definition at line 57 of file hbase_storage.h.

Definition at line 95 of file hbase_storage.h.

boost::condition megatree::HbaseStorage::write_queue_cond [private]

Definition at line 97 of file hbase_storage.h.

Definition at line 96 of file hbase_storage.h.


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


megatree_storage
Author(s): Wim Meeussen
autogenerated on Thu Nov 28 2013 11:30:26