Skip to content

Commit

Permalink
Support incremental graph loading.
Browse files Browse the repository at this point in the history
Signed-off-by: SighingSnow <1263750383@qq.com>
  • Loading branch information
SighingSnow committed Sep 26, 2023
1 parent dc61d92 commit 9a60616
Show file tree
Hide file tree
Showing 20 changed files with 1,667 additions and 99 deletions.
11 changes: 11 additions & 0 deletions modules/graph/fragment/arrow_fragment.vineyard-mod
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,17 @@ class [[vineyard]] ArrowFragment
ObjectID vm_id,
const int concurrency = std::thread::hardware_concurrency()) override;

boost::leaf::result<ObjectID> AddVerticesToExistedLabel(
Client& client, label_id_t label_id,
std::shared_ptr<arrow::Table>&& vertex_table, ObjectID vm_id,
const int concurrency = std::thread::hardware_concurrency()) override;

boost::leaf::result<ObjectID> AddEdgesToExistedLabel(
Client& client, label_id_t label_id,
std::shared_ptr<arrow::Table>&& edge_table,
const std::set<std::pair<std::string, std::string>>& edge_relations,
const int concurrency = std::thread::hardware_concurrency()) override;

/// Add a set of new edge labels to graph. Edge label id started from
/// edge_label_num_.
boost::leaf::result<ObjectID> AddNewEdgeLabels(
Expand Down
27 changes: 27 additions & 0 deletions modules/graph/fragment/arrow_fragment_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,33 @@ class ArrowFragmentBase : public vineyard::Object {
VINEYARD_ASSERT(false, "Not implemented");
return vineyard::InvalidObjectID();
}
// Add vertices progressively to existed vertex label.
virtual boost::leaf::result<ObjectID> AddVerticesToExistedLabel(
Client& client, PropertyGraphSchema::LabelId label_id,
std::shared_ptr<arrow::Table>&& vertex_table, ObjectID vm_id,
const int concurrency = std::thread::hardware_concurrency()) {
VINEYARD_ASSERT(false, "Not implemented");
return vineyard::InvalidObjectID();
}

/**
* @brief Add edges progressively to existed vertex label.
*
* @param client
* @param label_id the label id of the existed vertex label.
* @param edge_table the newly added edges
* @param edge_relations
* @param concurrency
* @return boost::leaf::result<ObjectID>
*/
virtual boost::leaf::result<ObjectID> AddEdgesToExistedLabel(
Client& client, PropertyGraphSchema::LabelId label_id,
std::shared_ptr<arrow::Table>&& edge_table,
const std::set<std::pair<std::string, std::string>>& edge_relations,
const int concurrency = std::thread::hardware_concurrency()) {
VINEYARD_ASSERT(false, "Not implemented");
return vineyard::InvalidObjectID();
}

virtual boost::leaf::result<ObjectID> AddEdges(
Client& client,
Expand Down
Loading

0 comments on commit 9a60616

Please sign in to comment.