Repository: yetus Updated Branches: refs/heads/master e27efaa39 -> 62e1d22a4
YETUS-545. Hadoop personality: clean up some OS X & Windows issues Signed-off-by: Sean Busbey <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/62e1d22a Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/62e1d22a Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/62e1d22a Branch: refs/heads/master Commit: 62e1d22a48f1b448643767a842df586c82df65eb Parents: 6d017f4 Author: Allen Wittenauer <[email protected]> Authored: Sat Sep 2 18:41:54 2017 -0700 Committer: Allen Wittenauer <[email protected]> Committed: Sat Oct 21 11:48:30 2017 -0700 ---------------------------------------------------------------------- precommit/personality/hadoop.sh | 41 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/62e1d22a/precommit/personality/hadoop.sh ---------------------------------------------------------------------- diff --git a/precommit/personality/hadoop.sh b/precommit/personality/hadoop.sh index 942c4ef..7775598 100755 --- a/precommit/personality/hadoop.sh +++ b/precommit/personality/hadoop.sh @@ -118,6 +118,13 @@ function hadoop_unittest_prereqs fi done + # Windows builds *ALWAYS* need hadoop-common compiled + case ${OSTYPE} in + Windows_NT|CYGWIN*|MINGW*|MSYS*) + need_common=1 + ;; + esac + if [[ ${need_common} -eq 1 && ${building_common} -eq 0 ]]; then echo "unit test pre-reqs:" @@ -170,7 +177,6 @@ function hadoop_native_flags fi declare -a args - declare windows=false # Based upon HADOOP-11937 # @@ -180,7 +186,8 @@ function hadoop_native_flags # is always tricky. # - Darwin assumes homebrew is in use. # - HADOOP-12027 required for bzip2 on OS X. - # - bzip2 is broken in lots of places. + # - bzip2 is broken in lots of places + # (the shared library is considered experimental) # e.g, HADOOP-12027 for OS X. so no -Drequire.bzip2 # @@ -192,10 +199,14 @@ function hadoop_native_flags if [[ -d "${OPENSSL_HOME}/include" ]]; then args=("${args[@]}" "-Dopenssl.prefix=${OPENSSL_HOME}") + elif [[ -d "${HADOOP_HOMEBREW_DIR}/opt/openssl/" ]]; then + args=("${args[@]}" "-Dopenssl.prefix=${HADOOP_HOMEBREW_DIR}/opt/openssl/") fi if [[ -d "${SNAPPY_HOME}/include" ]]; then args=("${args[@]}" "-Dsnappy.prefix=${SNAPPY_HOME}") + elif [[ -d "${HADOOP_HOMEBREW_DIR}/include/snappy.h" ]]; then + args=("${args[@]}" "-Dsnappy.prefix=${HADOOP_HOMEBREW_DIR}/opt/snappy") fi case ${OSTYPE} in @@ -210,34 +221,18 @@ function hadoop_native_flags "${args[@]}" \ -Pnative \ -Drequire.snappy \ - -Drequire.openssl \ - -Dopenssl.prefix="${HADOOP_HOMEBREW_DIR}/opt/openssl/" \ - -Dopenssl.include="${HADOOP_HOMEBREW_DIR}/opt/openssl/include" \ - -Dopenssl.lib="${HADOOP_HOMEBREW_DIR}/opt/openssl/lib" - ;; - Windows_NT) - windows=true - ;; - CYGWIN*) - windows=true - ;; - MINGW32*) - windows=true + -Drequire.openssl ;; - MSYS*) - windows=true + Windows_NT|CYGWIN*|MINGW*|MSYS*) + echo \ + "${args[@]}" \ + -Drequire.snappy -Drequire.openssl -Pnative-win ;; *) echo \ "${args[@]}" ;; esac - - if [[ ${windows} = true ]]; then - echo \ - "${args[@]}" \ - -Drequire.snappy -Drequire.openssl -Pnative-win - fi } ## @description Queue up modules for this personality
