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

#include <chunk_info_reader.h>

Public Member Functions

 AdjListPropertyChunkInfoReader (const std::shared_ptr< EdgeInfo > &edge_info, const std::shared_ptr< PropertyGroup > &property_group, AdjListType adj_list_type, const std::string prefix)
 Initialize the AdjListPropertyChunkInfoReader. More...
 
Status seek_src (IdType id)
 Sets chunk position indicator for reader by source vertex id. More...
 
Status seek_dst (IdType id)
 Sets chunk position indicator for reader by destination vertex id. More...
 
Status seek (IdType offset)
 Sets chunk position indicator for reader by edge index. More...
 
Result< std::string > GetChunk () const
 
Status next_chunk ()
 

Static Public Member Functions

static Result< std::shared_ptr< AdjListPropertyChunkInfoReader > > Make (const std::shared_ptr< EdgeInfo > &edge_info, const std::shared_ptr< PropertyGroup > &property_group, AdjListType adj_list_type, const std::string &prefix)
 Create an AdjListPropertyChunkInfoReader instance from edge info. More...
 
static Result< std::shared_ptr< AdjListPropertyChunkInfoReader > > Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &src_label, const std::string &edge_label, const std::string &dst_label, const std::shared_ptr< PropertyGroup > &property_group, AdjListType adj_list_type)
 Create an AdjListPropertyChunkInfoReader instance from graph info and property group. More...
 
static Result< std::shared_ptr< AdjListPropertyChunkInfoReader > > Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &src_label, const std::string &edge_label, const std::string &dst_label, const std::string &property_name, AdjListType adj_list_type)
 Create an AdjListPropertyChunkInfoReader instance from graph info and property name. More...
 

Detailed Description

The chunk info reader for edge property group chunk.

Definition at line 280 of file chunk_info_reader.h.

Constructor & Destructor Documentation

◆ AdjListPropertyChunkInfoReader()

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

Initialize the AdjListPropertyChunkInfoReader.

Parameters
edge_infoThe edge info that describes the edge type.
property_groupThe property group of the edge property.
adj_list_typeThe adj list type for the edges.
prefixThe absolute prefix of the graph.

Definition at line 338 of file chunk_info_reader.cc.

Member Function Documentation

◆ GetChunk()

Result< std::string > graphar::AdjListPropertyChunkInfoReader::GetChunk ( ) const

Return the current chunk file path of chunk position indicator.

Definition at line 436 of file chunk_info_reader.cc.

◆ Make() [1/3]

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

Create an AdjListPropertyChunkInfoReader instance from edge info.

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

Definition at line 465 of file chunk_info_reader.cc.

◆ Make() [2/3]

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

Create an AdjListPropertyChunkInfoReader instance from graph info and property group.

Parameters
graph_infoThe graph info.
src_labelThe source vertex label.
edge_labelThe edge label.
dst_labelThe destination vertex label.
property_groupThe property group of the edge property.
adj_list_typeThe adj list type for the edge.

Definition at line 479 of file chunk_info_reader.cc.

◆ Make() [3/3]

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

Create an AdjListPropertyChunkInfoReader instance from graph info and property name.

Parameters
graph_infoThe graph info.
src_labelThe source vertex label.
edge_labelThe edge label.
dst_labelThe destination vertex label.
property_nameThe name of one property in the property group you want to read.
adj_list_typeThe adj list type for the edge.

Definition at line 494 of file chunk_info_reader.cc.

◆ next_chunk()

Status graphar::AdjListPropertyChunkInfoReader::next_chunk ( )

Sets chunk position indicator to next chunk.

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

Definition at line 444 of file chunk_info_reader.cc.

◆ seek()

Status graphar::AdjListPropertyChunkInfoReader::seek ( IdType  offset)

Sets chunk position indicator for reader by edge index.

Parameters
offsetedge index of the vertex chunk. Note: the offset is the edge index of the vertex chunk, not the edge index of the whole graph.

Definition at line 425 of file chunk_info_reader.cc.

◆ seek_dst()

Status graphar::AdjListPropertyChunkInfoReader::seek_dst ( IdType  id)

Sets chunk position indicator for reader by destination vertex id.

Parameters
idthe destination vertex id.

Definition at line 393 of file chunk_info_reader.cc.

◆ seek_src()

Status graphar::AdjListPropertyChunkInfoReader::seek_src ( IdType  id)

Sets chunk position indicator for reader by source vertex id.

Parameters
idthe source vertex id.

Definition at line 361 of file chunk_info_reader.cc.


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