testsuite: Use SCRIPT_PATH

This commit is contained in:
Björn Busse 2021-03-08 01:46:06 +01:00
parent 7a2bde57ff
commit 28d24ed8c6
2 changed files with 14 additions and 12 deletions

View File

@ -8,25 +8,26 @@ HBASE_DIR="hbase-${HBASE_VERSION}-hadoop2"
#HBASE_URL="https://downloads.apache.org/hbase/${HBASE_VERSION}/${HBASE_FILE}" #HBASE_URL="https://downloads.apache.org/hbase/${HBASE_VERSION}/${HBASE_FILE}"
HBASE_URL="https://archive.apache.org/dist/hbase/hbase-${HBASE_VERSION}/${HBASE_FILE}" HBASE_URL="https://archive.apache.org/dist/hbase/hbase-${HBASE_VERSION}/${HBASE_FILE}"
HBASE_FILE_CKSUM="1625453f839f7d8c86078a131af9731f6df28c59e58870db84913dcbc640d430253134a825de7cec247ea1f0cf232435765e00844ee2e4faf31aeb356955c478" HBASE_FILE_CKSUM="1625453f839f7d8c86078a131af9731f6df28c59e58870db84913dcbc640d430253134a825de7cec247ea1f0cf232435765e00844ee2e4faf31aeb356955c478"
HBASE_CONFIG_FILE="hbase/conf/hbase-site.xml" HBASE_CONFIG_TEMPLATE="hbase/conf/hbase-site.xml.j2"
HBASE_TEST_SUITE_EXECUTABLE="hbase/bin/hbase" HBASE_TEST_SUITE_EXECUTABLE="hbase/bin/hbase"
declare -a DEPS=("java") declare -a DEPS=("java")
source setup.sh SCRIPT_PATH=$(dirname "$0")
source $SCRIPT_PATH/setup.sh
create_hbase_config() { create_hbase_config_template() {
read -r -d '' CONFIG <<EOF read -r -d '' CONFIG <<EOF
<?xml version="1.0"?> <?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration> <configuration>
<property> <property>
<name>hbase.rootdir</name> <name>hbase.rootdir</name>
<value>file:///${1}/hbase</value> <value>file:///{{ hbase_rootdir }}/hbase</value>
</property> </property>
<property> <property>
<name>hbase.zookeeper.property.dataDir</name> <name>hbase.zookeeper.property.dataDir</name>
<value>${1}/zookeeper</value> <value>{{ hbase_datadir }}/zookeeper</value>
</property> </property>
<property> <property>
<name>hbase.unsafe.stream.capability.enforce</name> <name>hbase.unsafe.stream.capability.enforce</name>
@ -63,6 +64,6 @@ prepare_hbase() {
} }
check_dependencies check_dependencies
prepare_hbase ${HBASE_URL} #prepare_hbase ${HBASE_URL}
HBASE_CONFIG=$(create_hbase_config "/tmp") HBASE_CONFIG=$(create_hbase_config_template)
write_file ${HBASE_CONFIG_FILE} "${HBASE_CONFIG}" write_file ${HBASE_CONFIG_TEMPLATE} "${HBASE_CONFIG}"

View File

@ -6,13 +6,14 @@ HADOOP_VERSION="2.10.1"
HADOOP_FILE="hadoop-$HADOOP_VERSION.tar.gz" HADOOP_FILE="hadoop-$HADOOP_VERSION.tar.gz"
HADOOP_URL="https://artfiles.org/apache.org/hadoop/common/hadoop-${HADOOP_VERSION}/${HADOOP_FILE}" HADOOP_URL="https://artfiles.org/apache.org/hadoop/common/hadoop-${HADOOP_VERSION}/${HADOOP_FILE}"
HADOOP_FILE_CKSUM="2460e02cd1f80dfed7a8981bbc934c095c0a341435118bec781fd835ec2ebdc5543a03d92d24f2ddeebdfe1c2c460065ba1d394ed9a73cbb2020b40a8d8b5e07" HADOOP_FILE_CKSUM="2460e02cd1f80dfed7a8981bbc934c095c0a341435118bec781fd835ec2ebdc5543a03d92d24f2ddeebdfe1c2c460065ba1d394ed9a73cbb2020b40a8d8b5e07"
HDFS_CONFIG_TEMPLATE="hadoop/etc/hadoop/hdfs-site.xml" HDFS_CONFIG_TEMPLATE="hadoop/etc/hadoop/hdfs-site.xml.j2"
HDFS_CONFIG_TEMPLATE_CORE="hadoop/etc/hadoop/core-site.xml" HDFS_CONFIG_TEMPLATE_CORE="hadoop/etc/hadoop/core-site.xml.j2"
HDFS_CONFIG_TEMPLATE_MAPRED="hadoop/etc/hadoop/mapred-site.xml" HDFS_CONFIG_TEMPLATE_MAPRED="hadoop/etc/hadoop/mapred-site.xml.j2"
HDFS_CONFIG_DATANODES="localhost" HDFS_CONFIG_DATANODES="localhost"
HDFS_TEST_SUITE_EXECUTABLE="hadoop/bin/hdfs" HDFS_TEST_SUITE_EXECUTABLE="hadoop/bin/hdfs"
source setup.sh SCRIPT_PATH=$(dirname "$0")
source $SCRIPT_PATH/setup.sh
declare -a DEPS=("java" "ansible-playbook") declare -a DEPS=("java" "ansible-playbook")