Skip to content

Commit

Permalink
metadata serialization done
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoMfer committed Mar 12, 2024
1 parent ba295ef commit 1c73f43
Show file tree
Hide file tree
Showing 11 changed files with 751 additions and 161 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
authors = [ "Ángel Iglesias Préstamo <[email protected]>" ]
authors = [ "Ángel Iglesias Préstamo <[email protected]>" ,"Diego Martín Fernández <[email protected]>" ]
name = "remote-hdt"
version = "0.0.1"
edition = "2021"
Expand All @@ -16,11 +16,12 @@ rio_xml = "0.8.4"
rio_api = "0.8.4"
rayon = "1.8.0"
parking_lot = "0.12"
csv = "1.3.0"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
jemallocator = "0.5.0"

[profile.release]
codegen-units = 1
opt-level = 3
lto = "fat"
lto = "fat"
15 changes: 6 additions & 9 deletions examples/metadata_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,22 @@ use remote_hdt::metadata::Metadata;
use remote_hdt::storage::params::Backend;
use remote_hdt::storage::params::ReferenceSystem;
use remote_hdt::storage::params::Serialization;
use remote_hdt::storage::layout::metadata::MetadataLayout;
use remote_hdt::metadata::structure::coordinates::CoordinatesStructure;


use remote_hdt::storage::params::ChunkingStrategy;

fn main() -> Result<(), RemoteHDTError> {
let rdf_path = "resources/1-lubm.ttl";
let metadata_path = "";
//let rdf_path = "resources/1-lubm.ttl";
let metadata_path = "resources/metadata_coordinates.csv";
let zarr_path = "1-lubm-metadata.zarr";
let fields = vec!["X_pos", "Y_pos"];
let mut metadata = Metadata::new( MetadataLayout,Serialization::Zarr);
let fields = vec!["ID","X_pos", "Y_pos"]; // TODO: fix error when the first string is bigger example => vec!["triple_id","X_pos", "Y_pos"]
let mut metadata = Metadata::new( CoordinatesStructure,Serialization::Zarr);
metadata
.serialize(
Backend::FileSystem(zarr_path),
rdf_path,
ChunkingStrategy::Sharding(1024),
ReferenceSystem::SPO,

metadata_path,
ChunkingStrategy::Sharding(250),
fields)
.unwrap();

Expand Down
Loading

0 comments on commit 1c73f43

Please sign in to comment.