hbase-setup: Adjust config
This commit is contained in:
parent
3e5fe8e9cb
commit
f9b1926a74
@ -37,22 +37,26 @@ download() {
|
|||||||
|
|
||||||
create_config() {
|
create_config() {
|
||||||
printf "Writing config\n"
|
printf "Writing config\n"
|
||||||
cat <<EOF > $1
|
cat <<EOF > $2
|
||||||
<?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:///${1}/hbase</value>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.zookeeper.property.dataDir</name>
|
<name>hbase.zookeeper.property.dataDir</name>
|
||||||
<value>${1}/zookeeper</value>
|
<value>${1}/zookeeper</value>
|
||||||
</property>
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>hbase.unsafe.stream.capability.enforce</name>
|
||||||
|
<value>false</value>
|
||||||
|
</property>
|
||||||
</configuration>
|
</configuration>
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
check_dependencies
|
check_dependencies
|
||||||
download ${HBASE_URL}
|
download ${HBASE_URL}
|
||||||
create_config "hbase-${HBASE_VERSION}/conf/hbase-site.xml"
|
create_config "/tmp" "hbase-${HBASE_VERSION}/conf/hbase-site.xml"
|
||||||
|
@ -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"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user