Go to the documentation of this file.
16 #ifndef GRAPHSCOPE_FRAGMENT_MUTABLE_PROPERTY_FRAGMENT_H_
17 #define GRAPHSCOPE_FRAGMENT_MUTABLE_PROPERTY_FRAGMENT_H_
32 #include "grape/io/local_io_adaptor.h"
33 #include "grape/serialization/out_archive.h"
45 grape::OutArchive& arc,
Allocator& alloc);
51 void Open(
const std::string& work_dir,
int memory_level);
55 void Warmup(
int thread_num);
57 void Dump(
const std::string& work_dir, uint32_t version);
135 uint8_t label,
const std::string& prop)
const {
140 uint8_t label)
const {
142 return std::make_shared<TypedRefColumn<int64_t>>(
146 return std::make_shared<TypedRefColumn<int32_t>>(
150 return std::make_shared<TypedRefColumn<uint64_t>>(
154 return std::make_shared<TypedRefColumn<uint32_t>>(
158 return std::make_shared<TypedRefColumn<std::string_view>>(
162 LOG(ERROR) <<
"Unsupported vertex id type: "
181 #endif // GRAPHSCOPE_FRAGMENT_MUTABLE_PROPERTY_FRAGMENT_H_
void loadSchema(const std::string &filename)
Definition: mutable_property_fragment.cc:47
Schema schema_
Definition: mutable_property_fragment.h:170
Table & get_vertex_table(label_t vertex_label)
Definition: mutable_property_fragment.h:67
std::shared_ptr< CsrEdgeIterBase > get_outgoing_edges_mut(label_t label, vid_t u, label_t neighbor_label, label_t edge_label)
Definition: mutable_property_fragment.cc:448
std::vector< Table > vertex_data_
Definition: mutable_property_fragment.h:174
std::vector< CsrBase * > ie_
Definition: mutable_property_fragment.h:172
const CsrBase * get_oe_csr(label_t label, label_t neighbor_label, label_t edge_label) const
Definition: mutable_property_fragment.h:112
vid_t add_vertex(label_t label, const Any &id)
Definition: mutable_property_fragment.cc:419
uint32_t timestamp_t
Definition: types.h:30
Definition: csr_base.h:61
const Schema & schema() const
Definition: mutable_property_fragment.cc:391
uint32_t vid_t
Definition: types.h:31
void Clear()
Definition: mutable_property_fragment.cc:54
std::shared_ptr< RefColumnBase > get_vertex_id_column(uint8_t label) const
Definition: mutable_property_fragment.h:139
size_t edge_label_num_
Definition: mutable_property_fragment.h:176
const CsrBase * get_ie_csr(label_t label, label_t neighbor_label, label_t edge_label) const
Definition: mutable_property_fragment.h:126
Definition: adj_list.h:23
std::vector< DualCsrBase * > dual_csr_list_
Definition: mutable_property_fragment.h:173
static const PropertyType kUInt64
Definition: types.h:145
vid_t vertex_num(label_t vertex_label) const
Definition: mutable_property_fragment.cc:395
const Table & get_vertex_table(label_t vertex_label) const
Definition: mutable_property_fragment.h:71
Any get_oid(label_t label, vid_t lid) const
Definition: mutable_property_fragment.cc:415
std::shared_ptr< ColumnBase > get_vertex_property_column(uint8_t label, const std::string &prop) const
Definition: mutable_property_fragment.h:134
Definition: allocators.h:29
Definition: mutable_property_fragment.h:37
CsrConstEdgeIterBase * get_outgoing_edges_raw(label_t label, vid_t u, label_t neighbor_label, label_t edge_label) const
Definition: mutable_property_fragment.cc:437
Schema & mutable_schema()
Definition: mutable_property_fragment.cc:393
static const PropertyType kStringView
Definition: types.h:149
CsrConstEdgeIterBase * get_incoming_edges_raw(label_t label, vid_t u, label_t neighbor_label, label_t edge_label) const
Definition: mutable_property_fragment.cc:442
void DumpSchema(const std::string &filename)
Definition: mutable_property_fragment.cc:70
Definition: csr_base.h:27
void IngestEdge(label_t src_label, vid_t src_lid, label_t dst_label, vid_t dst_lid, label_t edge_label, timestamp_t ts, grape::OutArchive &arc, Allocator &alloc)
Definition: mutable_property_fragment.cc:373
MutablePropertyFragment()
Definition: mutable_property_fragment.cc:24
static const PropertyType kUInt32
Definition: types.h:142
void Dump(const std::string &work_dir, uint32_t version)
Definition: mutable_property_fragment.cc:301
void Open(const std::string &work_dir, int memory_level)
Definition: mutable_property_fragment.cc:119
size_t vertex_label_num_
Definition: mutable_property_fragment.h:176
std::shared_ptr< CsrEdgeIterBase > get_incoming_edges_mut(label_t label, vid_t u, label_t neighbor_label, label_t edge_label)
Definition: mutable_property_fragment.cc:455
void UpdateEdge(label_t src_label, vid_t src_lid, label_t dst_label, vid_t dst_lid, label_t edge_label, timestamp_t ts, const Any &arc, Allocator &alloc)
Definition: mutable_property_fragment.cc:383
void Compact(uint32_t version)
Definition: mutable_property_fragment.cc:273
std::vector< CsrBase * > oe_
Definition: mutable_property_fragment.h:172
static const PropertyType kInt64
Definition: types.h:144
size_t edge_num(label_t src_label, label_t edge_label, label_t dst_label) const
Definition: mutable_property_fragment.cc:399
CsrBase * get_ie_csr(label_t label, label_t neighbor_label, label_t edge_label)
Definition: mutable_property_fragment.h:119
bool get_lid(label_t label, const Any &oid, vid_t &lid) const
Definition: mutable_property_fragment.cc:410
void Warmup(int thread_num)
Definition: mutable_property_fragment.cc:360
std::shared_ptr< CsrConstEdgeIterBase > get_outgoing_edges(label_t label, vid_t u, label_t neighbor_label, label_t edge_label) const
Definition: mutable_property_fragment.cc:424
std::vector< IndexerType > lf_indexers_
Definition: mutable_property_fragment.h:171
uint8_t label_t
Definition: types.h:32
void generateStatistics(const std::string &work_dir) const
Definition: mutable_property_fragment.cc:461
CsrBase * get_oe_csr(label_t label, label_t neighbor_label, label_t edge_label)
Definition: mutable_property_fragment.h:105
~MutablePropertyFragment()
Definition: mutable_property_fragment.cc:26
std::shared_ptr< CsrConstEdgeIterBase > get_incoming_edges(label_t label, vid_t u, label_t neighbor_label, label_t edge_label) const
Definition: mutable_property_fragment.cc:431
static const PropertyType kInt32
Definition: types.h:141