2014-07-22 15:55:03 -04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2014-07-17 13:44:55 -04:00
|
|
|
<!--
|
|
|
|
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
|
|
|
|
|
|
|
|
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. See accompanying LICENSE file.
|
|
|
|
-->
|
2014-07-22 15:55:03 -04:00
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
2014-07-17 13:44:55 -04:00
|
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
|
|
|
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
|
<parent>
|
|
|
|
<artifactId>hadoop-mapreduce-client</artifactId>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<version>3.0.0-SNAPSHOT</version>
|
|
|
|
</parent>
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-mapreduce-client-nativetask</artifactId>
|
|
|
|
<version>3.0.0-SNAPSHOT</version>
|
2015-05-08 05:47:52 -04:00
|
|
|
<name>Apache Hadoop MapReduce NativeTask</name>
|
2014-07-17 13:44:55 -04:00
|
|
|
|
|
|
|
<properties>
|
|
|
|
<!-- Needed for generating FindBugs warnings using parent pom -->
|
|
|
|
<mr.basedir>${project.parent.basedir}/../</mr.basedir>
|
2014-07-22 15:55:03 -04:00
|
|
|
</properties>
|
2014-07-17 13:44:55 -04:00
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-common</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-mapreduce-client-core</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.avro</groupId>
|
|
|
|
<artifactId>avro</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>junit</groupId>
|
|
|
|
<artifactId>junit</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.mockito</groupId>
|
2014-07-22 15:55:03 -04:00
|
|
|
<artifactId>mockito-all</artifactId>
|
2014-07-17 13:44:55 -04:00
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-common</artifactId>
|
|
|
|
<type>test-jar</type>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2014-07-24 07:44:09 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
|
|
|
<artifactId>hadoop-mapreduce-client-common</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2014-07-17 13:44:55 -04:00
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<properties>
|
|
|
|
<property>
|
|
|
|
<name>listener</name>
|
|
|
|
<value>org.apache.hadoop.test.TimedOutTestsListener</value>
|
|
|
|
</property>
|
|
|
|
</properties>
|
|
|
|
<includes>
|
2014-09-01 23:00:48 -04:00
|
|
|
<include>**/*Test.java</include>
|
|
|
|
<include>**/Test*.java</include>
|
2014-07-22 15:55:03 -04:00
|
|
|
</includes>
|
2014-07-17 13:44:55 -04:00
|
|
|
</configuration>
|
|
|
|
</plugin>
|
2014-09-05 16:41:18 -04:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.rat</groupId>
|
|
|
|
<artifactId>apache-rat-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<excludes>
|
|
|
|
<exclude>src/main/native/testData/*</exclude>
|
|
|
|
<!-- gtest has a compatible license -->
|
|
|
|
<exclude>src/main/native/gtest/**/*</exclude>
|
|
|
|
</excludes>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
2014-07-17 13:44:55 -04:00
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
|
|
|
|
<profiles>
|
|
|
|
<profile>
|
|
|
|
<id>native</id>
|
|
|
|
<activation>
|
|
|
|
<activeByDefault>false</activeByDefault>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<snappy.prefix></snappy.prefix>
|
|
|
|
<snappy.lib></snappy.lib>
|
|
|
|
<snappy.include></snappy.include>
|
|
|
|
<require.snappy>false</require.snappy>
|
|
|
|
</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>mac</family>
|
|
|
|
<family>unix</family>
|
|
|
|
<message>native build only supported on Mac or
|
|
|
|
Unix</message>
|
|
|
|
</requireOS>
|
|
|
|
</rules>
|
|
|
|
<fail>true</fail>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2014-07-22 15:55:03 -04:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>native-maven-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>compile</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>javah</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
|
|
|
|
<javahClassNames>
|
|
|
|
<javaClassName>org.apache.hadoop.mapred.nativetask.NativeBatchProcessor</javaClassName>
|
|
|
|
<javaClassName>org.apache.hadoop.mapred.nativetask.NativeRuntime</javaClassName>
|
|
|
|
</javahClassNames>
|
|
|
|
<javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2014-07-17 13:44:55 -04:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>make</id>
|
|
|
|
<phase>compile</phase>
|
2014-07-22 15:55:03 -04:00
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
2014-07-17 13:44:55 -04:00
|
|
|
<configuration>
|
|
|
|
<target>
|
2014-08-06 02:01:12 -04:00
|
|
|
<copy file="${basedir}/../../../hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h"
|
|
|
|
todir="${project.build.directory}/native/" />
|
|
|
|
<copy file="${basedir}/../../../hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c"
|
|
|
|
todir="${project.build.directory}/native/" />
|
2014-07-22 15:55:03 -04:00
|
|
|
<copy todir="${project.build.directory}/native/test/testData"
|
|
|
|
overwrite="true">
|
|
|
|
<fileset dir="${basedir}/src/main/native/testData" />
|
|
|
|
</copy>
|
|
|
|
<exec executable="cmake" dir="${project.build.directory}/native"
|
|
|
|
failonerror="true">
|
|
|
|
<arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DREQUIRE_SNAPPY=${require.snappy} -DCUSTOM_SNAPPY_PREFIX=${snappy.prefix} -DCUSTOM_SNAPPY_LIB=${snappy.lib} -DCUSTOM_SNAPPY_INCLUDE=${snappy.include}" />
|
2014-07-17 13:44:55 -04:00
|
|
|
</exec>
|
|
|
|
<exec executable="make" dir="${project.build.directory}/native" failonerror="true">
|
2014-07-22 15:55:03 -04:00
|
|
|
<arg line="VERBOSE=1" />
|
2014-07-17 13:44:55 -04:00
|
|
|
</exec>
|
2014-07-22 15:55:03 -04:00
|
|
|
<!-- The second make is a workaround for HADOOP-9215. It can be
|
|
|
|
removed when version 2.6 of cmake is no longer supported . -->
|
2014-07-17 13:44:55 -04:00
|
|
|
<exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
|
2014-07-22 15:55:03 -04:00
|
|
|
</target>
|
2014-07-17 13:44:55 -04:00
|
|
|
</configuration>
|
|
|
|
</execution>
|
2014-08-14 00:47:20 -04:00
|
|
|
<execution>
|
|
|
|
<id>native_tests</id>
|
|
|
|
<phase>test</phase>
|
|
|
|
<goals><goal>run</goal></goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
2015-05-29 17:54:18 -04:00
|
|
|
<exec executable="${shell-executable}" failonerror="true" dir="${project.build.directory}/native/test">
|
2014-08-14 00:47:20 -04:00
|
|
|
<arg value="-c"/>
|
|
|
|
<arg value="[ x$SKIPTESTS = xtrue ] || sh test.sh"/>
|
|
|
|
<env key="SKIPTESTS" value="${skipTests}"/>
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
2014-07-17 13:44:55 -04:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
|
|
|
</profiles>
|
|
|
|
</project>
|