HBASE-25021 Nightly job should skip hadoop-2 integration test for master (#2409)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
This commit is contained in:
Duo Zhang 2020-09-17 08:48:11 +08:00
parent 7a3bb8aefe
commit 0f3a66554f
2 changed files with 59 additions and 50 deletions

View File

@ -596,6 +596,7 @@ pipeline {
} }
environment { environment {
BASEDIR = "${env.WORKSPACE}/component" BASEDIR = "${env.WORKSPACE}/component"
BRANCH = "${env.BRANCH_NAME}"
} }
steps { steps {
sh '''#!/bin/bash -e sh '''#!/bin/bash -e
@ -646,61 +647,69 @@ pipeline {
tar --strip-component=1 -xzf "${client_artifact}" -C "hbase-client" tar --strip-component=1 -xzf "${client_artifact}" -C "hbase-client"
''' '''
unstash 'hadoop-2' unstash 'hadoop-2'
echo "Attempting to use run an instance on top of Hadoop 2."
sh '''#!/bin/bash -xe sh '''#!/bin/bash -xe
artifact=$(ls -1 "${WORKSPACE}"/hadoop-2*.tar.gz | head -n 1) if [[ "${BRANCH}" = branch-2* ]] || [[ "${BRANCH}" = branch-1* ]]; then
tar --strip-components=1 -xzf "${artifact}" -C "hadoop-2" echo "Attempting to use run an instance on top of Hadoop 2."
if ! "${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \ artifact=$(ls -1 "${WORKSPACE}"/hadoop-2*.tar.gz | head -n 1)
--single-process \ tar --strip-components=1 -xzf "${artifact}" -C "hadoop-2"
--working-dir output-integration/hadoop-2 \ if ! "${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
--hbase-client-install "hbase-client" \ --single-process \
"hbase-install" \ --working-dir output-integration/hadoop-2 \
"hadoop-2/bin/hadoop" \ --hbase-client-install "hbase-client" \
hadoop-2/share/hadoop/yarn/timelineservice \ "hbase-install" \
hadoop-2/share/hadoop/yarn/test/hadoop-yarn-server-tests-*-tests.jar \ "hadoop-2/bin/hadoop" \
hadoop-2/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-*-tests.jar \ hadoop-2/share/hadoop/yarn/timelineservice \
hadoop-2/bin/mapred \ hadoop-2/share/hadoop/yarn/test/hadoop-yarn-server-tests-*-tests.jar \
>output-integration/hadoop-2.log 2>&1 ; then hadoop-2/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-*-tests.jar \
echo "(x) {color:red}-1 client integration test{color}\n--Failed when running client tests on top of Hadoop 2. [see log for details|${BUILD_URL}/artifact/output-integration/hadoop-2.log]. (note that this means we didn't run on Hadoop 3)" >output-integration/commentfile hadoop-2/bin/mapred \
exit 2 >output-integration/hadoop-2.log 2>&1 ; then
echo "(x) {color:red}-1 client integration test{color}\n--Failed when running client tests on top of Hadoop 2. [see log for details|${BUILD_URL}/artifact/output-integration/hadoop-2.log]. (note that this means we didn't run on Hadoop 3)" >output-integration/commentfile
exit 2
fi
else
echo "Skipping to run against Hadoop 2 for branch ${BRANCH}"
fi fi
''' '''
unstash 'hadoop-3' unstash 'hadoop-3'
echo "Attempting to use run an instance on top of Hadoop 3."
sh '''#!/bin/bash -e sh '''#!/bin/bash -e
artifact=$(ls -1 "${WORKSPACE}"/hadoop-3*.tar.gz | head -n 1) if [[ "${BRANCH}" = branch-1* ]]; then
tar --strip-components=1 -xzf "${artifact}" -C "hadoop-3" echo "Skipping to run against Hadoop 3 for branch ${BRANCH}"
if ! "${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \ else
--single-process \ echo "Attempting to use run an instance on top of Hadoop 3."
--working-dir output-integration/hadoop-3 \ artifact=$(ls -1 "${WORKSPACE}"/hadoop-3*.tar.gz | head -n 1)
--hbase-client-install hbase-client \ tar --strip-components=1 -xzf "${artifact}" -C "hadoop-3"
hbase-install \ if ! "${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
hadoop-3/bin/hadoop \ --single-process \
hadoop-3/share/hadoop/yarn/timelineservice \ --working-dir output-integration/hadoop-3 \
hadoop-3/share/hadoop/yarn/test/hadoop-yarn-server-tests-*-tests.jar \ --hbase-client-install hbase-client \
hadoop-3/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-*-tests.jar \ hbase-install \
hadoop-3/bin/mapred \ hadoop-3/bin/hadoop \
>output-integration/hadoop-3.log 2>&1 ; then hadoop-3/share/hadoop/yarn/timelineservice \
echo "(x) {color:red}-1 client integration test{color}\n--Failed when running client tests on top of Hadoop 3. [see log for details|${BUILD_URL}/artifact/output-integration/hadoop-3.log]. (note that this means we didn't check the Hadoop 3 shaded client)" >output-integration/commentfile hadoop-3/share/hadoop/yarn/test/hadoop-yarn-server-tests-*-tests.jar \
exit 2 hadoop-3/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-*-tests.jar \
hadoop-3/bin/mapred \
>output-integration/hadoop-3.log 2>&1 ; then
echo "(x) {color:red}-1 client integration test{color}\n--Failed when running client tests on top of Hadoop 3. [see log for details|${BUILD_URL}/artifact/output-integration/hadoop-3.log]. (note that this means we didn't check the Hadoop 3 shaded client)" >output-integration/commentfile
exit 2
fi
echo "Attempting to use run an instance on top of Hadoop 3, relying on the Hadoop client artifacts for the example client program."
if ! "${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
--single-process \
--hadoop-client-classpath hadoop-3/share/hadoop/client/hadoop-client-api-*.jar:hadoop-3/share/hadoop/client/hadoop-client-runtime-*.jar \
--working-dir output-integration/hadoop-3-shaded \
--hbase-client-install hbase-client \
hbase-install \
hadoop-3/bin/hadoop \
hadoop-3/share/hadoop/yarn/timelineservice \
hadoop-3/share/hadoop/yarn/test/hadoop-yarn-server-tests-*-tests.jar \
hadoop-3/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-*-tests.jar \
hadoop-3/bin/mapred \
>output-integration/hadoop-3-shaded.log 2>&1 ; then
echo "(x) {color:red}-1 client integration test{color}\n--Failed when running client tests on top of Hadoop 3 using Hadoop's shaded client. [see log for details|${BUILD_URL}/artifact/output-integration/hadoop-3-shaded.log]." >output-integration/commentfile
exit 2
fi
echo "(/) {color:green}+1 client integration test{color}" >output-integration/commentfile
fi fi
echo "Attempting to use run an instance on top of Hadoop 3, relying on the Hadoop client artifacts for the example client program."
if ! "${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
--single-process \
--hadoop-client-classpath hadoop-3/share/hadoop/client/hadoop-client-api-*.jar:hadoop-3/share/hadoop/client/hadoop-client-runtime-*.jar \
--working-dir output-integration/hadoop-3-shaded \
--hbase-client-install hbase-client \
hbase-install \
hadoop-3/bin/hadoop \
hadoop-3/share/hadoop/yarn/timelineservice \
hadoop-3/share/hadoop/yarn/test/hadoop-yarn-server-tests-*-tests.jar \
hadoop-3/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-*-tests.jar \
hadoop-3/bin/mapred \
>output-integration/hadoop-3-shaded.log 2>&1 ; then
echo "(x) {color:red}-1 client integration test{color}\n--Failed when running client tests on top of Hadoop 3 using Hadoop's shaded client. [see log for details|${BUILD_URL}/artifact/output-integration/hadoop-3-shaded.log]." >output-integration/commentfile
exit 2
fi
echo "(/) {color:green}+1 client integration test{color}" >output-integration/commentfile
''' '''

View File

@ -176,7 +176,7 @@ fi
echo "HBase version information:" echo "HBase version information:"
"${component_install}/bin/hbase" version 2>/dev/null "${component_install}/bin/hbase" version 2>/dev/null
hbase_version=$("${component_install}/bin/hbase" version | head -n 1 2>/dev/null) hbase_version=$("${component_install}/bin/hbase" version 2>&1 | grep ^HBase | head -n 1)
hbase_version="${hbase_version#HBase }" hbase_version="${hbase_version#HBase }"
if [ ! -s "${hbase_client}/lib/shaded-clients/hbase-shaded-mapreduce-${hbase_version}.jar" ]; then if [ ! -s "${hbase_client}/lib/shaded-clients/hbase-shaded-mapreduce-${hbase_version}.jar" ]; then