Skip to content

Commit 303739e

Browse files
committed
wip: patch hbase to use listener endpoints
1 parent b5f96d5 commit 303739e

File tree

4 files changed

+463
-42
lines changed

4 files changed

+463
-42
lines changed

hbase/stackable/bin/hbase-entrypoint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ HBASE_ROLE_NAME="$1"
1616
HBASE_ROLE_SERVICE_NAME="$2"
1717
# 16010 for master, 16020 for regionservers etc.
1818
HBASE_ROLE_SERVICE_PORT="$3"
19+
# ui-http or ui-https
20+
HBASE_PORT_NAME="$4"
1921

2022
HBASE_ROLE_SERVICE_HOST="${HOSTNAME}.${HBASE_ROLE_SERVICE_NAME}"
2123

@@ -64,6 +66,7 @@ cp /stackable/tmp/hdfs/core-site.xml /stackable/conf
6466
cp /stackable/tmp/hbase/* /stackable/conf
6567
cp /stackable/tmp/log_config/log4j* /stackable/conf
6668

69+
# Kerberos
6770
if [ -f /stackable/kerberos/krb5.conf ]; then
6871
KERBEROS_REALM=$(grep -oP 'default_realm = \K.*' /stackable/kerberos/krb5.conf)
6972
export KERBEROS_REALM
@@ -72,6 +75,12 @@ if [ -f /stackable/kerberos/krb5.conf ]; then
7275
sed -i -e s/\$\{env\.KERBEROS_REALM\}/"${KERBEROS_REALM}"/g /stackable/conf/hdfs-site.xml
7376
fi
7477

78+
# Service endpoints
79+
HBASE_SERVICE_HOST=$(cat /stackable/listener/default-address/address)
80+
HBASE_SERVICE_PORT=$(cat /stackable/listener/default-address/ports/"${HBASE_PORT_NAME}")
81+
sed -i -e s/\$\{HBASE_SERVICE_HOST\}/"${HBASE_SERVICE_HOST}"/g /stackable/conf/hbase-site.xml
82+
sed -i -e s/\$\{HBASE_SERVICE_PORT\}/"${HBASE_SERVICE_PORT}"/g /stackable/conf/hbase-site.xml
83+
7584
rm -f "${STACKABLE_LOG_DIR}/_vector/shutdown"
7685
prepare_signal_handlers
7786
/stackable/containerdebug --output="${STACKABLE_LOG_DIR}/containerdebug-state.json" --loop &

0 commit comments

Comments
 (0)