22 #ifndef Hypertable_Lib_LoadDataSource_h
23 #define Hypertable_Lib_LoadDataSource_h
33 #include <boost/iostreams/device/file.hpp>
34 #include <boost/iostreams/filtering_stream.hpp>
54 int row_uniquify_chars = 0,
63 virtual bool next(
KeySpec *keyp, uint8_t **valuep, uint32_t *value_lenp,
64 bool *is_deletep, uint32_t *consumedp);
66 virtual void init(
const std::vector<String> &key_columns,
67 const std::string ×tamp_column,
68 char field_separator);
82 if (
m_fin.eof() && line.empty())
88 const std::vector<String> &key_columns,
89 const std::string ×tamp_column);
94 uint32_t bm = masks[idx];
119 bool parse_sec(
const char *
str,
char **end_ptr, int64_t &ns);
132 boost::iostreams::filtering_istream
m_fin;
158 #endif // Hypertable_Lib_LoadDataSource_h
DynamicBuffer m_row_key_buffer
bool m_leading_timestamps
bool should_skip(int idx, const uint32_t *masks)
virtual void parse_header(const String &header, const std::vector< String > &key_columns, const std::string ×tamp_column)
std::string String
A String is simply a typedef to std::string.
int64_t get_current_lineno()
virtual void init_src()=0
Po::typed_value< String > * str(String *v=0)
virtual ~LoadDataSource()
DynamicBuffer m_line_buffer
LoadDataSource(const std::string &header_fname, int row_uniquify_chars=0, int load_flags=0)
virtual void init(const std::vector< String > &key_columns, const std::string ×tamp_column, char field_separator)
A dynamic, resizable and reference counted memory buffer.
std::vector< KeyComponentInfo > m_key_comps
unsigned long get_source_size() const
std::string m_header_fname
A dynamic, resizable memory buffer.
std::vector< ColumnInfo > m_column_info
boost::iostreams::filtering_istream m_fin
bool get_next_line(String &line)
std::vector< const char * > m_values
bool parse_date_format(const char *str, int64_t ×tamp)
bool add_row_component(int index)
virtual uint64_t incr_consumed()=0
FixedRandomStringGenerator * m_rsgen
bool duplicate_key_columns(int flags)
A String class based on std::string.
A serializable ByteString.
unsigned long m_source_size
virtual bool next(KeySpec *keyp, uint8_t **valuep, uint32_t *value_lenp, bool *is_deletep, uint32_t *consumedp)
std::shared_ptr< LoadDataSource > LoadDataSourcePtr
Smart pointer to LoadDataSource.
bool parse_sec(const char *str, char **end_ptr, int64_t &ns)