OmniSciDB
a575cb28ea
|
#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_disconnet_reconnnect_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_ |
mapd::shared_ptr< OmniSciClient > | client_ |
TSessionId | session_ |
Definition at line 62 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 336 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_, generate_TableFunctionsFactory_init::t, and table_name_.
RowToColumnLoader::~RowToColumnLoader | ( | ) |
Definition at line 370 of file RowToColumnLoader.cpp.
References closeConnection().
|
private |
Definition at line 386 of file RowToColumnLoader.cpp.
References client_, and session_.
Referenced by wait_disconnet_reconnnect_retry(), and ~RowToColumnLoader().
bool RowToColumnLoader::convert_string_to_column | ( | std::vector< TStringValue > | row, |
const import_export::CopyParams & | copy_params | ||
) |
Definition at line 292 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 374 of file RowToColumnLoader.cpp.
References client_, conn_details_, db_name_, ThriftClientConnection::get_protocol(), passwd_, session_, and user_name_.
Referenced by RowToColumnLoader(), and wait_disconnet_reconnnect_retry().
void RowToColumnLoader::do_load | ( | int & | nrows, |
int & | nskipped, | ||
import_export::CopyParams | copy_params | ||
) |
Definition at line 408 of file RowToColumnLoader.cpp.
References client_, input_columns_, import_export::CopyParams::retry_count, row_desc_, session_, generate_TableFunctionsFactory_init::t, table_name_, and wait_disconnet_reconnnect_retry().
Referenced by kafka_insert(), and stream_insert().
TRowDescriptor RowToColumnLoader::get_row_descriptor | ( | ) |
Definition at line 288 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 113 of file RowToColumnLoader.cpp.
References import_export::CopyParams::delimiter.
Referenced by convert_string_to_column(), msg_consume(), and stream_insert().
|
private |
Definition at line 396 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 86 of file RowToColumnLoader.h.
Referenced by convert_string_to_column(), and RowToColumnLoader().
|
private |
Definition at line 90 of file RowToColumnLoader.h.
Referenced by closeConnection(), createConnection(), do_load(), and RowToColumnLoader().
|
private |
Definition at line 85 of file RowToColumnLoader.h.
Referenced by convert_string_to_column(), and RowToColumnLoader().
|
private |
Definition at line 82 of file RowToColumnLoader.h.
Referenced by createConnection(), RowToColumnLoader(), and wait_disconnet_reconnnect_retry().
|
private |
Definition at line 80 of file RowToColumnLoader.h.
Referenced by createConnection().
|
private |
Definition at line 84 of file RowToColumnLoader.h.
Referenced by convert_string_to_column(), do_load(), and RowToColumnLoader().
|
private |
Definition at line 79 of file RowToColumnLoader.h.
Referenced by createConnection().
|
private |
Definition at line 88 of file RowToColumnLoader.h.
Referenced by do_load(), get_row_descriptor(), and RowToColumnLoader().
|
private |
Definition at line 91 of file RowToColumnLoader.h.
Referenced by closeConnection(), createConnection(), do_load(), and RowToColumnLoader().
|
private |
Definition at line 81 of file RowToColumnLoader.h.
Referenced by do_load(), and RowToColumnLoader().
|
private |
Definition at line 78 of file RowToColumnLoader.h.
Referenced by createConnection().