0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Hypertable::LoadDataSource Class Referenceabstract

#include <LoadDataSource.h>

Inheritance diagram for Hypertable::LoadDataSource:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::LoadDataSource:
Collaboration graph
[legend]

Classes

struct  ColumnInfo
 
class  KeyComponentInfo
 

Public Member Functions

 LoadDataSource (const std::string &header_fname, int row_uniquify_chars=0, int load_flags=0)
 
virtual ~LoadDataSource ()
 
bool has_timestamps ()
 
virtual bool next (KeySpec *keyp, uint8_t **valuep, uint32_t *value_lenp, bool *is_deletep, uint32_t *consumedp)
 
virtual void init (const std::vector< String > &key_columns, const std::string &timestamp_column, char field_separator)
 
int64_t get_current_lineno ()
 
unsigned long get_source_size () const
 

Protected Types

enum  TypeMask { ROW_KEY = (1 << 0), TIMESTAMP = (1 << 1) }
 

Protected Member Functions

bool get_next_line (String &line)
 
virtual void parse_header (const String &header, const std::vector< String > &key_columns, const std::string &timestamp_column)
 
virtual void init_src ()=0
 
virtual uint64_t incr_consumed ()=0
 
bool should_skip (int idx, const uint32_t *masks)
 
std::string get_header ()
 
bool parse_date_format (const char *str, int64_t &timestamp)
 
bool parse_sec (const char *str, char **end_ptr, int64_t &ns)
 
bool add_row_component (int index)
 

Protected Attributes

std::vector< ColumnInfom_column_info
 
std::vector< const char * > m_values
 
std::vector< KeyComponentInfom_key_comps
 
uint32_t * m_type_mask
 
size_t m_next_value
 
boost::iostreams::filtering_istream m_fin
 
int64_t m_cur_line
 
DynamicBuffer m_line_buffer
 
DynamicBuffer m_row_key_buffer
 
bool m_hyperformat
 
bool m_leading_timestamps
 
int m_timestamp_index
 
int64_t m_timestamp
 
size_t m_limit
 
uint64_t m_offset
 
bool m_zipped
 
FixedRandomStringGeneratorm_rsgen
 
std::string m_header_fname
 
int m_row_uniquify_chars
 
int m_load_flags
 
std::string m_first_line
 
unsigned long m_source_size
 
bool m_first_line_cached
 
char m_field_separator
 

Detailed Description

Definition at line 50 of file LoadDataSource.h.

Member Enumeration Documentation

Enumerator
ROW_KEY 
TIMESTAMP 

Definition at line 111 of file LoadDataSource.h.

Constructor & Destructor Documentation

LoadDataSource::LoadDataSource ( const std::string &  header_fname,
int  row_uniquify_chars = 0,
int  load_flags = 0 
)

Definition at line 61 of file LoadDataSource.cc.

virtual Hypertable::LoadDataSource::~LoadDataSource ( )
inlinevirtual

Definition at line 57 of file LoadDataSource.h.

Member Function Documentation

bool LoadDataSource::add_row_component ( int  index)
protected

Definition at line 642 of file LoadDataSource.cc.

int64_t Hypertable::LoadDataSource::get_current_lineno ( )
inline

Definition at line 70 of file LoadDataSource.h.

String LoadDataSource::get_header ( )
protected

Definition at line 85 of file LoadDataSource.cc.

bool Hypertable::LoadDataSource::get_next_line ( String line)
inlineprotected

Definition at line 75 of file LoadDataSource.h.

unsigned long Hypertable::LoadDataSource::get_source_size ( ) const
inline

Definition at line 71 of file LoadDataSource.h.

bool Hypertable::LoadDataSource::has_timestamps ( )
inline

Definition at line 59 of file LoadDataSource.h.

virtual uint64_t Hypertable::LoadDataSource::incr_consumed ( )
protectedpure virtual
void LoadDataSource::init ( const std::vector< String > &  key_columns,
const std::string &  timestamp_column,
char  field_separator 
)
virtual

Definition at line 144 of file LoadDataSource.cc.

