26 #include "graphar/fwd.h"
43 const std::shared_ptr<VertexInfo>& vertex_info,
44 const std::shared_ptr<PropertyGroup>& property_group,
45 const std::string& prefix);
60 Result<std::string>
GetChunk()
const;
80 static Result<std::shared_ptr<VertexPropertyChunkInfoReader>>
Make(
81 const std::shared_ptr<VertexInfo>& vertex_info,
82 const std::shared_ptr<PropertyGroup>& property_group,
83 const std::string& prefix);
93 static Result<std::shared_ptr<VertexPropertyChunkInfoReader>>
Make(
94 const std::shared_ptr<GraphInfo>& graph_info,
const std::string& label,
95 const std::shared_ptr<PropertyGroup>& property_group);
106 static Result<std::shared_ptr<VertexPropertyChunkInfoReader>>
Make(
107 const std::shared_ptr<GraphInfo>& graph_info,
const std::string& label,
108 const std::string& property_name);
111 std::shared_ptr<VertexInfo> vertex_info_;
112 std::shared_ptr<PropertyGroup> property_group_;
131 AdjListType adj_list_type,
132 const std::string& prefix);
177 static Result<std::shared_ptr<AdjListChunkInfoReader>>
Make(
178 const std::shared_ptr<EdgeInfo>& edge_info, AdjListType adj_list_type,
179 const std::string& prefix);
190 static Result<std::shared_ptr<AdjListChunkInfoReader>>
Make(
191 const std::shared_ptr<GraphInfo>& graph_info,
192 const std::string& src_label,
const std::string& edge_label,
193 const std::string& dst_label, AdjListType adj_list_type);
196 std::shared_ptr<EdgeInfo> edge_info_;
197 AdjListType adj_list_type_;
199 IdType vertex_chunk_index_, chunk_index_;
200 IdType vertex_chunk_num_, chunk_num_;
201 std::string base_dir_;
202 std::shared_ptr<FileSystem> fs_;
219 const std::shared_ptr<EdgeInfo>& edge_info, AdjListType adj_list_type,
220 const std::string& prefix);
233 Result<std::string>
GetChunk()
const;
250 static Result<std::shared_ptr<AdjListOffsetChunkInfoReader>>
Make(
251 const std::shared_ptr<EdgeInfo>& edge_info, AdjListType adj_list_type,
252 const std::string& prefix);
263 static Result<std::shared_ptr<AdjListOffsetChunkInfoReader>>
Make(
264 const std::shared_ptr<GraphInfo>& graph_info,
265 const std::string& src_label,
const std::string& edge_label,
266 const std::string& dst_label, AdjListType adj_list_type);
269 std::shared_ptr<EdgeInfo> edge_info_;
270 AdjListType adj_list_type_;
273 IdType vertex_chunk_size_;
274 IdType vertex_chunk_num_;
291 const std::shared_ptr<EdgeInfo>& edge_info,
292 const std::shared_ptr<PropertyGroup>& property_group,
293 AdjListType adj_list_type,
const std::string prefix);
319 Result<std::string>
GetChunk()
const;
337 static Result<std::shared_ptr<AdjListPropertyChunkInfoReader>>
Make(
338 const std::shared_ptr<EdgeInfo>& edge_info,
339 const std::shared_ptr<PropertyGroup>& property_group,
340 AdjListType adj_list_type,
const std::string& prefix);
353 static Result<std::shared_ptr<AdjListPropertyChunkInfoReader>>
Make(
354 const std::shared_ptr<GraphInfo>& graph_info,
355 const std::string& src_label,
const std::string& edge_label,
356 const std::string& dst_label,
357 const std::shared_ptr<PropertyGroup>& property_group,
358 AdjListType adj_list_type);
372 static Result<std::shared_ptr<AdjListPropertyChunkInfoReader>>
Make(
373 const std::shared_ptr<GraphInfo>& graph_info,
374 const std::string& src_label,
const std::string& edge_label,
375 const std::string& dst_label,
const std::string& property_name,
376 AdjListType adj_list_type);
379 std::shared_ptr<EdgeInfo> edge_info_;
380 std::shared_ptr<PropertyGroup> property_group_;
381 AdjListType adj_list_type_;
383 IdType vertex_chunk_index_, chunk_index_;
384 IdType vertex_chunk_num_, chunk_num_;
385 std::string base_dir_;
386 std::shared_ptr<FileSystem> fs_;
Status seek_dst(IdType id)
Sets chunk position indicator for reader by destination internal vertex id.
Status seek(IdType index)
Sets chunk position indicator for reader by edge index.
Status seek_src(IdType id)
Sets chunk position indicator for reader by source internal vertex id.
Result< std::string > GetChunk()
static Result< std::shared_ptr< AdjListChunkInfoReader > > Make(const std::shared_ptr< EdgeInfo > &edge_info, AdjListType adj_list_type, const std::string &prefix)
Create an AdjListChunkInfoReader instance from edge info.
AdjListChunkInfoReader(const std::shared_ptr< EdgeInfo > &edge_info, AdjListType adj_list_type, const std::string &prefix)
Initialize the AdjListChunkInfoReader.
Status seek(IdType id)
Sets chunk position indicator for reader by source internal vertex id.
AdjListOffsetChunkInfoReader(const std::shared_ptr< EdgeInfo > &edge_info, AdjListType adj_list_type, const std::string &prefix)
Initialize the AdjListOffsetChunkInfoReader.
Result< std::string > GetChunk() const
Return the current chunk file path of chunk position indicator.
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.
Status seek(IdType offset)
Sets chunk position indicator for reader by edge index.
Status seek_src(IdType id)
Sets chunk position indicator for reader by source vertex id.
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.
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.
Result< std::string > GetChunk() const
Status seek_dst(IdType id)
Sets chunk position indicator for reader by destination vertex id.
Status outcome object (success or error)
static Result< std::shared_ptr< VertexPropertyChunkInfoReader > > Make(const std::shared_ptr< VertexInfo > &vertex_info, const std::shared_ptr< PropertyGroup > &property_group, const std::string &prefix)
Create a VertexPropertyChunkInfoReader instance from vertex info.
Status seek(IdType id)
Sets chunk position indicator for reader by internal vertex id. If internal vertex id is not found,...
VertexPropertyChunkInfoReader(const std::shared_ptr< VertexInfo > &vertex_info, const std::shared_ptr< PropertyGroup > &property_group, const std::string &prefix)
Initialize the VertexPropertyChunkInfoReader.
IdType GetChunkNum() const noexcept
Result< std::string > GetChunk() const
Return the current chunk file path of chunk position indicator.