diff --git a/parquet-hadoop-no-mapreduce-test/pom.xml b/parquet-hadoop-no-mapreduce-test/pom.xml new file mode 100644 index 0000000000..edee804aa5 --- /dev/null +++ b/parquet-hadoop-no-mapreduce-test/pom.xml @@ -0,0 +1,58 @@ + + + + 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} + test + + + 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