From e4647da0dbba0e776c54921acadf1f5f6a5f4d81 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Thu, 5 Oct 2017 18:00:42 -0500 Subject: [PATCH] HBASE-18934 pick hadoop versions for precommit test after patch branch is determined. Signed-off-by: Mike Drob --- dev-support/hbase-personality.sh | 40 +++++++++++++++++++------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh index c58e47e6346..c0386e5e400 100755 --- a/dev-support/hbase-personality.sh +++ b/dev-support/hbase-personality.sh @@ -36,6 +36,15 @@ personality_plugins "all" +if ! declare -f "yetus_info" >/dev/null; then + + function yetus_info + { + echo "[$(date) INFO]: $*" 1>&2 + } + +fi + ## @description Globals specific to this personality ## @audience private ## @stability evolving @@ -51,19 +60,6 @@ function personality_globals #shellcheck disable=SC2034 GITHUB_REPO="apache/hbase" - # All supported Hadoop versions that we want to test the compilation with - # See the Hadoop section on prereqs in the HBase Reference Guide - if [[ "${PATCH_BRANCH}" = branch-1* ]]; then - HBASE_HADOOP2_VERSIONS="2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3" - HBASE_HADOOP3_VERSIONS="" - elif [[ ${PATCH_BRANCH} = branch-2* ]]; then - HBASE_HADOOP2_VERSIONS="2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3" - HBASE_HADOOP3_VERSIONS="3.0.0-alpha4" - else # master or a feature branch - HBASE_HADOOP2_VERSIONS="2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3" - HBASE_HADOOP3_VERSIONS="3.0.0-alpha4" - fi - # TODO use PATCH_BRANCH to select jdk versions to use. # Override the maven options @@ -244,9 +240,21 @@ function hadoopcheck_rebuild big_console_header "Compiling against various Hadoop versions" - hbase_hadoop2_versions=${HBASE_HADOOP2_VERSIONS} - hbase_hadoop3_versions=${HBASE_HADOOP3_VERSIONS} - + # All supported Hadoop versions that we want to test the compilation with + # See the Hadoop section on prereqs in the HBase Reference Guide + if [[ "${PATCH_BRANCH}" = branch-1* ]]; then + yetus_info "setting Hadoop versions to test based on branch-1-ish rules." + hbase_hadoop2_versions="2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3" + hbase_hadoop3_versions="" + elif [[ ${PATCH_BRANCH} = branch-2* ]]; then + yetus_info "setting Hadoop versions to test based on branch-2-ish rules." + hbase_hadoop2_versions="2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3" + hbase_hadoop3_versions="3.0.0-alpha4" + else # master or a feature branch + yetus_info "setting Hadoop versions to test based on master/feature branch rules." + hbase_hadoop2_versions="2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3" + hbase_hadoop3_versions="3.0.0-alpha4" + fi export MAVEN_OPTS="${MAVEN_OPTS}" for hadoopver in ${hbase_hadoop2_versions}; do