Flex  0.17.9
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
gs::ODPSReadClient Class Reference

#include <odps_fragment_loader.h>

Public Member Functions

 ODPSReadClient ()
 
 ~ODPSReadClient ()
 
void init ()
 
void CreateReadSession (std::string *session_id, int *split_count, const TableIdentifier &table_identifier, const std::vector< std::string > &selected_cols, const std::vector< std::string > &partition_cols, const std::vector< std::string > &selected_partitions)
 
std::shared_ptr< arrow::Table > ReadTable (const std::string &session_id, int split_count, const TableIdentifier &table_id, int thread_num) const
 
std::shared_ptr< ArrowClient > GetArrowClient () const
 

Static Public Attributes

static constexpr const int CONNECTION_TIMEOUT = 5
 
static constexpr const int READ_WRITE_TIMEOUT = 10
 
static constexpr const size_t MAX_RETRY = 10
 

Private Member Functions

TableBatchScanResp createReadSession (const TableIdentifier &table_identifier, const std::vector< std::string > &selected_cols, const std::vector< std::string > &partition_cols, const std::vector< std::string > &selected_partitions)
 
TableBatchScanResp getReadSession (std::string session_id, const TableIdentifier &table_identifier)
 
void getReadSessionStatus (const std::string &session_id, int *split_count, const TableIdentifier &table_identifier)
 
void producerRoutine (const std::string &session_id, const TableIdentifier &table_identifier, std::vector< std::vector< std::shared_ptr< arrow::RecordBatch >>> &all_batches_, std::vector< int > &&indices) const
 
bool readRows (std::string session_id, const TableIdentifier &table_identifier, std::vector< std::shared_ptr< arrow::RecordBatch >> &res_batches, int split_index) const
 

Private Attributes

std::string access_id_
 
std::string access_key_
 
std::string odps_endpoint_
 
std::string tunnel_endpoint_
 
std::string output_directory_
 
std::shared_ptr< ArrowClient > arrow_client_ptr_
 
size_t MAX_PRODUCER_NUM = 8
 

Constructor & Destructor Documentation

◆ ODPSReadClient()

gs::ODPSReadClient::ODPSReadClient ( )

◆ ~ODPSReadClient()

gs::ODPSReadClient::~ODPSReadClient ( )

Member Function Documentation

◆ createReadSession()

TableBatchScanResp gs::ODPSReadClient::createReadSession ( const TableIdentifier &  table_identifier,
const std::vector< std::string > &  selected_cols,
const std::vector< std::string > &  partition_cols,
const std::vector< std::string > &  selected_partitions 
)
private

◆ CreateReadSession()

void gs::ODPSReadClient::CreateReadSession ( std::string *  session_id,
int *  split_count,
const TableIdentifier &  table_identifier,
const std::vector< std::string > &  selected_cols,
const std::vector< std::string > &  partition_cols,
const std::vector< std::string > &  selected_partitions 
)

◆ GetArrowClient()

std::shared_ptr< ArrowClient > gs::ODPSReadClient::GetArrowClient ( ) const

◆ getReadSession()

TableBatchScanResp gs::ODPSReadClient::getReadSession ( std::string  session_id,
const TableIdentifier &  table_identifier 
)
private

◆ getReadSessionStatus()

void gs::ODPSReadClient::getReadSessionStatus ( const std::string &  session_id,
int *  split_count,
const TableIdentifier &  table_identifier 
)
private

◆ init()

void gs::ODPSReadClient::init ( )

◆ producerRoutine()

void gs::ODPSReadClient::producerRoutine ( const std::string &  session_id,
const TableIdentifier &  table_identifier,
std::vector< std::vector< std::shared_ptr< arrow::RecordBatch >>> &  all_batches_,
std::vector< int > &&  indices 
) const
private

◆ readRows()

bool gs::ODPSReadClient::readRows ( std::string  session_id,
const TableIdentifier &  table_identifier,
std::vector< std::shared_ptr< arrow::RecordBatch >> &  res_batches,
int  split_index 
) const
private

◆ ReadTable()

std::shared_ptr< arrow::Table > gs::ODPSReadClient::ReadTable ( const std::string &  session_id,
int  split_count,
const TableIdentifier &  table_id,
int  thread_num 
) const

Member Data Documentation

◆ access_id_

std::string gs::ODPSReadClient::access_id_
private

◆ access_key_

std::string gs::ODPSReadClient::access_key_
private

◆ arrow_client_ptr_

std::shared_ptr<ArrowClient> gs::ODPSReadClient::arrow_client_ptr_
private

◆ CONNECTION_TIMEOUT

constexpr const int gs::ODPSReadClient::CONNECTION_TIMEOUT = 5
staticconstexpr

◆ MAX_PRODUCER_NUM

size_t gs::ODPSReadClient::MAX_PRODUCER_NUM = 8
private

◆ MAX_RETRY

constexpr const size_t gs::ODPSReadClient::MAX_RETRY = 10
staticconstexpr

◆ odps_endpoint_

std::string gs::ODPSReadClient::odps_endpoint_
private

◆ output_directory_

std::string gs::ODPSReadClient::output_directory_
private

◆ READ_WRITE_TIMEOUT

constexpr const int gs::ODPSReadClient::READ_WRITE_TIMEOUT = 10
staticconstexpr

◆ tunnel_endpoint_

std::string gs::ODPSReadClient::tunnel_endpoint_
private

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