2015-09-30 00:45:53 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
|
|
Licensed 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
|
|
|
|
|
2019-05-28 07:29:44 +00:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2015-09-30 00:45:53 +00:00
|
|
|
|
|
|
|
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. See accompanying LICENSE file.
|
|
|
|
-->
|
|
|
|
<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
|
2019-05-27 06:24:59 +00:00
|
|
|
https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
2015-09-30 00:45:53 +00:00
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-project-dist</artifactId>
|
2021-05-19 13:52:37 +00:00
|
|
|
<version>3.3.2-SNAPSHOT</version>
|
2015-09-30 00:45:53 +00:00
|
|
|
<relativePath>../../hadoop-project-dist</relativePath>
|
|
|
|
</parent>
|
|
|
|
<artifactId>hadoop-hdfs-native-client</artifactId>
|
2021-05-19 13:52:37 +00:00
|
|
|
<version>3.3.2-SNAPSHOT</version>
|
2015-09-30 00:45:53 +00:00
|
|
|
<description>Apache Hadoop HDFS Native Client</description>
|
|
|
|
<name>Apache Hadoop HDFS Native Client</name>
|
|
|
|
<packaging>jar</packaging>
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
<require.fuse>false</require.fuse>
|
2015-12-01 16:10:05 +00:00
|
|
|
<require.libwebhdfs>false</require.libwebhdfs>
|
2015-12-15 23:37:34 +00:00
|
|
|
<require.valgrind>false</require.valgrind>
|
|
|
|
<native_ctest_args></native_ctest_args>
|
|
|
|
<native_cmake_args></native_cmake_args>
|
|
|
|
<native_make_args></native_make_args>
|
2018-02-16 15:27:11 +00:00
|
|
|
<hadoop.component>hdfs</hadoop.component>
|
2015-09-30 00:45:53 +00:00
|
|
|
</properties>
|
|
|
|
|
|
|
|
<dependencies>
|
2015-10-10 05:31:16 +00:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-hdfs-client</artifactId>
|
|
|
|
<scope>provided</scope>
|
|
|
|
</dependency>
|
2015-09-30 00:45:53 +00:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-common</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-common</artifactId>
|
|
|
|
<type>test-jar</type>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-hdfs</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-hdfs</artifactId>
|
|
|
|
<type>test-jar</type>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.mockito</groupId>
|
2019-01-30 02:29:09 +00:00
|
|
|
<artifactId>mockito-core</artifactId>
|
2015-09-30 00:45:53 +00:00
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2016-06-23 06:47:31 +00:00
|
|
|
<dependency>
|
|
|
|
<groupId>junit</groupId>
|
|
|
|
<artifactId>junit</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2015-09-30 00:45:53 +00:00
|
|
|
</dependencies>
|
|
|
|
|
2015-10-10 04:12:44 +00:00
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.rat</groupId>
|
|
|
|
<artifactId>apache-rat-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<excludes>
|
|
|
|
<exclude>src/main/native/*</exclude>
|
|
|
|
<exclude>src/main/native/config/*</exclude>
|
|
|
|
<exclude>src/main/native/m4/*</exclude>
|
2015-10-12 21:12:35 +00:00
|
|
|
<exclude>src/main/native/fuse-dfs/util/tree.h</exclude>
|
2015-12-08 22:42:33 +00:00
|
|
|
<exclude>src/main/native/libhdfspp/third_party/**</exclude>
|
2015-10-10 04:12:44 +00:00
|
|
|
<exclude>src/contrib/**</exclude>
|
|
|
|
</excludes>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
2015-09-30 00:45:53 +00:00
|
|
|
<profiles>
|
|
|
|
<profile>
|
|
|
|
<id>native-win</id>
|
|
|
|
<activation>
|
|
|
|
<activeByDefault>false</activeByDefault>
|
|
|
|
<os>
|
|
|
|
<family>windows</family>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<runningWithNative>true</runningWithNative>
|
|
|
|
</properties>
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>enforce-os</id>
|
|
|
|
<goals>
|
|
|
|
<goal>enforce</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<rules>
|
|
|
|
<requireOS>
|
|
|
|
<family>windows</family>
|
|
|
|
<message>native-win build only supported on Windows</message>
|
|
|
|
</requireOS>
|
|
|
|
</rules>
|
|
|
|
<fail>true</fail>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>make</id>
|
|
|
|
<phase>compile</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<mkdir dir="${project.build.directory}/native"/>
|
|
|
|
<exec executable="cmake" dir="${project.build.directory}/native"
|
|
|
|
failonerror="true">
|
2016-06-07 16:38:16 +00:00
|
|
|
<arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DHADOOP_BUILD=1 -DREQUIRE_FUSE=${require.fuse} -DREQUIRE_VALGRIND=${require.valgrind} -A '${env.PLATFORM}'"/>
|
2015-12-15 23:37:34 +00:00
|
|
|
<arg line="${native_cmake_args}"/>
|
2015-09-30 00:45:53 +00:00
|
|
|
</exec>
|
|
|
|
<exec executable="msbuild" dir="${project.build.directory}/native"
|
|
|
|
failonerror="true">
|
|
|
|
<arg line="ALL_BUILD.vcxproj /nologo /p:Configuration=RelWithDebInfo /p:LinkIncremental=false"/>
|
2015-12-15 23:37:34 +00:00
|
|
|
<arg line="${native_make_args}"/>
|
2015-09-30 00:45:53 +00:00
|
|
|
</exec>
|
|
|
|
<!-- Copy for inclusion in distribution. -->
|
|
|
|
<copy todir="${project.build.directory}/bin">
|
2016-05-03 01:15:51 +00:00
|
|
|
<fileset dir="${project.build.directory}/native/bin/RelWithDebInfo"/>
|
2015-09-30 00:45:53 +00:00
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<id>native_tests</id>
|
|
|
|
<phase>test</phase>
|
|
|
|
<goals><goal>run</goal></goals>
|
|
|
|
<configuration>
|
|
|
|
<skip>${skipTests}</skip>
|
2018-02-16 15:27:11 +00:00
|
|
|
<target>
|
|
|
|
<property name="compile_classpath" refid="maven.compile.classpath"/>
|
|
|
|
<property name="test_classpath" refid="maven.test.classpath"/>
|
|
|
|
<exec executable="ctest" failonerror="true" dir="${project.build.directory}/native">
|
|
|
|
<arg line="--output-on-failure"/>
|
|
|
|
<arg line="${native_ctest_args}"/>
|
|
|
|
<env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
|
|
|
|
<!-- HADOOP_HOME required to find winutils. -->
|
|
|
|
<env key="HADOOP_HOME" value="${hadoop.common.build.dir}"/>
|
|
|
|
<!-- Make sure hadoop.dll and jvm.dll are on PATH. -->
|
|
|
|
<env key="PATH" value="${env.PATH};${hadoop.common.build.dir}/bin;${java.home}/jre/bin/server;${java.home}/bin/server"/>
|
|
|
|
<!-- Make sure libhadoop.so is on LD_LIBRARY_PATH. -->
|
|
|
|
<env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
|
|
|
</exec>
|
|
|
|
</target>
|
2015-09-30 00:45:53 +00:00
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>native</id>
|
|
|
|
<activation>
|
|
|
|
<activeByDefault>false</activeByDefault>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<runningWithNative>true</runningWithNative>
|
|
|
|
</properties>
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
2018-08-17 17:23:18 +00:00
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-maven-plugins</artifactId>
|
2015-09-30 00:45:53 +00:00
|
|
|
<executions>
|
|
|
|
<execution>
|
2018-08-17 17:23:18 +00:00
|
|
|
<id>cmake-compile</id>
|
2015-09-30 00:45:53 +00:00
|
|
|
<phase>compile</phase>
|
2018-08-17 17:23:18 +00:00
|
|
|
<goals><goal>cmake-compile</goal></goals>
|
2015-09-30 00:45:53 +00:00
|
|
|
<configuration>
|
2018-08-17 17:23:18 +00:00
|
|
|
<source>${basedir}/src</source>
|
|
|
|
<vars>
|
|
|
|
<GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
|
|
|
|
<JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
|
|
|
|
<REQUIRE_FUSE>${require.fuse}</REQUIRE_FUSE>
|
|
|
|
<REQUIRE_VALGRIND>${require.valgrind}</REQUIRE_VALGRIND>
|
|
|
|
<HADOOP_BUILD>1</HADOOP_BUILD>
|
|
|
|
<REQUIRE_LIBWEBHDFS>${require.libwebhdfs}</REQUIRE_LIBWEBHDFS>
|
|
|
|
<REQUIRE_OPENSSL>${require.openssl}</REQUIRE_OPENSSL>
|
|
|
|
<CUSTOM_OPENSSL_PREFIX>${openssl.prefix}</CUSTOM_OPENSSL_PREFIX>
|
|
|
|
<CUSTOM_OPENSSL_LIB>${openssl.lib}</CUSTOM_OPENSSL_LIB>
|
|
|
|
<CUSTOM_OPENSSL_INCLUDE>${openssl.include}</CUSTOM_OPENSSL_INCLUDE>
|
|
|
|
</vars>
|
|
|
|
<output>${project.build.directory}</output>
|
2015-09-30 00:45:53 +00:00
|
|
|
</configuration>
|
|
|
|
</execution>
|
2018-08-17 17:23:18 +00:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
2015-09-30 00:45:53 +00:00
|
|
|
<execution>
|
|
|
|
<id>native_tests</id>
|
|
|
|
<phase>test</phase>
|
|
|
|
<goals><goal>run</goal></goals>
|
|
|
|
<configuration>
|
|
|
|
<skip>${skipTests}</skip>
|
|
|
|
<target>
|
|
|
|
<property name="compile_classpath" refid="maven.compile.classpath"/>
|
|
|
|
<property name="test_classpath" refid="maven.test.classpath"/>
|
2015-11-03 21:19:24 +00:00
|
|
|
<exec executable="ctest" failonerror="true" dir="${project.build.directory}/">
|
2016-01-14 15:58:55 +00:00
|
|
|
<arg line="--output-on-failure"/>
|
2015-12-15 23:37:34 +00:00
|
|
|
<arg line="${native_ctest_args}"/>
|
2019-03-04 20:36:00 +00:00
|
|
|
<env key="LIBHDFS_OPTS" value="${env.LIBHDFS_OPTS} -Xcheck:jni"/>
|
2015-11-03 21:19:24 +00:00
|
|
|
<env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
|
|
|
|
<!-- Make sure libhadoop.so is on LD_LIBRARY_PATH. -->
|
2018-02-16 15:27:11 +00:00
|
|
|
<env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
2018-08-17 17:23:18 +00:00
|
|
|
<env key="DYLD_LIBRARY_PATH" value="${env.DYLD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
2015-11-03 21:19:24 +00:00
|
|
|
</exec>
|
2015-09-30 00:45:53 +00:00
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
2017-07-25 16:25:45 +00:00
|
|
|
<profile>
|
2018-08-17 17:23:18 +00:00
|
|
|
<id>native-clang</id>
|
2017-07-25 16:25:45 +00:00
|
|
|
<activation>
|
|
|
|
<activeByDefault>false</activeByDefault>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<runningWithNative>true</runningWithNative>
|
|
|
|
</properties>
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
2018-08-17 17:23:18 +00:00
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-maven-plugins</artifactId>
|
2017-07-25 16:25:45 +00:00
|
|
|
<executions>
|
|
|
|
<execution>
|
2018-08-17 17:23:18 +00:00
|
|
|
<id>cmake-compile-clang</id>
|
2017-07-25 16:25:45 +00:00
|
|
|
<phase>compile</phase>
|
2018-08-17 17:23:18 +00:00
|
|
|
<goals><goal>cmake-compile</goal></goals>
|
2017-07-25 16:25:45 +00:00
|
|
|
<configuration>
|
2018-08-17 17:23:18 +00:00
|
|
|
<source>${basedir}/src</source>
|
|
|
|
<vars>
|
|
|
|
<CMAKE_C_COMPILER>clang</CMAKE_C_COMPILER>
|
|
|
|
<CMAKE_CXX_COMPILER>clang++</CMAKE_CXX_COMPILER>
|
|
|
|
<GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
|
|
|
|
<JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
|
|
|
|
<REQUIRE_FUSE>${require.fuse}</REQUIRE_FUSE>
|
|
|
|
<REQUIRE_VALGRIND>${require.valgrind}</REQUIRE_VALGRIND>
|
|
|
|
<HADOOP_BUILD>1</HADOOP_BUILD>
|
|
|
|
<REQUIRE_LIBWEBHDFS>${require.libwebhdfs}</REQUIRE_LIBWEBHDFS>
|
|
|
|
<REQUIRE_OPENSSL>${require.openssl}</REQUIRE_OPENSSL>
|
|
|
|
<CUSTOM_OPENSSL_PREFIX>${openssl.prefix}</CUSTOM_OPENSSL_PREFIX>
|
|
|
|
<CUSTOM_OPENSSL_LIB>${openssl.lib}</CUSTOM_OPENSSL_LIB>
|
|
|
|
<CUSTOM_OPENSSL_INCLUDE>${openssl.include}</CUSTOM_OPENSSL_INCLUDE>
|
|
|
|
</vars>
|
|
|
|
<output>${project.build.directory}/clang</output>
|
2017-07-25 16:25:45 +00:00
|
|
|
</configuration>
|
|
|
|
</execution>
|
2018-08-17 17:23:18 +00:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
2017-07-25 16:25:45 +00:00
|
|
|
<execution>
|
2018-08-17 17:23:18 +00:00
|
|
|
<id>native_tests_clang</id>
|
2017-07-25 16:25:45 +00:00
|
|
|
<phase>test</phase>
|
|
|
|
<goals><goal>run</goal></goals>
|
|
|
|
<configuration>
|
|
|
|
<skip>${skipTests}</skip>
|
|
|
|
<target>
|
|
|
|
<property name="compile_classpath" refid="maven.compile.classpath"/>
|
|
|
|
<property name="test_classpath" refid="maven.test.classpath"/>
|
2018-08-17 17:23:18 +00:00
|
|
|
<exec executable="ctest" failonerror="true" dir="${project.build.directory}/clang">
|
2017-07-25 16:25:45 +00:00
|
|
|
<arg line="--output-on-failure"/>
|
|
|
|
<arg line="${native_ctest_args}"/>
|
|
|
|
<env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
|
|
|
|
<!-- Make sure libhadoop.so is on LD_LIBRARY_PATH. -->
|
2018-08-17 17:23:18 +00:00
|
|
|
<env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH}:${project.build.directory}/clang/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
|
|
|
<env key="DYLD_LIBRARY_PATH" value="${env.DYLD_LIBRARY_PATH}:${project.build.directory}/clang/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
2017-07-25 16:25:45 +00:00
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
2015-09-30 00:45:53 +00:00
|
|
|
</profiles>
|
|
|
|
</project>
|