Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Configuration template for an S3Store
#
# S3 connection settings (bucket, endpoint, region, credentials) are configured
# at the RDF4J instance level via environment variables or system properties:
#
# RDF4J_S3_BUCKET, RDF4J_S3_ENDPOINT, RDF4J_S3_REGION,
# RDF4J_S3_ACCESS_KEY, RDF4J_S3_SECRET_KEY, RDF4J_S3_FORCE_PATH_STYLE
#
# Each repository uses s3Prefix to partition its data within the shared bucket.
#
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix config: <tag:rdf4j.org,2023:config/>.
@prefix s3: <http://rdf4j.org/config/sail/s3#>.

[] a config:Repository ;
config:rep.id "{%Repository ID|s3%}" ;
rdfs:label "{%Repository title|S3 Store%}" ;
config:rep.impl [
config:rep.type "openrdf:SailRepository" ;
config:sail.impl [
config:sail.type "rdf4j:S3Store" ;
s3:s3Prefix "{%S3 Prefix|%}" ;
s3:dataDir "{%Data Directory|%}"
]
].
1 change: 1 addition & 0 deletions core/sail/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<module>model</module>
<module>shacl</module>
<module>lmdb</module>
<module>s3</module>
<module>lucene-api</module>
<module>lucene</module>
<module>elasticsearch</module>
Expand Down
32 changes: 32 additions & 0 deletions core/sail/s3/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
services:
minio:
image: minio/minio:latest
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5

createbucket:
image: minio/mc:latest
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 minioadmin minioadmin;
mc mb --ignore-existing local/rdf4j-data;
echo 'Bucket ready';
"

volumes:
minio-data:
111 changes: 111 additions & 0 deletions core/sail/s3/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-sail</artifactId>
<version>6.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-sail-s3</artifactId>
<name>RDF4J: S3Store</name>
<description>Sail implementation that stores data on S3-compatible object storage using an LSM-tree.</description>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-sail-base</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-queryalgebra-evaluation</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-queryalgebra-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-query</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
<version>8.5.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-hadoop</artifactId>
<version>1.15.2</version>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- No Hadoop jars needed. Parquet-hadoop references a few Hadoop classes
in method signatures and superclass declarations, but we bypass all
Hadoop runtime paths via PlainParquetConfiguration + SimpleCodecFactory.
Minimal stub classes in org.apache.hadoop.* satisfy JVM class loading. -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>3.1.8</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-sail-testsuite</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-repository-testsuite</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-repository-sail</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-junit-jupiter</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub for org.apache.hadoop.conf.Configuration.
// Parquet-hadoop references this class in abstract method signatures
// (WriteSupport.init, ParquetWriter.Builder.getWriteSupport). Our code
// overrides the ParquetConfiguration variants instead, so this class is
// never instantiated or used at runtime. It exists only to satisfy the
// JVM class loader.
package org.apache.hadoop.conf;

public class Configuration {
public Configuration() {
}
}
16 changes: 16 additions & 0 deletions core/sail/s3/src/main/java/org/apache/hadoop/fs/FileStatus.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.fs;

public class FileStatus {
}
16 changes: 16 additions & 0 deletions core/sail/s3/src/main/java/org/apache/hadoop/fs/FileSystem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.fs;

public abstract class FileSystem {
}
16 changes: 16 additions & 0 deletions core/sail/s3/src/main/java/org/apache/hadoop/fs/Path.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.fs;

public class Path {
}
16 changes: 16 additions & 0 deletions core/sail/s3/src/main/java/org/apache/hadoop/fs/PathFilter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.fs;

public interface PathFilter {
}
18 changes: 18 additions & 0 deletions core/sail/s3/src/main/java/org/apache/hadoop/mapred/JobConf.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.mapred;

import org.apache.hadoop.conf.Configuration;

public class JobConf extends Configuration {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.mapreduce;

public abstract class InputFormat<K, V> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.mapreduce;

public abstract class InputSplit {
}
16 changes: 16 additions & 0 deletions core/sail/s3/src/main/java/org/apache/hadoop/mapreduce/Job.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.mapreduce;

public class Job {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.mapreduce;

public interface JobContext {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.mapreduce;

public abstract class RecordReader<K, V> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*******************************************************************************
* Copyright (c) 2025 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Minimal stub — satisfies JVM class loading for parquet-hadoop.
// Never instantiated at runtime.
package org.apache.hadoop.mapreduce;

public interface TaskAttemptContext extends JobContext {
}
Loading