You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2024/01/27 14:54:00 UTC

(hbase) branch HBASE-28331-jenkins updated: use separate script

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch HBASE-28331-jenkins
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/HBASE-28331-jenkins by this push:
     new 199f0dd6df8 use separate script
199f0dd6df8 is described below

commit 199f0dd6df8cd782db598223a4568ed7599b6ad5
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Sat Jan 27 22:53:47 2024 +0800

    use separate script
---
 dev-support/Jenkinsfile      | 4 +---
 dev-support/patch-hadoop3.sh | 7 +++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 5da999450f6..d8e00a489c5 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -736,9 +736,7 @@ pipeline {
               artifact=$(ls -1 "${WORKSPACE}"/hadoop-3*.tar.gz | head -n 1)
               tar --strip-components=1 -xzf "${artifact}" -C "hadoop-3"
               # we need to patch some files otherwise minicluster will fail to start, see MAPREDUCE-7471
-              sed -i "s/HADOOP_TOOLS_DIR=\${HADOOP_TOOLS_DIR:-\"share\/hadoop\/tools\"}/HADOOP_TOOLS_DIR=\${HADOOP_TOOLS_DIR:-\"\$HADOOP_TOOLS_HOME\/share\/hadoop\/tools\"}/g" hadoop-3/libexec/hadoop-functions.sh
-              sed -i "/hadoop_add_classpath \"\${junitjar}\"/a mockitojar=\$(echo \"\${HADOOP_TOOLS_LIB_JARS_DIR}\"\/mockito-core-[0-9]*.jar)\nhadoop_add_classpath \"\${mockitojar}\"" hadoop-3/bin/mapred
-              curl https://repo1.maven.org/maven2/org/mockito/mockito-core/2.28.2/mockito-core-2.28.2.jar -o hadoop-3/share/hadoop/tools/lib/mockito-core-2.28.2.jar
+              ${BASEDIR}/dev-support/patch-hadoop3.sh hadoop-3
               if ! "${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
                   --single-process \
                   --working-dir output-integration/hadoop-3 \
diff --git a/dev-support/patch-hadoop3.sh b/dev-support/patch-hadoop3.sh
new file mode 100755
index 00000000000..de5b14b8c44
--- /dev/null
+++ b/dev-support/patch-hadoop3.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+hadoop_dir=$1
+
+sed -i "s/HADOOP_TOOLS_DIR=\${HADOOP_TOOLS_DIR:-\"share\/hadoop\/tools\"}/HADOOP_TOOLS_DIR=\${HADOOP_TOOLS_DIR:-\"\$HADOOP_TOOLS_HOME\/share\/hadoop\/tools\"}/g" $1/libexec/hadoop-functions.sh
+sed -i "/hadoop_add_classpath \"\${junitjar}\"/a mockitojar=\$(echo \"\${HADOOP_TOOLS_LIB_JARS_DIR}\"\/mockito-core-[0-9]*.jar)\nhadoop_add_classpath \"\${mockitojar}\"" $1/bin/mapred
+curl https://repo1.maven.org/maven2/org/mockito/mockito-core/2.28.2/mockito-core-2.28.2.jar -o $1/share/hadoop/tools/lib/mockito-core-2.28.2.jar