Skip to content

Commit 521fc62

Browse files
committed
optionally run region mover
1 parent d9a7f47 commit 521fc62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hbase/stackable/bin/hbase-entrypoint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#
33
# Entrypoint for HBase that ensures services are shutdown gracefuly
44
#
5+
# Expects the following env vars:
6+
# - RUN_REGION_MOVER: if set to true, the region mover will be run before region server shutdown
7+
# - REGION_MOVER_OPTS: additional options for the region mover
8+
#
59
set -x
610
set -euo pipefail
711

@@ -30,7 +34,7 @@ prepare_signal_handlers() {
3034

3135
handle_term_signal() {
3236
if [ "${term_child_pid}" ]; then
33-
if [ "regionserver" == "${HBASE_ROLE_NAME}" ]; then
37+
if [ "regionserver" == "${HBASE_ROLE_NAME}" ] && [ "true" == "${RUN_REGION_MOVER}" ]; then
3438
echo "Start pre-shutdown"
3539
# REGION_MOVER_OPTS is a string that contains multiple arguments and needs to be spliced here
3640
# therefore disable shellcheck for this line

0 commit comments

Comments
 (0)