@@ -11,15 +11,17 @@ set -euo pipefail
1111
1212#  master, regionserver, rest
1313HBASE_ROLE_NAME=" $1 " 
14- #  k8s service name for this role+group combo
15- #  <svc-name>.<namespace>.svc.cluster.local
16- HBASE_ROLE_SERVICE_NAME=" $2 " 
1714#  16010 for master, 16020 for regionservers etc.
18- HBASE_ROLE_SERVICE_PORT=" $3 " 
15+ HBASE_ROLE_SERVICE_PORT=" $2 " 
16+ #  master, regionserver, rest_http, rest_https
17+ HBASE_PORT_NAME=" $3 " 
18+ #  ui-http or ui-https
19+ HBASE_UI_PORT_NAME=" $4 " 
1920
20- HBASE_ROLE_SERVICE_HOST=" ${HOSTNAME} .${HBASE_ROLE_SERVICE_NAME} " 
21+ #  Needed for regionmover service and for hbase-site.xml (see below)
22+ HBASE_SERVICE_HOST=$( cat /stackable/listener/default-address/address) 
2123
22- REGION_MOVER_OPTS=" --regionserverhost ${HBASE_ROLE_SERVICE_HOST } :${HBASE_ROLE_SERVICE_PORT}  --operation unload ${REGION_MOVER_OPTS} " 
24+ REGION_MOVER_OPTS=" --regionserverhost ${HBASE_SERVICE_HOST } :${HBASE_ROLE_SERVICE_PORT}  --operation unload ${REGION_MOVER_OPTS} " 
2325
2426prepare_signal_handlers () {
2527  unset  term_child_pid
@@ -64,6 +66,7 @@ cp /stackable/tmp/hdfs/core-site.xml /stackable/conf
6466cp /stackable/tmp/hbase/*  /stackable/conf
6567cp /stackable/tmp/log_config/log4j*  /stackable/conf
6668
69+ #  Kerberos
6770if  [ -f  /stackable/kerberos/krb5.conf ];  then 
6871  KERBEROS_REALM=$( grep -oP ' default_realm = \K.*' ) 
6972  export  KERBEROS_REALM
@@ -72,6 +75,16 @@ if [ -f /stackable/kerberos/krb5.conf ]; then
7275  sed -i -e s/\$\{ env\. KERBEROS_REALM\} /" ${KERBEROS_REALM} " 
7376fi 
7477
78+ #  Service endpoints
79+ HBASE_SERVICE_PORT=$( cat /stackable/listener/default-address/ports/" ${HBASE_PORT_NAME} " ) 
80+ HBASE_INFO_PORT=$( cat /stackable/listener/default-address/ports/" ${HBASE_UI_PORT_NAME} " ) 
81+ HBASE_LISTENER_ENDPOINT=" $HBASE_SERVICE_HOST :$HBASE_INFO_PORT " 
82+ 
83+ sed -i -e s/\$\{ HBASE_SERVICE_HOST\} /" ${HBASE_SERVICE_HOST} " 
84+ sed -i -e s/\$\{ HBASE_SERVICE_PORT\} /" ${HBASE_SERVICE_PORT} " 
85+ sed -i -e s/\$\{ HBASE_LISTENER_ENDPOINT\} /" ${HBASE_LISTENER_ENDPOINT} " 
86+ sed -i -e s/\$\{ HBASE_INFO_PORT\} /" ${HBASE_INFO_PORT} " 
87+ 
7588rm -f " ${STACKABLE_LOG_DIR} /_vector/shutdown" 
7689prepare_signal_handlers
7790/stackable/containerdebug --output=" ${STACKABLE_LOG_DIR} /containerdebug-state.json" & 
0 commit comments