HADOOP-8620. Add -Drequire.fuse and -Drequire.snappy. Contributed by Colin Patrick McCabe
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1368251 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
12d0e02591
commit
1264b8e707
|
@ -277,6 +277,9 @@ Branch-2 ( Unreleased changes )
|
|||
HADOOP-8609. IPC server logs a useless message when shutting down socket.
|
||||
(Jon Zuanich via atm)
|
||||
|
||||
HADOOP-8620. Add -Drequire.fuse and -Drequire.snappy. (Colin
|
||||
Patrick McCabe via eli)
|
||||
|
||||
BUG FIXES
|
||||
|
||||
HADOOP-8372. NetUtils.normalizeHostName() incorrectly handles hostname
|
||||
|
|
|
@ -31,9 +31,6 @@
|
|||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<snappy.prefix>/usr/local</snappy.prefix>
|
||||
<snappy.lib>${snappy.prefix}/lib</snappy.lib>
|
||||
<bundle.snappy>false</bundle.snappy>
|
||||
<kdc.resource.dir>src/test/resources/kdc</kdc.resource.dir>
|
||||
<hadoop.component>common</hadoop.component>
|
||||
<is.hadoop.component>true</is.hadoop.component>
|
||||
|
@ -533,10 +530,10 @@
|
|||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<properties>
|
||||
<snappy.prefix>/usr/local</snappy.prefix>
|
||||
<snappy.lib>${snappy.prefix}/lib</snappy.lib>
|
||||
<snappy.include>${snappy.prefix}/include</snappy.include>
|
||||
<runas.home></runas.home>
|
||||
<snappy.prefix></snappy.prefix>
|
||||
<snappy.lib></snappy.lib>
|
||||
<snappy.include></snappy.include>
|
||||
<require.snappy>false</require.snappy>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
|
@ -579,9 +576,7 @@
|
|||
<configuration>
|
||||
<target>
|
||||
<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}"/>
|
||||
<env key="CFLAGS" value="-I${snappy.include}"/>
|
||||
<env key="LDFLAGS" value="-L${snappy.lib}"/>
|
||||
<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}"/>
|
||||
</exec>
|
||||
<exec executable="make" dir="${project.build.directory}/native" failonerror="true">
|
||||
<arg line="VERBOSE=1"/>
|
||||
|
|
|
@ -79,17 +79,26 @@ INCLUDE(CheckCSourceCompiles)
|
|||
CHECK_FUNCTION_EXISTS(sync_file_range HAVE_SYNC_FILE_RANGE)
|
||||
CHECK_FUNCTION_EXISTS(posix_fadvise HAVE_POSIX_FADVISE)
|
||||
|
||||
find_library(SNAPPY_LIBRARY NAMES snappy PATHS)
|
||||
find_path(SNAPPY_INCLUDE_DIR NAMES snappy.h PATHS)
|
||||
if (SNAPPY_LIBRARY)
|
||||
find_library(SNAPPY_LIBRARY
|
||||
NAMES snappy
|
||||
PATHS ${CUSTOM_SNAPPY_PREFIX} ${CUSTOM_SNAPPY_PREFIX}/lib
|
||||
${CUSTOM_SNAPPY_PREFIX}/lib64 ${CUSTOM_SNAPPY_LIB})
|
||||
find_path(SNAPPY_INCLUDE_DIR
|
||||
NAMES snappy.h
|
||||
PATHS ${CUSTOM_SNAPPY_PREFIX} ${CUSTOM_SNAPPY_PREFIX}/include
|
||||
${CUSTOM_SNAPPY_INCLUDE})
|
||||
if (SNAPPY_LIBRARY AND SNAPPY_INCLUDE_DIR)
|
||||
GET_FILENAME_COMPONENT(HADOOP_SNAPPY_LIBRARY ${SNAPPY_LIBRARY} NAME)
|
||||
set(SNAPPY_SOURCE_FILES
|
||||
"${D}/io/compress/snappy/SnappyCompressor.c"
|
||||
"${D}/io/compress/snappy/SnappyDecompressor.c")
|
||||
else (${SNAPPY_LIBRARY})
|
||||
else (SNAPPY_LIBRARY AND SNAPPY_INCLUDE_DIR)
|
||||
set(SNAPPY_INCLUDE_DIR "")
|
||||
set(SNAPPY_SOURCE_FILES "")
|
||||
endif (SNAPPY_LIBRARY)
|
||||
IF(REQUIRE_SNAPPY)
|
||||
MESSAGE(FATAL_ERROR "Required snappy library could not be found. SNAPPY_LIBRARY=${SNAPPY_LIBRARY}, SNAPPY_INCLUDE_DIR=${SNAPPY_INCLUDE_DIR}, CUSTOM_SNAPPY_INCLUDE_DIR=${CUSTOM_SNAPPY_INCLUDE_DIR}, CUSTOM_SNAPPY_PREFIX=${CUSTOM_SNAPPY_PREFIX}, CUSTOM_SNAPPY_INCLUDE=${CUSTOM_SNAPPY_INCLUDE}")
|
||||
ENDIF(REQUIRE_SNAPPY)
|
||||
endif (SNAPPY_LIBRARY AND SNAPPY_INCLUDE_DIR)
|
||||
|
||||
include_directories(
|
||||
${GENERATED_JAVAH}
|
||||
|
|
|
@ -34,6 +34,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||
<hadoop.component>hdfs</hadoop.component>
|
||||
<kdc.resource.dir>../../hadoop-common-project/hadoop-common/src/test/resources/kdc</kdc.resource.dir>
|
||||
<is.hadoop.component>true</is.hadoop.component>
|
||||
<require.fuse>false</require.fuse>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -414,7 +415,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||
<mkdir dir="${project.build.directory}/native"/>
|
||||
<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}"/>
|
||||
<arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DREQUIRE_FUSE=${require.fuse}"/>
|
||||
</exec>
|
||||
<exec executable="make" dir="${project.build.directory}/native" failonerror="true">
|
||||
<arg line="VERBOSE=1"/>
|
||||
|
|
|
@ -71,4 +71,8 @@ IF(FUSE_FOUND)
|
|||
m
|
||||
pthread
|
||||
)
|
||||
ELSE(FUSE_FOUND)
|
||||
IF(REQUIRE_FUSE)
|
||||
MESSAGE(FATAL_ERROR "Required component fuse_dfs could not be built.")
|
||||
ENDIF(REQUIRE_FUSE)
|
||||
ENDIF(FUSE_FOUND)
|
||||
|
|
Loading…
Reference in New Issue