Apache GraphAr C++ Library
The C++ Library for Apache GraphAr
Public Member Functions | Static Public Member Functions | List of all members
graphar::AdjListOffsetChunkInfoReader Class Reference

Public Member Functions

 AdjListOffsetChunkInfoReader (const std::shared_ptr< EdgeInfo > &edge_info, AdjListType adj_list_type, const std::string &prefix)
 Initialize the AdjListOffsetChunkInfoReader. More...
 
Status seek (IdType id)
 Sets chunk position indicator for reader by source internal vertex id. More...
 
Result< std::string > GetChunk () const
 Return the current chunk file path of chunk position indicator.
 
Status next_chunk ()
 

Static Public Member Functions

static Result< std::shared_ptr< AdjListOffsetChunkInfoReader > > Make (const std::shared_ptr< EdgeInfo > &edge_info, AdjListType adj_list_type, const std::string &prefix)
 Create an AdjListOffsetChunkInfoReader instance from edge info. More...
 
static Result< std::shared_ptr< AdjListOffsetChunkInfoReader > > Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &src_label, const std::string &edge_label, const std::string &dst_label, AdjListType adj_list_type)
 Create an AdjListOffsetChunkInfoReader instance from graph info. More...
 

Detailed Description

Definition at line 205 of file chunk_info_reader.h.

Constructor & Destructor Documentation

◆ AdjListOffsetChunkInfoReader()

graphar::AdjListOffsetChunkInfoReader::AdjListOffsetChunkInfoReader ( const std::shared_ptr< EdgeInfo > &  edge_info,
AdjListType  adj_list_type,
const std::string &  prefix 
)
explicit

Initialize the AdjListOffsetChunkInfoReader.

Parameters
edge_infoThe edge info that describes the edge type.
adj_list_typeThe adj list type for the edges. Note that the adj list type must be AdjListType::ordered_by_source or AdjListType::ordered_by_dest.
prefixThe absolute prefix.

Definition at line 256 of file chunk_info_reader.cc.

Member Function Documentation

◆ Make() [1/2]

Result< std::shared_ptr< AdjListOffsetChunkInfoReader > > graphar::AdjListOffsetChunkInfoReader::Make ( const std::shared_ptr< EdgeInfo > &  edge_info,
AdjListType  adj_list_type,
const std::string &  prefix 
)
static

Create an AdjListOffsetChunkInfoReader instance from edge info.

Parameters
edge_infoThe edge info.
adj_list_typeThe adj list type for the edges.
prefixThe absolute prefix of the graph.

Definition at line 312 of file chunk_info_reader.cc.

◆ Make() [2/2]

Result< std::shared_ptr< AdjListOffsetChunkInfoReader > > graphar::AdjListOffsetChunkInfoReader::Make ( const std::shared_ptr< GraphInfo > &  graph_info,
const std::string &  src_label,
const std::string &  edge_label,
const std::string &  dst_label,
AdjListType  adj_list_type 
)
static

Create an AdjListOffsetChunkInfoReader instance from graph info.

Parameters
graph_infoThe graph info.
src_labelThe source vertex label.
edge_labelThe edge label.
dst_labelThe destination vertex label.
adj_list_typeThe adj list type for the edges.

Definition at line 325 of file chunk_info_reader.cc.

◆ next_chunk()

Status graphar::AdjListOffsetChunkInfoReader::next_chunk ( )

Sets chunk position indicator to next chunk.

if current chunk is the last chunk, will return Status::IndexError error.

Definition at line 302 of file chunk_info_reader.cc.

◆ seek()

Status graphar::AdjListOffsetChunkInfoReader::seek ( IdType  id)

Sets chunk position indicator for reader by source internal vertex id.

Parameters
idthe source internal vertex id.

Definition at line 285 of file chunk_info_reader.cc.


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