Skip to content

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:

dependencies {
    implementation platform('dev.hardwood:hardwood-bom:1.0.0.Alpha1')
}

Then declare dependencies without versions:

<dependency>
    <groupId>dev.hardwood</groupId>
    <artifactId>hardwood-core</artifactId>
</dependency>

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:

implementation 'dev.hardwood:hardwood-core:1.0.0.Alpha1'

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:

implementation 'org.xerial.snappy:snappy-java'
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>
implementation 'org.xerial.snappy:snappy-java:1.1.10.8'
implementation 'com.github.luben:zstd-jni:1.5.7-6'
implementation 'org.lz4:lz4-java:1.8.1'
implementation 'com.aayushatharva.brotli4j:brotli4j:1.20.0'

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.