Flex  0.17.9
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gs::AbstractArrowFragmentLoader Class Reference

#include <abstract_arrow_fragment_loader.h>

Inheritance diagram for gs::AbstractArrowFragmentLoader:
Inheritance graph
[legend]
Collaboration diagram for gs::AbstractArrowFragmentLoader:
Collaboration graph
[legend]

Public Member Functions

 AbstractArrowFragmentLoader (const std::string &work_dir, const Schema &schema, const LoadingConfig &loading_config)
 
 ~AbstractArrowFragmentLoader ()
 
void AddVerticesRecordBatch (label_t v_label_id, const std::vector< std::string > &input_paths, std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, const std::string &, const LoadingConfig &, int)> supplier_creator)
 
void AddEdgesRecordBatch (label_t src_label_id, label_t dst_label_id, label_t edge_label_id, const std::vector< std::string > &input_paths, std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, label_t, label_t, const std::string &, const LoadingConfig &, int)> supplier_creator)
 
- Public Member Functions inherited from gs::IFragmentLoader
virtual ~IFragmentLoader ()=default
 
virtual Result< bool > LoadFragment ()=0
 

Protected Member Functions

template<typename KEY_T >
void addVertexBatchFromArray (label_t v_label_id, IdIndexer< KEY_T, vid_t > &indexer, std::shared_ptr< arrow::Array > &primary_key_col, const std::vector< std::shared_ptr< arrow::Array >> &property_cols)
 
template<typename KEY_T >
void addVertexRecordBatchImpl (label_t v_label_id, const std::vector< std::string > &v_files, std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, const std::string &, const LoadingConfig &, int)> supplier_creator)
 
template<typename SRC_PK_T , typename EDATA_T , typename VECTOR_T >
void _append_edges (std::shared_ptr< arrow::Array > src_col, std::shared_ptr< arrow::Array > dst_col, const IndexerType &src_indexer, const IndexerType &dst_indexer, std::shared_ptr< arrow::Array > &property_cols, const PropertyType &edge_property, VECTOR_T &parsed_edges, std::vector< std::atomic< int32_t >> &ie_degree, std::vector< std::atomic< int32_t >> &oe_degree, size_t offset)
 
template<typename EDATA_T >
void addEdgesRecordBatchImpl (label_t src_label_id, label_t dst_label_id, label_t e_label_id, const std::vector< std::string > &e_files, std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, label_t, label_t, const std::string &, const LoadingConfig &, int)> supplier_creator)
 
template<typename EDATA_T , typename VECTOR_T >
void addEdgesRecordBatchImplHelper (label_t src_label_id, label_t dst_label_id, label_t e_label_id, const std::vector< std::string > &e_files, std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, label_t, label_t, const std::string &, const LoadingConfig &, int)> supplier_creator)
 

Protected Attributes

const LoadingConfigloading_config_
 
const Schemaschema_
 
size_t vertex_label_num_
 
size_t edge_label_num_
 
int32_t thread_num_
 
std::mutex * mtxs_
 
bool build_csr_in_mem_
 
bool use_mmap_vector_
 
BasicFragmentLoader basic_fragment_loader_
 

Constructor & Destructor Documentation

◆ AbstractArrowFragmentLoader()

gs::AbstractArrowFragmentLoader::AbstractArrowFragmentLoader ( const std::string &  work_dir,
const Schema schema,
const LoadingConfig loading_config 
)
inline

◆ ~AbstractArrowFragmentLoader()

gs::AbstractArrowFragmentLoader::~AbstractArrowFragmentLoader ( )
inline

Member Function Documentation

◆ _append_edges()

template<typename SRC_PK_T , typename EDATA_T , typename VECTOR_T >
void gs::AbstractArrowFragmentLoader::_append_edges ( std::shared_ptr< arrow::Array >  src_col,
std::shared_ptr< arrow::Array >  dst_col,
const IndexerType src_indexer,
const IndexerType dst_indexer,
std::shared_ptr< arrow::Array > &  property_cols,
const PropertyType edge_property,
VECTOR_T &  parsed_edges,
std::vector< std::atomic< int32_t >> &  ie_degree,
std::vector< std::atomic< int32_t >> &  oe_degree,
size_t  offset 
)
inlineprotected

◆ AddEdgesRecordBatch()

void gs::AbstractArrowFragmentLoader::AddEdgesRecordBatch ( label_t  src_label_id,
label_t  dst_label_id,
label_t  edge_label_id,
const std::vector< std::string > &  input_paths,
std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, label_t, label_t, const std::string &, const LoadingConfig &, int)>  supplier_creator 
)

◆ addEdgesRecordBatchImpl()

template<typename EDATA_T >
void gs::AbstractArrowFragmentLoader::addEdgesRecordBatchImpl ( label_t  src_label_id,
label_t  dst_label_id,
label_t  e_label_id,
const std::vector< std::string > &  e_files,
std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, label_t, label_t, const std::string &, const LoadingConfig &, int)>  supplier_creator 
)
inlineprotected

◆ addEdgesRecordBatchImplHelper()

template<typename EDATA_T , typename VECTOR_T >
void gs::AbstractArrowFragmentLoader::addEdgesRecordBatchImplHelper ( label_t  src_label_id,
label_t  dst_label_id,
label_t  e_label_id,
const std::vector< std::string > &  e_files,
std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, label_t, label_t, const std::string &, const LoadingConfig &, int)>  supplier_creator 
)
inlineprotected

◆ addVertexBatchFromArray()

template<typename KEY_T >
void gs::AbstractArrowFragmentLoader::addVertexBatchFromArray ( label_t  v_label_id,
IdIndexer< KEY_T, vid_t > &  indexer,
std::shared_ptr< arrow::Array > &  primary_key_col,
const std::vector< std::shared_ptr< arrow::Array >> &  property_cols 
)
inlineprotected

◆ addVertexRecordBatchImpl()

template<typename KEY_T >
void gs::AbstractArrowFragmentLoader::addVertexRecordBatchImpl ( label_t  v_label_id,
const std::vector< std::string > &  v_files,
std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, const std::string &, const LoadingConfig &, int)>  supplier_creator 
)
inlineprotected

◆ AddVerticesRecordBatch()

void gs::AbstractArrowFragmentLoader::AddVerticesRecordBatch ( label_t  v_label_id,
const std::vector< std::string > &  input_paths,
std::function< std::vector< std::shared_ptr< IRecordBatchSupplier >>(label_t, const std::string &, const LoadingConfig &, int)>  supplier_creator 
)

Member Data Documentation

◆ basic_fragment_loader_

BasicFragmentLoader gs::AbstractArrowFragmentLoader::basic_fragment_loader_
mutableprotected

◆ build_csr_in_mem_

bool gs::AbstractArrowFragmentLoader::build_csr_in_mem_
protected

◆ edge_label_num_

size_t gs::AbstractArrowFragmentLoader::edge_label_num_
protected

◆ loading_config_

const LoadingConfig& gs::AbstractArrowFragmentLoader::loading_config_
protected

◆ mtxs_

std::mutex* gs::AbstractArrowFragmentLoader::mtxs_
protected

◆ schema_

const Schema& gs::AbstractArrowFragmentLoader::schema_
protected

◆ thread_num_

int32_t gs::AbstractArrowFragmentLoader::thread_num_
protected

◆ use_mmap_vector_

bool gs::AbstractArrowFragmentLoader::use_mmap_vector_
protected

◆ vertex_label_num_

size_t gs::AbstractArrowFragmentLoader::vertex_label_num_
protected

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