Skip to content

Commit 9953042

Browse files
committed
hbase: use listener service for region mover
1 parent 99fd166 commit 9953042

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

hbase/stackable/bin/hbase-entrypoint.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,17 @@ set -euo pipefail
1111

1212
# master, regionserver, rest
1313
HBASE_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"
1916
# master, regionserver, rest_http, rest_https
20-
HBASE_PORT_NAME="$4"
17+
HBASE_PORT_NAME="$3"
2118
# ui-http or ui-https
22-
HBASE_UI_PORT_NAME="$5"
19+
HBASE_UI_PORT_NAME="$4"
2320

24-
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)
2523

26-
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}"
2725

2826
prepare_signal_handlers() {
2927
unset term_child_pid
@@ -78,7 +76,6 @@ if [ -f /stackable/kerberos/krb5.conf ]; then
7876
fi
7977

8078
# Service endpoints
81-
HBASE_SERVICE_HOST=$(cat /stackable/listener/default-address/address)
8279
HBASE_SERVICE_PORT=$(cat /stackable/listener/default-address/ports/"${HBASE_PORT_NAME}")
8380
HBASE_INFO_PORT=$(cat /stackable/listener/default-address/ports/"${HBASE_UI_PORT_NAME}")
8481
HBASE_LISTENER_ENDPOINT="$HBASE_SERVICE_HOST:$HBASE_INFO_PORT"

0 commit comments

Comments
 (0)