From 237318248269528d345b455c57d0214b275311e2 Mon Sep 17 00:00:00 2001 From: Aaron Niskode-Dossett Date: Wed, 9 Sep 2026 08:04:29 -0500 Subject: [PATCH 1/2] GH-3780: Test ParquetReadOptions without MapReduce --- parquet-hadoop-no-mapreduce-test/pom.xml | 57 +++++++++++++++++++ ...arquetReadOptionsWithoutMapReduceTest.java | 36 ++++++++++++ pom.xml | 2 + 3 files changed, 95 insertions(+) create mode 100644 parquet-hadoop-no-mapreduce-test/pom.xml create mode 100644 parquet-hadoop-no-mapreduce-test/src/test/java/org/apache/parquet/hadoop/ParquetReadOptionsWithoutMapReduceTest.java diff --git a/parquet-hadoop-no-mapreduce-test/pom.xml b/parquet-hadoop-no-mapreduce-test/pom.xml new file mode 100644 index 0000000000..828edba164 --- /dev/null +++ b/parquet-hadoop-no-mapreduce-test/pom.xml @@ -0,0 +1,57 @@ + + + + org.apache.parquet + parquet + 1.19.0-SNAPSHOT + ../pom.xml + + + 4.0.0 + + + parquet-hadoop-no-mapreduce-test + Apache Parquet Hadoop Without MapReduce Test + + + + true + + + + + org.apache.parquet + parquet-hadoop + ${project.version} + + + org.apache.hadoop + hadoop-common + test + + + diff --git a/parquet-hadoop-no-mapreduce-test/src/test/java/org/apache/parquet/hadoop/ParquetReadOptionsWithoutMapReduceTest.java b/parquet-hadoop-no-mapreduce-test/src/test/java/org/apache/parquet/hadoop/ParquetReadOptionsWithoutMapReduceTest.java new file mode 100644 index 0000000000..2c846ddba7 --- /dev/null +++ b/parquet-hadoop-no-mapreduce-test/src/test/java/org/apache/parquet/hadoop/ParquetReadOptionsWithoutMapReduceTest.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.parquet.hadoop; + +import static org.assertj.core.api.Assertions.assertThatCode; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +import org.apache.parquet.ParquetReadOptions; +import org.junit.jupiter.api.Test; + +class ParquetReadOptionsWithoutMapReduceTest { + + @Test + void buildsReadOptionsWithoutMapReduce() { + assertThatThrownBy(() -> Class.forName("org.apache.hadoop.mapreduce.lib.input.FileInputFormat")) + .isInstanceOf(ClassNotFoundException.class); + + assertThatCode(() -> ParquetReadOptions.builder().build()).doesNotThrowAnyException(); + } +} diff --git a/pom.xml b/pom.xml index ec53d3d721..e65ab37f35 100644 --- a/pom.xml +++ b/pom.xml @@ -134,6 +134,7 @@ parquet-format-structures parquet-generator parquet-hadoop + parquet-hadoop-no-mapreduce-test parquet-jackson parquet-protobuf parquet-thrift @@ -632,6 +633,7 @@ parquet-cli parquet-tools-deprecated parquet-format-structures + parquet-hadoop-no-mapreduce-test From 3adf34f3a8dd57676501a1a35e4b1f99380df813 Mon Sep 17 00:00:00 2001 From: Aaron Niskode-Dossett Date: Wed, 9 Sep 2026 08:14:59 -0500 Subject: [PATCH 2/2] MINOR: Scope no-MapReduce test dependencies --- parquet-hadoop-no-mapreduce-test/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/parquet-hadoop-no-mapreduce-test/pom.xml b/parquet-hadoop-no-mapreduce-test/pom.xml index 828edba164..edee804aa5 100644 --- a/parquet-hadoop-no-mapreduce-test/pom.xml +++ b/parquet-hadoop-no-mapreduce-test/pom.xml @@ -47,6 +47,7 @@ org.apache.parquet parquet-hadoop ${project.version} + test org.apache.hadoop