Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-3416 LMDB-based SAIL. #3413

Merged
merged 24 commits into from
Dec 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
90b8707
GH-3416 Initial LMDB-based SAIL.
kenwenzel Nov 10, 2021
f41af51
GH-3416 Store flags as separate values.
kenwenzel Nov 11, 2021
16b10b8
GH-3416 Implement varints and use long ids for values.
kenwenzel Nov 15, 2021
0cee62a
GH-3416 Update to LWJGL 3.3.0.
kenwenzel Nov 18, 2021
8c51416
GH-3416 Implement sortable varints and prepare migration of LMDB sail…
kenwenzel Nov 19, 2021
e4f6816
GH-3416 Adapt to changed RDF4J API.
kenwenzel Nov 19, 2021
e4aa07e
GH-3416 Implement natural ordering using serial varints.
kenwenzel Nov 19, 2021
cded234
GH-3416 make native extensions optional runtime, fix boms
abrokenjester Nov 24, 2021
4ebda36
GH-3416 Remove specific authors and update copyright headers.
kenwenzel Nov 25, 2021
b4da0c4
GH-3416 Fixed hashing of values and use max key size of 16.
kenwenzel Nov 25, 2021
a175daa
GH-3416 Use varints for namespace and datatype IDs.
kenwenzel Nov 25, 2021
7b18de1
GH-3416 Use varints also for hash values.
kenwenzel Nov 25, 2021
6cfd2a7
GH-3416 Improve storage of hashed values.
kenwenzel Nov 26, 2021
33075fe
GH-3416 Include LWJGL natives for SPARQL compliance tests.
kenwenzel Nov 27, 2021
218d241
GH-3416 Correctly handle forceSync option.
kenwenzel Nov 27, 2021
f64ce93
GH-3416 Fix Varint.firstToLength and speed up storage of hashed values.
kenwenzel Nov 28, 2021
535af54
GH-3416 Directly store data of hashed values keyed by ID.
kenwenzel Nov 29, 2021
64d7023
GH-3416 Use MDB_RESERVE to store larger values.
kenwenzel Nov 29, 2021
9b4bbb1
GH-3416 Correctly use subfolders "triples" and "values".
kenwenzel Nov 30, 2021
8f67d96
GH-3416 Remove superfluous upgrade logic.
kenwenzel Nov 30, 2021
9155045
GH-3416 Replace RepositoryUtil.difference to vastly improve runtime o…
kenwenzel Nov 30, 2021
8e4e457
GH-3416 Streamline config and include db size for value and triple st…
kenwenzel Dec 1, 2021
0540994
GH-3416 Adapt SPARQL compliance tests to changed LMDB Store API.
kenwenzel Dec 1, 2021
4b8023d
GH-3416 Update remaining copyright headers and mark LmdbStore as expe…
kenwenzel Dec 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@
<artifactId>rdf4j-sail-nativerdf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-sail-lmdb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-shacl</artifactId>
Expand Down
74 changes: 74 additions & 0 deletions compliance/sparql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,80 @@
<artifactId>rdf4j-sail-nativerdf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-sail-lmdb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-linux</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-macos-arm64</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-macos</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-windows</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-linux</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-macos</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-macos-arm64</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-windows</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-sail-federation</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*******************************************************************************
* Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This copyright header needs to be changed - even if you copied it from an existing file, it's essentially a new contribution I'd say.

* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*******************************************************************************/
package org.eclipse.rdf4j.sail.lmdb;

import java.io.File;
import java.nio.file.Files;

import org.eclipse.rdf4j.common.io.FileUtil;
import org.eclipse.rdf4j.query.parser.sparql.ComplexSPARQLQueryTest;
import org.eclipse.rdf4j.repository.Repository;
import org.eclipse.rdf4j.repository.sail.SailRepository;
import org.eclipse.rdf4j.sail.lmdb.config.LmdbStoreConfig;

/**
* Test additional SPARQL functionality on LMDB store.
*
*/
public class LmdbComplexSPARQLQueryTest extends ComplexSPARQLQueryTest {

File dataDir = null;

@Override
protected Repository newRepository() throws Exception {
dataDir = Files.createTempDirectory("lmdbstore").toFile();
return new SailRepository(new LmdbStore(dataDir, new LmdbStoreConfig("spoc")));

}

@Override
public void tearDown() throws Exception {
try {
super.tearDown();
} finally {
FileUtil.deleteDir(dataDir);
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*******************************************************************************
* Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*******************************************************************************/
package org.eclipse.rdf4j.sail.lmdb;

import java.util.Map;

import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.query.parser.sparql.manifest.SPARQL11UpdateComplianceTest;
import org.eclipse.rdf4j.repository.Repository;
import org.eclipse.rdf4j.repository.dataset.DatasetRepository;
import org.eclipse.rdf4j.repository.sail.SailRepository;
import org.eclipse.rdf4j.sail.lmdb.config.LmdbStoreConfig;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;

/**
* Test SPARQL 1.1 Update functionality on LMDB store.
*
*/
public class LmdbPARQL11UpdateComplianceTest extends SPARQL11UpdateComplianceTest {

public LmdbPARQL11UpdateComplianceTest(String displayName, String testURI, String name, String requestFile,
IRI defaultGraphURI, Map<String, IRI> inputNamedGraphs, IRI resultDefaultGraphURI,
Map<String, IRI> resultNamedGraphs) {
super(displayName, testURI, name, requestFile, defaultGraphURI, inputNamedGraphs, resultDefaultGraphURI,
resultNamedGraphs);
// TODO Auto-generated constructor stub
}

@Rule
public TemporaryFolder folder = new TemporaryFolder();

@Override
protected Repository newRepository() throws Exception {
return new DatasetRepository(
new SailRepository(new LmdbStore(folder.newFolder(), new LmdbStoreConfig("spoc"))));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*******************************************************************************
* Copyright (c) 2020 Eclipse RDF4J contributors.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*******************************************************************************/
package org.eclipse.rdf4j.sail.lmdb;

import org.eclipse.rdf4j.query.Dataset;
import org.eclipse.rdf4j.query.parser.sparql.manifest.SPARQL11QueryComplianceTest;
import org.eclipse.rdf4j.repository.Repository;
import org.eclipse.rdf4j.repository.dataset.DatasetRepository;
import org.eclipse.rdf4j.repository.sail.SailRepository;
import org.eclipse.rdf4j.sail.lmdb.config.LmdbStoreConfig;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;

/**
* Test SPARQL 1.1 query functionality on LMDB store.
*
*/
public class LmdbSPARQL11QueryComplianceTest extends SPARQL11QueryComplianceTest {

public LmdbSPARQL11QueryComplianceTest(String displayName, String testURI, String name, String queryFileURL,
String resultFileURL, Dataset dataset, boolean ordered) {
super(displayName, testURI, name, queryFileURL, resultFileURL, dataset, ordered);
}

@Rule
public TemporaryFolder folder = new TemporaryFolder();

@Override
protected Repository newRepository() throws Exception {
return new DatasetRepository(
new SailRepository(new LmdbStore(folder.newFolder(), new LmdbStoreConfig("spoc"))));
}

}
Loading