-
Notifications
You must be signed in to change notification settings - Fork 165
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
GH-3416 LMDB-based SAIL. #3413
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 f41af51
GH-3416 Store flags as separate values.
kenwenzel 16b10b8
GH-3416 Implement varints and use long ids for values.
kenwenzel 0cee62a
GH-3416 Update to LWJGL 3.3.0.
kenwenzel 8c51416
GH-3416 Implement sortable varints and prepare migration of LMDB sail…
kenwenzel e4f6816
GH-3416 Adapt to changed RDF4J API.
kenwenzel e4aa07e
GH-3416 Implement natural ordering using serial varints.
kenwenzel cded234
GH-3416 make native extensions optional runtime, fix boms
abrokenjester 4ebda36
GH-3416 Remove specific authors and update copyright headers.
kenwenzel b4da0c4
GH-3416 Fixed hashing of values and use max key size of 16.
kenwenzel a175daa
GH-3416 Use varints for namespace and datatype IDs.
kenwenzel 7b18de1
GH-3416 Use varints also for hash values.
kenwenzel 6cfd2a7
GH-3416 Improve storage of hashed values.
kenwenzel 33075fe
GH-3416 Include LWJGL natives for SPARQL compliance tests.
kenwenzel 218d241
GH-3416 Correctly handle forceSync option.
kenwenzel f64ce93
GH-3416 Fix Varint.firstToLength and speed up storage of hashed values.
kenwenzel 535af54
GH-3416 Directly store data of hashed values keyed by ID.
kenwenzel 64d7023
GH-3416 Use MDB_RESERVE to store larger values.
kenwenzel 9b4bbb1
GH-3416 Correctly use subfolders "triples" and "values".
kenwenzel 8f67d96
GH-3416 Remove superfluous upgrade logic.
kenwenzel 9155045
GH-3416 Replace RepositoryUtil.difference to vastly improve runtime o…
kenwenzel 8e4e457
GH-3416 Streamline config and include db size for value and triple st…
kenwenzel 0540994
GH-3416 Adapt SPARQL compliance tests to changed LMDB Store API.
kenwenzel 4b8023d
GH-3416 Update remaining copyright headers and mark LmdbStore as expe…
kenwenzel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
compliance/sparql/src/test/java/org/eclipse/rdf4j/sail/lmdb/LmdbComplexSPARQLQueryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.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); | ||
} | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...nce/sparql/src/test/java/org/eclipse/rdf4j/sail/lmdb/LmdbPARQL11UpdateComplianceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")))); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...nce/sparql/src/test/java/org/eclipse/rdf4j/sail/lmdb/LmdbSPARQL11QueryComplianceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")))); | ||
} | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.