Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions parquet-hadoop-no-mapreduce-test/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!--
~ 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet</artifactId>
<version>1.19.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<!--
This downstream module exists only to verify that ParquetReadOptions can be
constructed with parquet-hadoop and hadoop-common, without Hadoop MapReduce
on the runtime classpath. parquet-hadoop itself cannot provide this test
because its own test classpath includes the MapReduce classes it compiles.
-->
<artifactId>parquet-hadoop-no-mapreduce-test</artifactId>
<name>Apache Parquet Hadoop Without MapReduce Test</name>

<properties>
<!-- This module exists only to verify a downstream runtime classpath. -->
<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-hadoop</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -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();
}
}
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
<module>parquet-format-structures</module>
<module>parquet-generator</module>
<module>parquet-hadoop</module>
<module>parquet-hadoop-no-mapreduce-test</module>
<module>parquet-jackson</module>
<module>parquet-protobuf</module>
<module>parquet-thrift</module>
Expand Down Expand Up @@ -632,6 +633,7 @@
<excludeModule>parquet-cli</excludeModule>
<excludeModule>parquet-tools-deprecated</excludeModule>
<excludeModule>parquet-format-structures</excludeModule>
<excludeModule>parquet-hadoop-no-mapreduce-test</excludeModule>

<!-- Excluding the following modules because bundles do not contain any java classes while they still fail the
compatibility check because of missing dependencies -->
Expand Down
Loading