HBASE-24280 Skip explicit hadoop3 profile activation on master
On 2.x branches, we need to explicitly activate profiles for H3. On master, all H2 support is dropped which means no special profiles are required for H3 (though, there is still a profile there to encapsulate H3 logic). We need to make sure that the yetus invocation can correctly pass down any profile information into the personality, so we activate the exact profiles we want. Closes #1609 Co-authored-by: Istvan Toth <stoty@cloudera.com> Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
d67f065594
commit
e54eec71c8
|
@ -145,8 +145,11 @@ function personality_modules
|
||||||
extra="${extra} -Dhttps.protocols=TLSv1.2"
|
extra="${extra} -Dhttps.protocols=TLSv1.2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${HADOOP_PROFILE}" ]]; then
|
# If we have HADOOP_PROFILE specified and we're on branch-2.x, pass along
|
||||||
extra="${extra} -Phadoop-${HADOOP_PROFILE}"
|
# the hadoop.profile system property. Ensures that Hadoop2 and Hadoop3
|
||||||
|
# logic is not both activated within Maven.
|
||||||
|
if [[ -n "${HADOOP_PROFILE}" ]] && [[ "${PATCH_BRANCH}" =~ branch-2* ]] ; then
|
||||||
|
extra="${extra} -Dhadoop.profile=${HADOOP_PROFILE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# BUILDMODE value is 'full' when there is no patch to be tested, and we are running checks on
|
# BUILDMODE value is 'full' when there is no patch to be tested, and we are running checks on
|
||||||
|
@ -458,8 +461,11 @@ function shadedjars_rebuild
|
||||||
'-pl' 'hbase-shaded/hbase-shaded-check-invariants' '-am'
|
'-pl' 'hbase-shaded/hbase-shaded-check-invariants' '-am'
|
||||||
'-Dtest=NoUnitTests' '-DHBasePatchProcess' '-Prelease'
|
'-Dtest=NoUnitTests' '-DHBasePatchProcess' '-Prelease'
|
||||||
'-Dmaven.javadoc.skip=true' '-Dcheckstyle.skip=true' '-Dspotbugs.skip=true')
|
'-Dmaven.javadoc.skip=true' '-Dcheckstyle.skip=true' '-Dspotbugs.skip=true')
|
||||||
if [[ -n "${HADOOP_PROFILE}" ]]; then
|
# If we have HADOOP_PROFILE specified and we're on branch-2.x, pass along
|
||||||
maven_args+=("-Phadoop-${HADOOP_PROFILE}")
|
# the hadoop.profile system property. Ensures that Hadoop2 and Hadoop3
|
||||||
|
# logic is not both activated within Maven.
|
||||||
|
if [[ -n "${HADOOP_PROFILE}" ]] && [[ "${PATCH_BRANCH}" =~ branch-2* ]] ; then
|
||||||
|
maven_args+=("-Dhadoop.profile=${HADOOP_PROFILE}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# disabled because "maven_executor" needs to return both command and args
|
# disabled because "maven_executor" needs to return both command and args
|
||||||
|
@ -636,6 +642,10 @@ function hadoopcheck_rebuild
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
hadoop_profile=""
|
||||||
|
if [[ "${PATCH_BRANCH}" =~ branch-2* ]]; then
|
||||||
|
hadoop_profile="-Dhadoop.profile=3.0"
|
||||||
|
fi
|
||||||
for hadoopver in ${hbase_hadoop3_versions}; do
|
for hadoopver in ${hbase_hadoop3_versions}; do
|
||||||
logfile="${PATCH_DIR}/patch-javac-${hadoopver}.txt"
|
logfile="${PATCH_DIR}/patch-javac-${hadoopver}.txt"
|
||||||
# disabled because "maven_executor" needs to return both command and args
|
# disabled because "maven_executor" needs to return both command and args
|
||||||
|
@ -644,7 +654,7 @@ function hadoopcheck_rebuild
|
||||||
$(maven_executor) clean install \
|
$(maven_executor) clean install \
|
||||||
-DskipTests -DHBasePatchProcess \
|
-DskipTests -DHBasePatchProcess \
|
||||||
-Dhadoop-three.version="${hadoopver}" \
|
-Dhadoop-three.version="${hadoopver}" \
|
||||||
-Phadoop-3.0
|
${hadoop_profile}
|
||||||
count=$(${GREP} -c '\[ERROR\]' "${logfile}")
|
count=$(${GREP} -c '\[ERROR\]' "${logfile}")
|
||||||
if [[ ${count} -gt 0 ]]; then
|
if [[ ${count} -gt 0 ]]; then
|
||||||
add_vote_table -1 hadoopcheck "${BUILDMODEMSG} causes ${count} errors with Hadoop v${hadoopver}."
|
add_vote_table -1 hadoopcheck "${BUILDMODEMSG} causes ${count} errors with Hadoop v${hadoopver}."
|
||||||
|
|
|
@ -76,7 +76,11 @@ fi
|
||||||
|
|
||||||
# For testing with specific hadoop version. Activates corresponding profile in maven runs.
|
# For testing with specific hadoop version. Activates corresponding profile in maven runs.
|
||||||
if [[ -n "${HADOOP_PROFILE}" ]]; then
|
if [[ -n "${HADOOP_PROFILE}" ]]; then
|
||||||
YETUS_ARGS=("--hadoop-profile=${HADOOP_PROFILE}" "${YETUS_ARGS[@]}")
|
# Master has only Hadoop3 support. We don't need to activate any profile.
|
||||||
|
# The Jenkinsfile should not attempt to run any Hadoop2 tests.
|
||||||
|
if [[ "${BRANCH_NAME}" =~ branch-2* ]]; then
|
||||||
|
YETUS_ARGS=("--hadoop-profile=${HADOOP_PROFILE}" "${YETUS_ARGS[@]}")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${SKIP_ERROR_PRONE}" ]]; then
|
if [[ -n "${SKIP_ERROR_PRONE}" ]]; then
|
||||||
|
|
|
@ -127,7 +127,11 @@ YETUS_ARGS+=("--skip-errorprone")
|
||||||
YETUS_ARGS+=("--skip-dirs=dev-support")
|
YETUS_ARGS+=("--skip-dirs=dev-support")
|
||||||
# For testing with specific hadoop version. Activates corresponding profile in maven runs.
|
# For testing with specific hadoop version. Activates corresponding profile in maven runs.
|
||||||
if [[ -n "${HADOOP_PROFILE}" ]]; then
|
if [[ -n "${HADOOP_PROFILE}" ]]; then
|
||||||
YETUS_ARGS+=("--hadoop-profile=${HADOOP_PROFILE}")
|
# Master has only Hadoop3 support. We don't need to activate any profile.
|
||||||
|
# The Jenkinsfile should not attempt to run any Hadoop2 tests.
|
||||||
|
if [[ "${BRANCH_NAME}" =~ branch-2* ]]; then
|
||||||
|
YETUS_ARGS+=("--hadoop-profile=${HADOOP_PROFILE}")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n "${EXCLUDE_TESTS_URL}" ]]; then
|
if [[ -n "${EXCLUDE_TESTS_URL}" ]]; then
|
||||||
YETUS_ARGS+=("--exclude-tests-url=${EXCLUDE_TESTS_URL}")
|
YETUS_ARGS+=("--exclude-tests-url=${EXCLUDE_TESTS_URL}")
|
||||||
|
|
Loading…
Reference in New Issue