1 #ifndef __GPUDB_INGESTOR_HPP__     2 #define __GPUDB_INGESTOR_HPP__    15 #include <boost/noncopyable.hpp>    16 #include <boost/shared_ptr.hpp>    38                    const std::string& table_name,
    40                    const std::map<std::string, std::string>& insert_options,
    44                    const std::string& table_name,
    50                    const std::string& table_name,
    51                    const std::map<std::string, std::string>& insert_options,
    55                    const std::string& table_name, 
size_t batch_size );
    72     const std::map<std::string, std::string>& 
getOptions()
 const { 
return m_insert_options; }
   121     void insert( std::vector<gpudb::GenericRecord> records );
   126     typedef std::map<std::string, std::string>          str_to_str_map_t;
   127     typedef boost::shared_ptr<gpudb::WorkerQueue>       worker_queue_ptr_t;
   134                     const std::string& table_name,
   142     void flush( 
const std::vector<gpudb::GenericRecord>& queue,
   146     std::string                      m_table_name;
   148     std::atomic<size_t>              m_count_inserted;
   149     std::atomic<size_t>              m_count_updated;
   150     str_to_str_map_t                 m_insert_options;
   156     std::vector<int32_t>             m_routing_table;
   157     std::vector<worker_queue_ptr_t>  m_worker_queues;
   167 #endif // __GPUDB_INGESTOR_HPP__ 
void insert(gpudb::GenericRecord record)
Queues a record for insertion into GPUdb. 
 
const std::string & getTableName() const
Returns the name of the table on which this class operates. 
 
const gpudb::GPUdb & getGPUdb() const
Returns the GPUdb client handle that this class uses internally. 
 
size_t getCountUpdated() const
Returns the count of records updated so far through this ingestor instance; An atomic operation...
 
const std::map< std::string, std::string > & getOptions() const
Returns the insertion options the ingestor uses. 
 
size_t getCountInserted() const
Returns the count of records inserted so far through this ingestor instance; An atomic operation...
 
void flush()
Ensures that all queued records are inserted into the database.