OmniSciDB
a5dc49c757
|
#include <RowToColumnLoader.h>
Public Member Functions | |
RowToColumnLoader (const ThriftClientConnection &conn_details, const std::string &user_name, const std::string &passwd, const std::string &db_name, const std::string &table_name) | |
~RowToColumnLoader () | |
void | do_load (int &nrows, int &nskipped, import_export::CopyParams copy_params) |
bool | convert_string_to_column (std::vector< TStringValue > row, const import_export::CopyParams ©_params) |
TRowDescriptor | get_row_descriptor () |
std::string | print_row_with_delim (std::vector< TStringValue > row, const import_export::CopyParams ©_params) |
Private Member Functions | |
void | createConnection (const ThriftClientConnection &con) |
void | closeConnection () |
void | wait_disconnect_reconnect_retry (size_t tries, import_export::CopyParams copy_params) |
Private Attributes | |
std::string | user_name_ |
std::string | passwd_ |
std::string | db_name_ |
std::string | table_name_ |
ThriftClientConnection | conn_details_ |
std::vector< TColumn > | input_columns_ |
std::vector< SQLTypeInfo > | column_type_info_ |
std::vector< SQLTypeInfo > | array_column_type_info_ |
TRowDescriptor | row_desc_ |
std::shared_ptr< HeavyClient > | client_ |
TSessionId | session_ |
Definition at line 54 of file RowToColumnLoader.h.
RowToColumnLoader::RowToColumnLoader | ( | const ThriftClientConnection & | conn_details, |
const std::string & | user_name, | ||
const std::string & | passwd, | ||
const std::string & | db_name, | ||
const std::string & | table_name | ||
) |
Definition at line 347 of file RowToColumnLoader.cpp.
References array_column_type_info_, client_, column_type_info_, conn_details_, create_array_sql_type_info_from_col_type(), create_sql_type_info_from_col_type(), createConnection(), input_columns_, row_desc_, session_, and table_name_.
RowToColumnLoader::~RowToColumnLoader | ( | ) |
Definition at line 381 of file RowToColumnLoader.cpp.
References closeConnection().
|
private |
Definition at line 397 of file RowToColumnLoader.cpp.
References client_, and session_.
Referenced by wait_disconnect_reconnect_retry(), and ~RowToColumnLoader().
bool RowToColumnLoader::convert_string_to_column | ( | std::vector< TStringValue > | row, |
const import_export::CopyParams & | copy_params | ||
) |
Definition at line 303 of file RowToColumnLoader.cpp.
References array_column_type_info_, column_type_info_, logger::ERROR, input_columns_, kARRAY, LOG, import_export::CopyParams::null_str, import_export::delimited_parser::parse_string_array(), populate_TColumn(), print_row_with_delim(), and remove_partial_row().
Referenced by msg_consume(), and stream_insert().
|
private |
Definition at line 385 of file RowToColumnLoader.cpp.
References client_, conn_details_, db_name_, ThriftClientConnection::get_protocol(), passwd_, session_, and user_name_.
Referenced by RowToColumnLoader(), and wait_disconnect_reconnect_retry().
void RowToColumnLoader::do_load | ( | int & | nrows, |
int & | nskipped, | ||
import_export::CopyParams | copy_params | ||
) |
Definition at line 419 of file RowToColumnLoader.cpp.
References client_, input_columns_, import_export::CopyParams::retry_count, row_desc_, session_, table_name_, and wait_disconnect_reconnect_retry().
Referenced by kafka_insert(), and stream_insert().
TRowDescriptor RowToColumnLoader::get_row_descriptor | ( | ) |
Definition at line 299 of file RowToColumnLoader.cpp.
References row_desc_.
Referenced by msg_consume(), and stream_insert().
std::string RowToColumnLoader::print_row_with_delim | ( | std::vector< TStringValue > | row, |
const import_export::CopyParams & | copy_params | ||
) |
Definition at line 118 of file RowToColumnLoader.cpp.
References import_export::CopyParams::delimiter.
Referenced by convert_string_to_column(), msg_consume(), and stream_insert().
|
private |
Definition at line 407 of file RowToColumnLoader.cpp.
References closeConnection(), conn_details_, createConnection(), import_export::CopyParams::retry_count, and import_export::CopyParams::retry_wait.
Referenced by do_load().
|
private |
Definition at line 78 of file RowToColumnLoader.h.
Referenced by convert_string_to_column(), and RowToColumnLoader().
|
private |
Definition at line 82 of file RowToColumnLoader.h.
Referenced by closeConnection(), createConnection(), do_load(), and RowToColumnLoader().
|
private |
Definition at line 77 of file RowToColumnLoader.h.
Referenced by convert_string_to_column(), and RowToColumnLoader().
|
private |
Definition at line 74 of file RowToColumnLoader.h.
Referenced by createConnection(), RowToColumnLoader(), and wait_disconnect_reconnect_retry().
|
private |
Definition at line 72 of file RowToColumnLoader.h.
Referenced by createConnection().
|
private |
Definition at line 76 of file RowToColumnLoader.h.
Referenced by convert_string_to_column(), do_load(), and RowToColumnLoader().
|
private |
Definition at line 71 of file RowToColumnLoader.h.
Referenced by createConnection().
|
private |
Definition at line 80 of file RowToColumnLoader.h.
Referenced by do_load(), get_row_descriptor(), and RowToColumnLoader().
|
private |
Definition at line 83 of file RowToColumnLoader.h.
Referenced by closeConnection(), createConnection(), do_load(), and RowToColumnLoader().
|
private |
Definition at line 73 of file RowToColumnLoader.h.
Referenced by do_load(), and RowToColumnLoader().
|
private |
Definition at line 70 of file RowToColumnLoader.h.
Referenced by createConnection().