Skip to content

feat: HBase resolvable endpoints #1159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0fbe36b
patches I
adwk67 Apr 10, 2025
b5f96d5
patches I
adwk67 Apr 10, 2025
303739e
wip: patch hbase to use listener endpoints
adwk67 Apr 23, 2025
8dc1c99
changed rendering
adwk67 Apr 23, 2025
bd17a9e
rework patch for UI
adwk67 May 15, 2025
4a5df3b
Merge branch 'main' into feat/hbase-resolvable-endpoints
nightkr May 30, 2025
2a2a5ac
Consistently override the advertised ports
nightkr May 31, 2025
9ef046c
add listener endpoint and info port to hbase-site.xml
adwk67 Jun 10, 2025
99fd166
patch and entrypoint refactoring
adwk67 Jun 13, 2025
9953042
hbase: use listener service for region mover
adwk67 Jun 16, 2025
9b02ec8
Merge branch 'main' into feat/hbase-resolvable-endpoints
adwk67 Jun 16, 2025
4b6b849
hbase: patch for 2.6.2 endpoints
adwk67 Jun 16, 2025
be89d58
Merge branch 'main' into feat/hbase-resolvable-endpoints
adwk67 Jun 16, 2025
ceba85b
removed dead variable
adwk67 Jun 16, 2025
f08e1c5
Update hbase/stackable/patches/2.6.1/0005-Allow-overriding-ipc-bind-p…
adwk67 Jun 24, 2025
d98ac32
Update hbase/stackable/patches/2.6.1/0005-Allow-overriding-ipc-bind-p…
adwk67 Jun 24, 2025
bd0b75e
review comments: added constants etc.
adwk67 Jun 25, 2025
a6a7e10
merge main and fix conflicts
adwk67 Jun 25, 2025
de0c6c7
set RPC_CLIENT_SPECIFY_HOST to true by default
adwk67 Jun 25, 2025
496444d
corrected constant descriptions
adwk67 Jun 25, 2025
3fa6301
updated 2.6.2 patch
adwk67 Jun 25, 2025
ee7ea2e
patch 2.6.1 to reverse bound/advertised properties
adwk67 Jun 26, 2025
7a4340e
property re-working for 2.6.2
adwk67 Jun 27, 2025
f3d3596
Merge branch 'main' into feat/hbase-resolvable-endpoints
adwk67 Jun 27, 2025
65aaae2
provide advertised port as a fallback, removed changes to test class
adwk67 Jun 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
`check-permissions-ownership.sh` provided in stackable-base image ([#1029]).
- hbase: check for correct permissions and ownerships in /stackable folder via
`check-permissions-ownership.sh` provided in stackable-base image ([#1028]).
- hbase: provide patches to implement listener endpoints ([#1159]).
- hive: check for correct permissions and ownerships in /stackable folder via
`check-permissions-ownership.sh` provided in stackable-base image ([#1040]).
- spark-connect-client: A new image for Spark connect tests and demos ([#1034])
Expand Down Expand Up @@ -198,6 +199,7 @@ All notable changes to this project will be documented in this file.
[#1151]: https://github.com/stackabletech/docker-images/pull/1151
[#1152]: https://github.com/stackabletech/docker-images/pull/1152
[#1156]: https://github.com/stackabletech/docker-images/pull/1156
[#1159]: https://github.com/stackabletech/docker-images/pull/1159
[#1163]: https://github.com/stackabletech/docker-images/pull/1163
[#1165]: https://github.com/stackabletech/docker-images/pull/1165
[#1168]: https://github.com/stackabletech/docker-images/pull/1168
Expand Down
25 changes: 19 additions & 6 deletions hbase/hbase/stackable/bin/hbase-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ set -euo pipefail

# master, regionserver, rest
HBASE_ROLE_NAME="$1"
# k8s service name for this role+group combo
# <svc-name>.<namespace>.svc.cluster.local
HBASE_ROLE_SERVICE_NAME="$2"
# 16010 for master, 16020 for regionservers etc.
HBASE_ROLE_SERVICE_PORT="$3"
HBASE_ROLE_SERVICE_PORT="$2"
# master, regionserver, rest_http, rest_https
HBASE_PORT_NAME="$3"
# ui-http or ui-https
HBASE_UI_PORT_NAME="$4"

HBASE_ROLE_SERVICE_HOST="${HOSTNAME}.${HBASE_ROLE_SERVICE_NAME}"
# Needed for regionmover service and for hbase-site.xml (see below)
HBASE_SERVICE_HOST=$(cat /stackable/listener/default-address/address)

REGION_MOVER_OPTS="--regionserverhost ${HBASE_ROLE_SERVICE_HOST}:${HBASE_ROLE_SERVICE_PORT} --operation unload ${REGION_MOVER_OPTS}"
REGION_MOVER_OPTS="--regionserverhost ${HBASE_SERVICE_HOST}:${HBASE_ROLE_SERVICE_PORT} --operation unload ${REGION_MOVER_OPTS}"

prepare_signal_handlers() {
unset term_child_pid
Expand Down Expand Up @@ -64,6 +66,7 @@ cp /stackable/tmp/hdfs/core-site.xml /stackable/conf
cp /stackable/tmp/hbase/* /stackable/conf
cp /stackable/tmp/log_config/log4j* /stackable/conf

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

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

sed -i -e s/\$\{HBASE_SERVICE_HOST\}/"${HBASE_SERVICE_HOST}"/g /stackable/conf/hbase-site.xml
sed -i -e s/\$\{HBASE_SERVICE_PORT\}/"${HBASE_SERVICE_PORT}"/g /stackable/conf/hbase-site.xml
sed -i -e s/\$\{HBASE_LISTENER_ENDPOINT\}/"${HBASE_LISTENER_ENDPOINT}"/g /stackable/conf/hbase-site.xml
sed -i -e s/\$\{HBASE_INFO_PORT\}/"${HBASE_INFO_PORT}"/g /stackable/conf/hbase-site.xml
Comment on lines +83 to +86
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for this to not be using https://github.com/stackabletech/config-utils instead of sed? AFAIU we already pull it in via stackable-base.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not used config-utils before: not sure how to template the file without first declaring the env-vars. I'll have a look.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, forget that last comment, we already have the env-vars in the context of entrypoint.sh. I'll try it out.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will defer this to #1191


rm -f "${STACKABLE_LOG_DIR}/_vector/shutdown"
prepare_signal_handlers
/stackable/containerdebug --output="${STACKABLE_LOG_DIR}/containerdebug-state.json" --loop &
Expand Down
Loading