HBASE-24213 Backport the pre commit changes for HBASE-24169 to all branches (#1548)

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
Duo Zhang 2020-04-22 10:26:10 +08:00
parent ee8da704c9
commit 53d5f3cc70
1 changed files with 20 additions and 5 deletions

View File

@ -146,7 +146,7 @@ function personality_modules
fi
if [[ -n "${HADOOP_PROFILE}" ]]; then
extra="${extra} -Dhadoop.profile=${HADOOP_PROFILE}"
extra="${extra} -Phadoop-${HADOOP_PROFILE}"
fi
# BUILDMODE value is 'full' when there is no patch to be tested, and we are running checks on
@ -442,6 +442,14 @@ function shadedjars_rebuild
start_clock
local -a maven_args=('clean' 'verify' '-fae' '--batch-mode'
'-pl' 'hbase-shaded/hbase-shaded-check-invariants' '-am'
'-Dtest=NoUnitTests' '-DHBasePatchProcess' '-Prelease'
'-Dmaven.javadoc.skip=true' '-Dcheckstyle.skip=true' '-Dspotbugs.skip=true')
if [[ -n "${HADOOP_PROFILE}" ]]; then
maven_args+=("-Phadoop-${HADOOP_PROFILE}")
fi
# disabled because "maven_executor" needs to return both command and args
# shellcheck disable=2046
echo_and_redirect "${logfile}" \
@ -573,13 +581,16 @@ function hadoopcheck_rebuild
else
hbase_hadoop2_versions="2.8.5 2.9.2 2.10.0"
fi
else
yetus_info "Setting Hadoop 2 versions to test based on branch-2.3+/master/feature branch rules."
elif [[ "${PATCH_BRANCH}" = branch-2.* ]]; then
yetus_info "Setting Hadoop 2 versions to test based on branch-2.3+ rules."
if [[ "${QUICK_HADOOPCHECK}" == "true" ]]; then
hbase_hadoop2_versions="2.10.0"
else
hbase_hadoop2_versions="2.10.0"
fi
else
yetus_info "Setting Hadoop 2 versions to null on master/feature branch rules since we do not support hadoop 2 for hbase 3.x any more."
hbase_hadoop2_versions=""
fi
if [[ "${PATCH_BRANCH}" = branch-1* ]]; then
yetus_info "Setting Hadoop 3 versions to test based on branch-1.x rules."
@ -625,7 +636,7 @@ function hadoopcheck_rebuild
$(maven_executor) clean install \
-DskipTests -DHBasePatchProcess \
-Dhadoop-three.version="${hadoopver}" \
-Dhadoop.profile=3.0
-Phadoop-3.0
count=$(${GREP} -c '\[ERROR\]' "${logfile}")
if [[ ${count} -gt 0 ]]; then
add_vote_table -1 hadoopcheck "${BUILDMODEMSG} causes ${count} errors with Hadoop v${hadoopver}."
@ -639,7 +650,11 @@ function hadoopcheck_rebuild
fi
if [[ -n "${hbase_hadoop3_versions}" ]]; then
add_vote_table +1 hadoopcheck "Patch does not cause any errors with Hadoop ${hbase_hadoop2_versions} or ${hbase_hadoop3_versions}."
if [[ -n "${hbase_hadoop2_versions}" ]]; then
add_vote_table +1 hadoopcheck "Patch does not cause any errors with Hadoop ${hbase_hadoop2_versions} or ${hbase_hadoop3_versions}."
else
add_vote_table +1 hadoopcheck "Patch does not cause any errors with Hadoop ${hbase_hadoop3_versions}."
fi
else
add_vote_table +1 hadoopcheck "Patch does not cause any errors with Hadoop ${hbase_hadoop2_versions}."
fi