Run Trino on SeaweedFS
Trino (the maintained successor to Presto) queries data stored on
SeaweedFS through its Hive connector. The mechanism changed in current Trino: the hive-hadoop2
connector was renamed to hive, and the Hadoop FileSystem path is now opt-in
through fs.hadoop.enabled.
Two storage paths work, both verified with Trino 475, Eclipse Temurin JDK 23,
and seaweedfs-hadoop3-client-4.38.jar:
- A. HCFS - the Hive connector talks to the filer directly through the
seaweedfs-hadoop3-clientjar (seaweedfs://URIs). - B. S3 gateway - the Hive connector talks to SeaweedFS's S3 gateway with
Trino's built-in S3 filesystem (
s3://URIs). Simpler: no extra jar, nocore-site.xml.
JDK note: Trino 475 is the last release that runs on JDK 23. Trino 476+ needs JDK 24 and 479+ needs JDK 25. Use the JDK your Trino version requires; the config below is otherwise the same.
Metastore
The Hive connector needs a metastore. This guide uses Trino's built-in file
metastore (hive.metastore=file), which stores table metadata as files beside
the data, so there is no separate service to run. For production, run a
standalone Hive Metastore and set hive.metastore=thrift instead.
Trino base config
etc/node.properties:
node.environment=test
node.id=trino-1
node.data-dir=/opt/trino/data
etc/config.properties (single node coordinator, 8080 is the Trino port):
coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
discovery.uri=http://localhost:8080
etc/jvm.config (the last two flags are required on JDK 23/24):
-server
-Xmx3G
-XX:InitialRAMPercentage=60
-XX:MaxRAMPercentage=60
-XX:+ExitOnOutOfMemoryError
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dfile.encoding=UTF-8
--sun-misc-unsafe-memory-access=allow
--enable-native-access=ALL-UNNAMED
A. HCFS with seaweedfs-hadoop3-client
- Put the client jar on the Hive connector classpath:
cp seaweedfs-hadoop3-client-4.38.jar /opt/trino/plugin/hive/hdfs/
etc/catalog/core-site.xml:
<configuration>
<property>
<name>fs.seaweedfs.impl</name>
<value>seaweed.hdfs.SeaweedFileSystem</value>
</property>
<property>
<name>fs.AbstractFileSystem.seaweedfs.impl</name>
<value>seaweed.hdfs.SeaweedAbstractFileSystem</value>
</property>
<property>
<name>fs.seaweed.buffer.size</name>
<value>4194304</value>
</property>
</configuration>
etc/catalog/seaweedfs.properties(8888 is the filer port):
connector.name=hive
hive.metastore=file
hive.metastore.catalog.dir=seaweedfs://localhost:8888/trino/warehouse
fs.hadoop.enabled=true
hive.config.resources=/opt/trino/etc/catalog/core-site.xml
fs.hadoop.enabled=true is required: current Trino uses native object-storage
filesystems by default and only loads a Hadoop FileSystem implementation
(SeaweedFS's) when this is set. The file metastore creates
seaweedfs://localhost:8888/trino/warehouse on demand, so no directory needs
to be precreated.
B. S3 gateway with native S3
- Run SeaweedFS with the S3 gateway and one identity with credentials:
weed server -dir=/data -filer -s3 -s3.config=s3config.json
s3config.json:
{
"identities": [
{
"name": "trino",
"credentials": [
{ "accessKey": "trinokey", "secretKey": "trinosecret" }
],
"actions": ["Admin", "Read", "Write", "List", "Tagging"]
}
]
}
Create a bucket for the warehouse (8333 is the S3 gateway port):
AWS_ACCESS_KEY_ID=trinokey AWS_SECRET_ACCESS_KEY=trinosecret \
aws --endpoint-url http://localhost:8333 s3 mb s3://warehouse
etc/catalog/seaweedfs.properties:
connector.name=hive
hive.metastore=file
hive.metastore.catalog.dir=s3://warehouse/
fs.native-s3.enabled=true
s3.endpoint=http://localhost:8333
s3.region=us-east-1
s3.path-style-access=true
s3.aws-access-key=trinokey
s3.aws-secret-key=trinosecret
No jar and no core-site.xml are needed for this path.
Run a query
Start Trino and connect with the Trino CLI:
bin/launcher start
trino --server http://localhost:8080 --catalog seaweedfs
trino> CREATE SCHEMA seaweedfs.demo;
CREATE SCHEMA
trino> CREATE TABLE seaweedfs.demo.boshen (name varchar);
CREATE TABLE
trino> INSERT INTO seaweedfs.demo.boshen VALUES ('alice'), ('bob'), ('carol');
INSERT: 3 rows
trino> SELECT * FROM seaweedfs.demo.boshen ORDER BY name;
name
-------
alice
bob
carol
(3 rows)
Confirm the data is on SeaweedFS
The table is stored as ORC under the metastore catalog directory.
HCFS - list the table directory on the filer:
curl -H "Accept: application/json" \
http://localhost:8888/trino/warehouse/demo/boshen/
S3 - list the bucket:
AWS_ACCESS_KEY_ID=trinokey AWS_SECRET_ACCESS_KEY=trinosecret \
aws --endpoint-url http://localhost:8333 s3 ls s3://warehouse/demo/boshen/ --recursive
Either way you will see the ORC data file, named like
20260708_080447_00007_4q5f3_<uuid>, next to the .trinoSchema metadata the
file metastore wrote. The data file begins and ends with the ORC magic bytes.
Introduction
- Quick Start with weed mini
- Simplest S3 Bucket and User Setup
- Components
- Blob Store Architecture
- Getting Started
- Production Setup
- A typical step‐by‐step example
- Benchmarks
- FAQ
- Applications
API
Configuration
- Replication
- Store file with a Time To Live
- Failover Master Server
- Erasure coding for warm storage
- EC Bitrot Detection
- Server Startup via Systemd
- Environment Variables
Filer
- Filer Setup
- Directories and Files
- File Operations Quick Reference
- Data Structure for Large Files
- Filer Data Encryption
- Filer Commands and Operations
- Filer JWT Use
- TUS Resumable Uploads
Filer Stores
- Filer Cassandra Setup
- Filer Redis Setup
- Super Large Directories
- Path-Specific Filer Store
- Choosing a Filer Store
- Customize Filer Store
Management
Advanced Filer Configurations
- Migrate to Filer Store
- Add New Filer Store
- Filer Store Replication
- Filer Active Active cross cluster continuous synchronization
- Filer as a Key-Large-Value Store
- Path Specific Configuration
- Filer Change Data Capture
- Filer Operation Serialization
FUSE Mount
- Mount on Windows
- FIO benchmark
- fstab and systemd mount
- POSIX Compliance
- Distributed POSIX Locks
- P2P reading in weed mount
- Mount over the Internet
WebDAV
SFTP Server
Cloud Drive
- Cloud Drive Benefits
- Cloud Drive Architecture
- Configure Remote Storage
- Azure Blob Storage Authentication
- Mount Remote Storage
- Cache Remote Storage
- Cloud Drive Quick Setup
- Gateway to Remote Object Storage
AWS S3 API
- Amazon S3 API
- Supported APIs vs Minio
- S3 Lifecycle
- S3 Lifecycle vs Volume TTL
- S3 Conditional Operations
- S3 CORS
- S3 Object Lock and Retention
- S3 Object Versioning
- S3 RenameObject
- S3 API Benchmark
- S3 API FAQ
- S3 Bucket Quota
- S3 Rate Limiting
- S3 API Audit log
- S3 Nginx Proxy
- Docker Compose for S3
- Image Gateway
S3 Table Bucket
- S3 Table Bucket
- S3 Table Bucket Commands
- S3 Tables Security
- SeaweedFS Iceberg Catalog
- Iceberg REST Catalog API
- Iceberg Table Maintenance
- SeaweedFS Lance Catalog
- Lance Maintenance Worker
Iceberg Integrations
- Spark Iceberg Integration
- Trino Iceberg Integration
- Dremio Iceberg Integration
- DuckDB Iceberg Integration
- Doris Iceberg Integration
- RisingWave Iceberg Integration
- Lakekeeper Iceberg Integration
- OLake Go Iceberg Integration
Lance Integrations
S3 Authentication & IAM
- S3 Configuration - Start Here
- S3 Credentials (
-s3.config) - OIDC Integration (
-s3.iam.config) - Kubernetes ServiceAccount Authentication (IRSA-style)
- S3 Policy Variables
- S3 Policy Conditions
- S3 Bucket Policies
- Amazon IAM API
- AWS IAM CLI
- weed shell - Shell IAM Commands
Server-Side Encryption
S3 Client Tools
- AWS CLI with SeaweedFS
- s3cmd with SeaweedFS
- rclone with SeaweedFS
- restic with SeaweedFS
- nodejs with Seaweed S3
Machine Learning
HDFS
- Hadoop Compatible File System
- run Spark on SeaweedFS
- run HBase on SeaweedFS
- Run Trino on SeaweedFS
- Hadoop Benchmark
- HDFS via S3 connector
Replication and Backup
- Async Replication to another Filer [Deprecated]
- Async Backup
- Async Filer Metadata Backup
- Async Replication to Cloud [Deprecated]
- Kubernetes Backups and Recovery with K8up
Metadata Change Events
Messaging
- Structured Data Lake with SMQ and SQL
- Seaweed Message Queue
- SQL Queries on Message Queue
- SQL Quick Reference
- PostgreSQL-compatible Server weed db
- Pub-Sub to SMQ to SQL
- Kafka to Kafka Gateway to SMQ to SQL
Use Cases
Operations
- System Metrics
- weed shell
- Data Backup
- Deployment to Kubernetes and Minikube
- Helm Chart Recipes
- Deployment with seaweed-up
Rust Volume Server
Advanced
- Large File Handling
- Optimization
- Optimization for Many Small Buckets
- Volume Management
- Tiered Storage
- Cloud Tier
- Cloud Monitoring
- Load Command Line Options from a file
- SRV Service Discovery
- Volume Files Structure
Security
- Security Overview
- Security Configuration
- Cryptography and FIPS Compliance
- Run Blob Storage on Public Internet