Getting Started¶
Hardwood runs on Java 21 or newer; Java 25 is recommended for best performance.
Using the BOM (Bill of Materials)¶
The hardwood-bom manages versions for all Hardwood modules and their optional runtime dependencies.
Import it in your dependency management so you can declare Hardwood dependencies without specifying versions:
Maven:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>dev.hardwood</groupId>
<artifactId>hardwood-bom</artifactId>
<version>1.0.0.Alpha1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Gradle:
Then declare dependencies without versions:
Adding the Core Dependency¶
If you prefer not to use the BOM, you can specify the version directly:
Maven:
<dependency>
<groupId>dev.hardwood</groupId>
<artifactId>hardwood-core</artifactId>
<version>1.0.0.Alpha1</version>
</dependency>
Gradle:
Logging¶
Hardwood uses the Java Platform Logging API (System.Logger).
Bindings are available for all popular logger implementations, for instance for log4j 2.
Compression Libraries¶
Hardwood supports reading Parquet files compressed with GZIP (built into Java), Snappy, ZSTD, LZ4, and Brotli. The compression libraries are optional dependencies—add only the ones you need:
| Codec | Group ID | Artifact ID |
|---|---|---|
| Snappy | org.xerial.snappy |
snappy-java |
| ZSTD | com.github.luben |
zstd-jni |
| LZ4 | org.lz4 |
lz4-java |
| Brotli | com.aayushatharva.brotli4j |
brotli4j |
When using the BOM, declare without a version — for example, to add Snappy:
Maven:
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
</dependency>
Gradle:
Without the BOM (explicit versions)
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>1.1.10.8</version>
</dependency>
<dependency>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
<version>1.5.7-6</version>
</dependency>
<dependency>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
<version>1.8.1</version>
</dependency>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>brotli4j</artifactId>
<version>1.20.0</version>
</dependency>
If you attempt to read a file using a compression codec whose library is not on the classpath, Hardwood will throw an exception with a message indicating which dependency to add.