virtual void Hypertable::LoadDataSource::init_src ( )
protectedpure virtual
bool LoadDataSource::next ( KeySpec keyp,
uint8_t **  valuep,
uint32_t *  value_lenp,
bool *  is_deletep,
uint32_t *  consumedp 
)
virtual

Get timestamp

Get row key

Get column family and qualifier

Get value

setup row key

Definition at line 301 of file LoadDataSource.cc.

bool LoadDataSource::parse_date_format ( const char *  str,
int64_t &  timestamp 
)
protected

month

day

hour

minute

second

Definition at line 682 of file LoadDataSource.cc.

void LoadDataSource::parse_header ( const String header,
const std::vector< String > &  key_columns,
const std::string &  timestamp_column 
)
protectedvirtual

Set up row key columns

Definition at line 155 of file LoadDataSource.cc.

bool LoadDataSource::parse_sec ( const char *  str,
char **  end_ptr,
int64_t &  ns 
)
protected

Definition at line 772 of file LoadDataSource.cc.

bool Hypertable::LoadDataSource::should_skip ( int  idx,
const uint32_t *  masks 
)
inlineprotected

Definition at line 93 of file LoadDataSource.h.

Member Data Documentation

std::vector<ColumnInfo> Hypertable::LoadDataSource::m_column_info
protected

Definition at line 127 of file LoadDataSource.h.

int64_t Hypertable::LoadDataSource::m_cur_line
protected

Definition at line 133 of file LoadDataSource.h.

char Hypertable::LoadDataSource::m_field_separator
protected

Definition at line 150 of file LoadDataSource.h.

boost::iostreams::filtering_istream Hypertable::LoadDataSource::m_fin
protected

Definition at line 132 of file LoadDataSource.h.

std::string Hypertable::LoadDataSource::m_first_line
protected

Definition at line 147 of file LoadDataSource.h.

bool Hypertable::LoadDataSource::m_first_line_cached
protected

Definition at line 149 of file LoadDataSource.h.

std::string Hypertable::LoadDataSource::m_header_fname
protected

Definition at line 144 of file LoadDataSource.h.

bool Hypertable::LoadDataSource::m_hyperformat
protected

Definition at line 136 of file LoadDataSource.h.

std::vector<KeyComponentInfo> Hypertable::LoadDataSource::m_key_comps
protected

Definition at line 129 of file LoadDataSource.h.

bool Hypertable::LoadDataSource::m_leading_timestamps
protected

Definition at line 137 of file LoadDataSource.h.

size_t Hypertable::LoadDataSource::m_limit
protected

Definition at line 140 of file LoadDataSource.h.

DynamicBuffer Hypertable::LoadDataSource::m_line_buffer
protected

Definition at line 134 of file LoadDataSource.h.

int Hypertable::LoadDataSource::m_load_flags
protected

Definition at line 146 of file LoadDataSource.h.

size_t Hypertable::LoadDataSource::m_next_value
protected

Definition at line 131 of file LoadDataSource.h.

uint64_t Hypertable::LoadDataSource::m_offset
protected

Definition at line 141 of file LoadDataSource.h.

DynamicBuffer Hypertable::LoadDataSource::m_row_key_buffer
protected

Definition at line 135 of file LoadDataSource.h.

int Hypertable::LoadDataSource::m_row_uniquify_chars
protected

Definition at line 145 of file LoadDataSource.h.

FixedRandomStringGenerator* Hypertable::LoadDataSource::m_rsgen
protected

Definition at line 143 of file LoadDataSource.h.

unsigned long Hypertable::LoadDataSource::m_source_size
protected

Definition at line 148 of file LoadDataSource.h.

int64_t Hypertable::LoadDataSource::m_timestamp
protected

Definition at line 139 of file LoadDataSource.h.

int Hypertable::LoadDataSource::m_timestamp_index
protected

Definition at line 138 of file LoadDataSource.h.

uint32_t* Hypertable::LoadDataSource::m_type_mask
protected

Definition at line 130 of file LoadDataSource.h.

std::vector<const char *> Hypertable::LoadDataSource::m_values
protected

Definition at line 128 of file LoadDataSource.h.

bool Hypertable::LoadDataSource::m_zipped
protected

Definition at line 142 of file LoadDataSource.h.


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