From f9b1926a74ecb21af9b5384ba2a0190297084015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Busse?= Date: Thu, 4 Mar 2021 17:45:34 +0100 Subject: [PATCH] hbase-setup: Adjust config --- hbase-setup.sh | 10 ++++++--- ...est_hbase_up.sh => test_hbase_exporter.sh} | 0 tests/test_hbase_exporter_up.sh | 22 ------------------- 3 files changed, 7 insertions(+), 25 deletions(-) rename tests/{test_hbase_up.sh => test_hbase_exporter.sh} (100%) delete mode 100644 tests/test_hbase_exporter_up.sh diff --git a/hbase-setup.sh b/hbase-setup.sh index 2f684af..82fd3f8 100755 --- a/hbase-setup.sh +++ b/hbase-setup.sh @@ -37,22 +37,26 @@ download() { create_config() { printf "Writing config\n" - cat < $1 + cat < $2 hbase.rootdir - file://${1}/hbase + file:///${1}/hbase hbase.zookeeper.property.dataDir ${1}/zookeeper + + hbase.unsafe.stream.capability.enforce + false + EOF } check_dependencies download ${HBASE_URL} -create_config "hbase-${HBASE_VERSION}/conf/hbase-site.xml" +create_config "/tmp" "hbase-${HBASE_VERSION}/conf/hbase-site.xml" diff --git a/tests/test_hbase_up.sh b/tests/test_hbase_exporter.sh similarity index 100% rename from tests/test_hbase_up.sh rename to tests/test_hbase_exporter.sh diff --git a/tests/test_hbase_exporter_up.sh b/tests/test_hbase_exporter_up.sh deleted file mode 100644 index 27a4c5f..0000000 --- a/tests/test_hbase_exporter_up.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -setup() { - cd ../ - ./hbase-exporter --zookeeper-server ${ZK_SERVER:-"127.0.0.1:2181"} 2>&1 > /dev/null & - PID=$! - sleep 5 -} - -test_hbase_exporter_up() { - nc -znu -w1 ${1:-"127.0.0.1"} ${2:-"9010"} - curl -s http://127.0.0.1:9010 -} - -test_hbase_exporter_zk_connection() { - r=$(curl -s http://127.0.0.1:9010 | grep '^zookeeper_num_live' | cut -d " " -f2) - assert_not_equals "0.0" "$r" "Zookeeper not live" -} - -teardown() { - kill "$PID" -}