Getting Started¶
Hardwood runs on Java 21 or newer; Java 25 is recommended for best performance.
If you just want to inspect or convert Parquet files from the command line, grab a pre-built native binary for Linux, macOS, or Windows from the release page; see the CLI page for details.
Dependency Management¶
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.CR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Gradle:
Then declare dependencies inside your project's <dependencies> block without specifying a version:
<dependencies>
<dependency>
<groupId>dev.hardwood</groupId>
<artifactId>hardwood-core</artifactId>
</dependency>
</dependencies>
Specifying the Version Directly¶
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.CR1</version>
</dependency>
Gradle:
Optional Dependencies¶
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. Snappy and ZSTD are the codecs most commonly seen in the wild; LZ4 and Brotli are rarer.
| Codec | Group ID | Artifact ID |
|---|---|---|
| Snappy | org.xerial.snappy |
snappy-java |
| ZSTD | com.github.luben |
zstd-jni |
| LZ4 | at.yawk.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>at.yawk.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.
Read a File¶
With the core dependency in place, you're ready to read. The Read Your First Parquet File tutorial walks through it end-to-end against a real dataset — printing the schema, reading rows with typed accessors, narrowing the read with a projection and a filter, and summing a column the columnar way.
For the full API — column projection, predicate pushdown, column-oriented reading, and more — see the How-to Guides.