Repository navigation
Conversation
POST .../values with Content-Type application/vnd.apache.parquet ingests one tuple per row from the columns item, property, time and value, plus the optional columns context and seqNr, through the existing store.put path. This is the format written by the SPARQL Parquet exporter. - Relative item/property URIs resolve against the request path, like CSV. - TIMESTAMP(MILLIS/MICROS/NANOS) times are converted to milliseconds; int64 seqNr is accepted (for example from pandas/pyarrow). - Unsupported schemas, decimal or large unsigned values, and null required values (from footer statistics) are rejected before any tuple is stored. - Uploads up to 32 MB are parsed in memory; larger ones are spooled to a temporary file. Rows are streamed per row group, so memory stays bounded. - Hadoop configuration is avoided, because it parses its XML defaults for every new reader. - Internal error details such as file paths are not returned to clients. Refs #59
- KvinIngestionBenchmark.postParquet measures the in-process Parquet route. The payload is created outside the measured section. - KvinIngestionScalingBenchmark compares postCsv and postParquet for growing requests (-Djmh.rows=5000,100000,...) that span multiple Parquet row groups. - Documentation updated with current results. Refs #59
Member
|
@wmehling Thank you for the PR. The implementation uses a quite different format than CSV which uses a column per item/property combination like If datatypes change for subsequent items/properties then the What do you think? |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #59
What this adds
POST /linkedfactory/**/valueswithContent-Type: application/vnd.apache.parquetstores one KVIN tuple per Parquet row. It goes through the samestore.put(...)path as CSV, including theKvinTupleGroupingIterator.item,propertytimeTIMESTAMP(MICROS/NANOS)is converted to msvaluecontext(optional)seqNr(optional)0Other columns are ignored. This is the format the SPARQL Parquet exporter writes. Files written by pandas/pyarrow (timestamp units, int64 integers) work too.
Performance
Local JMH run, 30,000 tuples per invocation, 2 forks:
postCsvpostParquetScaling results (up to 500k rows / 3M tuples per request) are in
docs/benchmarks/kvin-ingestion.md.How to reproduce / review
Automated:
mvn -pl bundles/io.github.linkedfactory.core install -DskipTests mvn -pl bundles/io.github.linkedfactory.service test -Dtest=KvinServiceTestThe test start with
parquetPost…and cover:seqNrManually against a running pod (adjust the host and port):
200. A GET of…/values?item=http://localhost:8080/linkedfactory/demo/machine1&property=http://localhost:8080/linkedfactory/demo/temperatureshould return21.5.timewithpa.timestamp('ns')instead. The stored time must still be the same millisecond value.400 Invalid Parquet payload, with no/tmp/…path in the body.kvin-upload-*.parquetfile is left in the temp dir.Benchmark:
mvn -pl bundles/io.github.linkedfactory.service -Pjmh '-Djmh.includes=KvinIngestionBenchmark.post(Csv|Parquet)$' test-compile exec:exec