From a9261467ad3f5fe36fbf6ff3b082e827a2aeddc8 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:10:13 +0300 Subject: [PATCH 01/19] feat: graceful(er) server shutdown --- rust/operator-binary/src/hbase_controller.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rust/operator-binary/src/hbase_controller.rs b/rust/operator-binary/src/hbase_controller.rs index a4fe62d7..2ad1cabc 100644 --- a/rust/operator-binary/src/hbase_controller.rs +++ b/rust/operator-binary/src/hbase_controller.rs @@ -57,7 +57,6 @@ use stackable_operator::{ statefulset::StatefulSetConditionBuilder, }, time::Duration, - utils::COMMON_BASH_TRAP_FUNCTIONS, }; use strum::{EnumDiscriminants, IntoStaticStr, ParseError}; @@ -843,11 +842,8 @@ fn build_rolegroup_statefulset( {kerberos_container_start_commands} - {COMMON_BASH_TRAP_FUNCTIONS} {remove_vector_shutdown_file_command} - prepare_signal_handlers - bin/hbase {hbase_role_name_in_command} start & - wait_for_termination $! + bin/hbase-daemon.sh foreground_start {hbase_role_name_in_command} {create_vector_shutdown_file_command} ", hbase_role_name_in_command = hbase_role.cli_role_name(), From bee1096e5bd71900fa1ae20e6cfbacd951441d8d Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:57:25 +0000 Subject: [PATCH 02/19] wip --- Cargo.nix | 156 ++++++++++--------- crate-hashes.json | 4 +- rust/operator-binary/src/hbase_controller.rs | 5 + tests/release.yaml | 4 +- tests/test-definition.yaml | 6 +- 5 files changed, 93 insertions(+), 82 deletions(-) diff --git a/Cargo.nix b/Cargo.nix index cc6563c9..b1c47e78 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -446,7 +446,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" "visit-mut" ]; } ]; @@ -473,7 +473,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; usesDefaultFeatures = false; features = [ "full" "visit-mut" "parsing" "printing" "proc-macro" ]; } @@ -884,10 +884,10 @@ rec { }; "clap" = rec { crateName = "clap"; - version = "4.5.16"; + version = "4.5.17"; edition = "2021"; crateBin = []; - sha256 = "068hjwbrndn4iz4fsc6d52q4ymg1kfsymjnqbxzdil23zbzijrzd"; + sha256 = "1b7nx9wsv5kc4n02ql4ca6p7pjh1n94rjk1n7hdjywsy96w22niy"; dependencies = [ { name = "clap_builder"; @@ -925,9 +925,9 @@ rec { }; "clap_builder" = rec { crateName = "clap_builder"; - version = "4.5.15"; + version = "4.5.17"; edition = "2021"; - sha256 = "1dmas5z20yqmlmfhykr38pn1hkcnr4jzxjw4cs2f6lkn2wmyqsi1"; + sha256 = "0wqsnajayxqpmqflqiqgpix2m8jrjwj6nayssvcpl13smw9dvwlc"; dependencies = [ { name = "anstream"; @@ -983,7 +983,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" ]; } ]; @@ -1034,9 +1034,9 @@ rec { }; "const_format" = rec { crateName = "const_format"; - version = "0.2.32"; + version = "0.2.33"; edition = "2021"; - sha256 = "0wvns8mzqwkyciwr00p2g5g4ak7zz8m473di85srj11xmz3i98p3"; + sha256 = "0jx6ffj65prbx1w9664ddwm73k7hm5g25afyvjq4y4gi3zc5bijh"; authors = [ "rodrimati1992 " ]; @@ -1066,9 +1066,9 @@ rec { }; "const_format_proc_macros" = rec { crateName = "const_format_proc_macros"; - version = "0.2.32"; + version = "0.2.33"; edition = "2021"; - sha256 = "0015dzbjbd773nn6096dwqv11fm8m3gy4a4a56cz5x10zl4gzxn7"; + sha256 = "1c8f7xh2b2kca9hlzvjplcdkvr4iqpsk4yd236n1nyzljd5s9wgg"; procMacro = true; authors = [ "rodrimati1992 " @@ -1287,7 +1287,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" "extra-traits" ]; } ]; @@ -1317,16 +1317,16 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; } ]; }; "delegate" = rec { crateName = "delegate"; - version = "0.12.0"; + version = "0.13.0"; edition = "2018"; - sha256 = "16zpkc6v2ss5qivwx7p7vb1bjnb6s0p7kkifaqkgyl7bpv68y0af"; + sha256 = "0mh98via297c51dq7b2yb0fq7gxlgb8px2iz4w3sjgxpxc7vnq2h"; procMacro = true; authors = [ "Godfrey Chan " @@ -1343,7 +1343,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" "visit-mut" ]; } ]; @@ -1888,7 +1888,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" ]; } ]; @@ -3227,10 +3227,10 @@ rec { }; "k8s-openapi" = rec { crateName = "k8s-openapi"; - version = "0.22.0"; + version = "0.23.0"; edition = "2021"; - links = "k8s-openapi-0.22.0"; - sha256 = "0mcpy1gdxpqayc74i3x3ayh3q5bl6dzvsgmw91jq1r9sjkxill0r"; + links = "k8s-openapi-0.23.0"; + sha256 = "04qv2iqwm3mgjvyp2m6n3vf6nnpjh5a60kf9ah9k1n184d04g24w"; libName = "k8s_openapi"; authors = [ "Arnav Singh " @@ -3272,17 +3272,17 @@ rec { } ]; features = { - "earliest" = [ "v1_24" ]; - "latest" = [ "v1_30" ]; + "earliest" = [ "v1_26" ]; + "latest" = [ "v1_31" ]; "schemars" = [ "dep:schemars" ]; }; - resolvedDefaultFeatures = [ "schemars" "v1_30" ]; + resolvedDefaultFeatures = [ "schemars" "v1_31" ]; }; "kube" = rec { crateName = "kube"; - version = "0.93.1"; + version = "0.95.0"; edition = "2021"; - sha256 = "05k4wwb1f1hs0izn4hnyaw0l1wljqh0sh74wc4ijs6mgfl094r83"; + sha256 = "1y04cqn7ami9rs6csjsf63c4clm5zyvyx3bzbmyaf828hly0c8gs"; authors = [ "clux " "Natalie Klestrup Röijezon " @@ -3325,34 +3325,35 @@ rec { ]; features = { "admission" = [ "kube-core/admission" ]; + "aws-lc-rs" = [ "kube-client?/aws-lc-rs" ]; "client" = [ "kube-client/client" "config" ]; "config" = [ "kube-client/config" ]; "default" = [ "client" "rustls-tls" ]; "derive" = [ "kube-derive" "kube-core/schema" ]; - "gzip" = [ "kube-client/gzip" ]; - "http-proxy" = [ "kube-client/http-proxy" ]; + "gzip" = [ "kube-client/gzip" "client" ]; + "http-proxy" = [ "kube-client/http-proxy" "client" ]; "jsonpatch" = [ "kube-core/jsonpatch" ]; "kube-client" = [ "dep:kube-client" ]; "kube-derive" = [ "dep:kube-derive" ]; "kube-runtime" = [ "dep:kube-runtime" ]; "kubelet-debug" = [ "kube-client/kubelet-debug" "kube-core/kubelet-debug" ]; - "oauth" = [ "kube-client/oauth" ]; - "oidc" = [ "kube-client/oidc" ]; - "openssl-tls" = [ "kube-client/openssl-tls" ]; + "oauth" = [ "kube-client/oauth" "client" ]; + "oidc" = [ "kube-client/oidc" "client" ]; + "openssl-tls" = [ "kube-client/openssl-tls" "client" ]; "runtime" = [ "kube-runtime" ]; - "rustls-tls" = [ "kube-client/rustls-tls" ]; - "socks5" = [ "kube-client/socks5" ]; - "unstable-client" = [ "kube-client/unstable-client" ]; - "unstable-runtime" = [ "kube-runtime/unstable-runtime" ]; + "rustls-tls" = [ "kube-client/rustls-tls" "client" ]; + "socks5" = [ "kube-client/socks5" "client" ]; + "unstable-client" = [ "kube-client/unstable-client" "client" ]; + "unstable-runtime" = [ "kube-runtime/unstable-runtime" "runtime" ]; "ws" = [ "kube-client/ws" "kube-core/ws" ]; }; resolvedDefaultFeatures = [ "client" "config" "derive" "jsonpatch" "kube-client" "kube-derive" "kube-runtime" "runtime" "rustls-tls" ]; }; "kube-client" = rec { crateName = "kube-client"; - version = "0.93.1"; + version = "0.95.0"; edition = "2021"; - sha256 = "00w69ym31mzdi7kmxq1cjjnjps92cvb7mad5jw6a842v7bmkc4yq"; + sha256 = "1dwvvd37psgzcaqv87lppx2yrmdb8wggx9ki1s8132lxbigkbhii"; libName = "kube_client"; authors = [ "clux " @@ -3543,6 +3544,7 @@ rec { features = { "__non_core" = [ "tracing" "serde_yaml" "base64" ]; "admission" = [ "kube-core/admission" ]; + "aws-lc-rs" = [ "rustls?/aws-lc-rs" ]; "base64" = [ "dep:base64" ]; "bytes" = [ "dep:bytes" ]; "chrono" = [ "dep:chrono" ]; @@ -3591,9 +3593,9 @@ rec { }; "kube-core" = rec { crateName = "kube-core"; - version = "0.93.1"; + version = "0.95.0"; edition = "2021"; - sha256 = "1rhg99v7w5qrj3ikh6n0pbbhp1kj6q7spvydcf846zbq9nkp7qyc"; + sha256 = "0rp6n4k4b1ai6ghxqci72wy67kxrgn6x9rs70ajl9dcx3kchn0zk"; libName = "kube_core"; authors = [ "clux " @@ -3635,6 +3637,10 @@ rec { packageId = "serde"; features = [ "derive" ]; } + { + name = "serde-value"; + packageId = "serde-value"; + } { name = "serde_json"; packageId = "serde_json"; @@ -3664,9 +3670,9 @@ rec { }; "kube-derive" = rec { crateName = "kube-derive"; - version = "0.93.1"; + version = "0.95.0"; edition = "2021"; - sha256 = "1wkqxfjxx4lc8gapd44kylprwgxhk29cwpdy55ri47kr8jc6r8h4"; + sha256 = "09qcgysprgrdhl838y28xfvvyrak0x367s5879vhmmyxisbvx67s"; procMacro = true; libName = "kube_derive"; authors = [ @@ -3693,7 +3699,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "extra-traits" ]; } ]; @@ -3701,9 +3707,9 @@ rec { }; "kube-runtime" = rec { crateName = "kube-runtime"; - version = "0.93.1"; + version = "0.95.0"; edition = "2021"; - sha256 = "197zjakpach42n6s62qdh0g6qrs8cawzyhqb474qaq7d1wy7711v"; + sha256 = "053r458alv2gk2q7vb8nbycw4d1bclsvja7i10j95b21ls5cp5aq"; libName = "kube_runtime"; authors = [ "clux " @@ -4788,7 +4794,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; } ]; features = { @@ -4861,7 +4867,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" "visit-mut" ]; } ]; @@ -5498,7 +5504,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" "parsing" "extra-traits" "visit" "visit-mut" ]; } { @@ -5863,7 +5869,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "extra-traits" ]; } ]; @@ -6003,9 +6009,9 @@ rec { }; "serde" = rec { crateName = "serde"; - version = "1.0.208"; + version = "1.0.210"; edition = "2018"; - sha256 = "1cng2zkvv6hh137jrrqdmhi2hllfnqwlqjgviqjalkv8rg98bw6g"; + sha256 = "0flc0z8wgax1k4j5bf2zyq48bgzyv425jkd5w0i6wbh7f8j5kqy8"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -6058,9 +6064,9 @@ rec { }; "serde_derive" = rec { crateName = "serde_derive"; - version = "1.0.208"; + version = "1.0.210"; edition = "2015"; - sha256 = "1krblvy84j6d9zj12ms9l2wfbwf2w8jazkx0bf7fs4vnzy0qw014"; + sha256 = "07yzy4wafk79ps0hmbqmsqh5xjna4pm4q57wc847bb8gl3nh4f94"; procMacro = true; authors = [ "Erick Tryzelaar " @@ -6081,7 +6087,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; usesDefaultFeatures = false; features = [ "clone-impls" "derive" "parsing" "printing" "proc-macro" ]; } @@ -6113,7 +6119,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; usesDefaultFeatures = false; features = [ "clone-impls" "derive" "parsing" "printing" ]; } @@ -6122,9 +6128,9 @@ rec { }; "serde_json" = rec { crateName = "serde_json"; - version = "1.0.125"; + version = "1.0.128"; edition = "2021"; - sha256 = "1v9idlv5nq5f000qsv6v02h2zbsfk2m6d05af2zgbk3kl0sygj43"; + sha256 = "1n43nia50ybpcfmh3gcw4lcc627qsg9nyakzwgkk9pm10xklbxbg"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -6484,7 +6490,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" ]; } ]; @@ -6694,13 +6700,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.74.0"; + version = "0.76.0"; edition = "2021"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "c77a5423b66bc1667b63af7d8bec00de88a5303f"; - sha256 = "1g1a0v98wlcb36ibwv1nv75g3b3s1mjmaps443fc2w2maam94lya"; + rev = "a7e70f174fb043a1766e0a80de95834cb4f7513d"; + sha256 = "1cyyyn6lizd0wdq79fc9fjnksnzx073ipydxmh7llciq5si5dnq6"; }; libName = "stackable_operator"; authors = [ @@ -6749,7 +6755,7 @@ rec { name = "k8s-openapi"; packageId = "k8s-openapi"; usesDefaultFeatures = false; - features = [ "schemars" "v1_30" ]; + features = [ "schemars" "v1_31" ]; } { name = "kube"; @@ -6849,8 +6855,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "c77a5423b66bc1667b63af7d8bec00de88a5303f"; - sha256 = "1g1a0v98wlcb36ibwv1nv75g3b3s1mjmaps443fc2w2maam94lya"; + rev = "a7e70f174fb043a1766e0a80de95834cb4f7513d"; + sha256 = "1cyyyn6lizd0wdq79fc9fjnksnzx073ipydxmh7llciq5si5dnq6"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -6872,7 +6878,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; } ]; @@ -6945,7 +6951,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "parsing" "extra-traits" ]; } ]; @@ -6998,11 +7004,11 @@ rec { }; resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "extra-traits" "full" "parsing" "printing" "proc-macro" "quote" "visit" ]; }; - "syn 2.0.75" = rec { + "syn 2.0.77" = rec { crateName = "syn"; - version = "2.0.75"; + version = "2.0.77"; edition = "2021"; - sha256 = "1nf72xc8pabwny8d0d4kjk5vmadg3fa240dywznka6gw6hq0dbzn"; + sha256 = "1vbkwfp9ymmi0fsyyjsqfvnv7gm8vjgl4pzprbk7p3pxc7gvqdcz"; authors = [ "David Tolnay " ]; @@ -7068,7 +7074,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; } ]; @@ -7307,9 +7313,9 @@ rec { }; "tokio" = rec { crateName = "tokio"; - version = "1.39.3"; + version = "1.40.0"; edition = "2021"; - sha256 = "1xgzhj7bxqqpjaabjkgsx8hi0f600bzj4iyp9f0a9gr3k6dwkawv"; + sha256 = "166rllhfkyqp0fs7sxn6crv74iizi4wzd3cvxkcpmlk52qip1c72"; authors = [ "Tokio Contributors " ]; @@ -7430,7 +7436,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" ]; } ]; @@ -7964,7 +7970,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; usesDefaultFeatures = false; features = [ "full" "parsing" "printing" "visit-mut" "clone-impls" "extra-traits" "proc-macro" ]; } @@ -8602,7 +8608,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "full" ]; } { @@ -8661,7 +8667,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; features = [ "visit" "full" ]; } { @@ -9258,7 +9264,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.75"; + packageId = "syn 2.0.77"; } ]; diff --git a/crate-hashes.json b/crate-hashes.json index 8725a492..4ac79c7f 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,5 +1,5 @@ { - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.74.0#stackable-operator-derive@0.3.1": "1g1a0v98wlcb36ibwv1nv75g3b3s1mjmaps443fc2w2maam94lya", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.74.0#stackable-operator@0.74.0": "1g1a0v98wlcb36ibwv1nv75g3b3s1mjmaps443fc2w2maam94lya", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.76.0#stackable-operator-derive@0.3.1": "1cyyyn6lizd0wdq79fc9fjnksnzx073ipydxmh7llciq5si5dnq6", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.76.0#stackable-operator@0.76.0": "1cyyyn6lizd0wdq79fc9fjnksnzx073ipydxmh7llciq5si5dnq6", "git+https://github.com/stackabletech/product-config.git?tag=0.7.0#product-config@0.7.0": "0gjsm80g6r75pm3824dcyiz4ysq1ka4c1if6k1mjm9cnd5ym0gny" } \ No newline at end of file diff --git a/rust/operator-binary/src/hbase_controller.rs b/rust/operator-binary/src/hbase_controller.rs index 2ad1cabc..ffeb08de 100644 --- a/rust/operator-binary/src/hbase_controller.rs +++ b/rust/operator-binary/src/hbase_controller.rs @@ -96,6 +96,10 @@ const HDFS_DISCOVERY_TMP_DIR: &str = "/stackable/tmp/hdfs"; const HBASE_CONFIG_TMP_DIR: &str = "/stackable/tmp/hbase"; const HBASE_LOG_CONFIG_TMP_DIR: &str = "/stackable/tmp/log_config"; +// Set this env var to any value for the hbase-daemon.sh script to output to stdout. +// Java logging is not affected by this. +const HBASE_NO_REDIRECT_LOG: &str = "HBASE_NO_REDIRECT_LOG"; + const DOCKER_IMAGE_BASE_NAME: &str = "hbase"; const HBASE_UID: i64 = 1000; @@ -1097,6 +1101,7 @@ fn build_hbase_env_sh( let mut result = BTreeMap::new(); result.insert(HBASE_MANAGES_ZK.to_string(), "false".to_string()); + result.insert(HBASE_NO_REDIRECT_LOG.to_string(), "true".to_string()); // We always enable `-Djava.security.krb5.conf` even if it's not used. let all_hbase_opts = [ diff --git a/tests/release.yaml b/tests/release.yaml index eb06617e..b291222b 100644 --- a/tests/release.yaml +++ b/tests/release.yaml @@ -16,7 +16,7 @@ releases: operatorVersion: 0.0.0-dev hdfs: operatorVersion: 0.0.0-dev - hbase: - operatorVersion: 0.0.0-dev + #hbase: + # operatorVersion: 0.0.0-dev opa: operatorVersion: 0.0.0-dev diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml index f6c8053d..67ce1dd8 100644 --- a/tests/test-definition.yaml +++ b/tests/test-definition.yaml @@ -2,11 +2,11 @@ dimensions: - name: hbase values: - - 2.6.0 - - 2.4.18 + #- 2.6.0 + #- 2.4.18 # To use a custom image, add a comma and the full name after the product version # - 2.6.0,docker.stackable.tech/sandbox/hbase:2.6.0-stackable0.0.0-dev - # - 2.4.18,docker.stackable.tech/sandbox/hbase:2.4.18-stackable0.0.0-dev + - 2.4.18,docker.stackable.tech/razvan/hbase:2.4.18-stackable0.0.0-dev - name: hbase-opa values: - 2.6.0 From ef860fed3c461c54ab1b19890ad511a7eaa71d7d Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 09:58:58 +0300 Subject: [PATCH 03/19] working version --- rust/operator-binary/src/hbase_controller.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rust/operator-binary/src/hbase_controller.rs b/rust/operator-binary/src/hbase_controller.rs index ffeb08de..6a4d78c7 100644 --- a/rust/operator-binary/src/hbase_controller.rs +++ b/rust/operator-binary/src/hbase_controller.rs @@ -833,7 +833,11 @@ fn build_rolegroup_statefulset( .command(vec![ "/bin/bash".to_string(), "-x".to_string(), - "-euo".to_string(), + // We don't use -u because there is a long list of environment variables that the + // hbase-daemon.sh script uses without initializing them. + // Configring all of them in the environment would make the operator unnecessarily + // complex and very sensible to all sorts of minor of changes. + "-eo".to_string(), "pipefail".to_string(), "-c".to_string(), ]) @@ -847,7 +851,10 @@ fn build_rolegroup_statefulset( {kerberos_container_start_commands} {remove_vector_shutdown_file_command} - bin/hbase-daemon.sh foreground_start {hbase_role_name_in_command} + # Evaluating the hbase-daemon.sh script in this shell with `source` is required + # for the signal handlers installed by the hbase-daemon.sh script to actually work. + # Also running the hbase process in the foreground is required for the container to stay alive. + source bin/hbase-daemon.sh foreground_start {hbase_role_name_in_command} {create_vector_shutdown_file_command} ", hbase_role_name_in_command = hbase_role.cli_role_name(), From 5ed2acd2c8b1b5dc6ccf0974bc9d54b591443824 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:25:32 +0300 Subject: [PATCH 04/19] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8989eca5..12e28030 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Reduce CRD size from `1.4MB` to `96KB` by accepting arbitrary YAML input instead of the underlying schema for the following fields ([#548]): - `podOverrides` - `affinity` +- Use the `hbase-daemon.sh` script to start and stop HBase processes ([#568]). ### Fixed @@ -21,6 +22,7 @@ [#550]: https://github.com/stackabletech/hbase-operator/pull/550 [#556]: https://github.com/stackabletech/hbase-operator/pull/556 [#558]: https://github.com/stackabletech/hbase-operator/pull/558 +[#568]: https://github.com/stackabletech/hbase-operator/pull/568 ## [24.7.0] - 2024-07-24 From 6f222988217828de32fdd1529b807b5487558b16 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:43:23 +0300 Subject: [PATCH 05/19] docs --- .../operations/graceful-shutdown.adoc | 4 --- .../operations/node-management.adoc | 26 +++++++++++++++++++ docs/modules/hbase/partials/nav.adoc | 1 + 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 docs/modules/hbase/pages/usage-guide/operations/node-management.adoc diff --git a/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc b/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc index 3ed465e8..0c8e365f 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc @@ -9,10 +9,6 @@ As a default, masters have `20 minutes` to shut down gracefully. The HBase master process will receive a `SIGTERM` signal when Kubernetes wants to terminate the Pod. After the graceful shutdown timeout runs out, and the process still didn't exit, Kubernetes will issue a `SIGKILL` signal. -This is equivalent to executing the `bin/hbase-daemon.sh stop master` command, which internally executes `kill ` (https://github.com/apache/hbase/blob/8382f55b15be6ae190f8d202a5e6a40af177ec76/bin/hbase-daemon.sh#L338[code]), waits for a configurable period of time (defaults to 20 minutes), and finally executes `kill -9 ` to `SIGKILL` the master (https://github.com/apache/hbase/blob/8382f55b15be6ae190f8d202a5e6a40af177ec76/bin/hbase-common.sh#L20-L41[code]). - -However, there is no message in the log acknowledging the graceful shutdown. - == RegionServers As a default, RegionServers have `60 minutes` to shut down gracefully. diff --git a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc new file mode 100644 index 00000000..4ba40111 --- /dev/null +++ b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc @@ -0,0 +1,26 @@ += Node management +:description: Use tools provided by the HBase to decomission nodes and move regions within the cluster. +:node-management-docs: https://hbase.apache.org/book.html#node.management + +For detailed instructions on how to manage HBase nodes see the Apache {node-management-docs}[documentation]. + +Here we'll describe some common usecases and how to handle them. + +== Decomissioning a Kubernetes node + +The steps required to decomission a Kubernetes node depend on the services running on that node. +Here we'll discuss some aspects from the HBase perspective. +In a real-world scenario, additional steps are required to ensure a a node is successfully removed from the cluster. +From HBase's perspective, it is important to consider the services running on that node. +A node where region servers are running usually require a transfer of those regions to other servers and nodes first as shown in the example below. +The commands below are executed on the respective region server container. + +[source,bash] +---- +$ /stackable/hbase shell 'decomission_regionservers ' #<1> +$ /stackable/hbase/bin/graceful_stop.sh --nobalancer localhost #<2> +---- +<1> Inform the HBase master that the region servers on the node are going to be decomissioned. This prevents those servers to receive additional regions during the decomissioning process. The `hostname` must contain the fully qualified name of the region server as known by HBase it's self. +<2> Move regions to other servers and nodes. Depending on the amount of data, this process can take between a couple of seconds and several hours. You must use `localhost` and not the fully qualified name of the region server because that requires ssh tools which are not installed. + +Now the region server is guaranteed to not manage any regions and can be safely stopped and removed from the cluster. diff --git a/docs/modules/hbase/partials/nav.adoc b/docs/modules/hbase/partials/nav.adoc index 49d15aeb..719fd036 100644 --- a/docs/modules/hbase/partials/nav.adoc +++ b/docs/modules/hbase/partials/nav.adoc @@ -18,6 +18,7 @@ *** xref:hbase:usage-guide/operations/pod-placement.adoc[] *** xref:hbase:usage-guide/operations/pod-disruptions.adoc[] *** xref:hbase:usage-guide/operations/graceful-shutdown.adoc[] +*** xref:hbase:usage-guide/operations/node-management.adoc[] * xref:hbase:reference/index.adoc[] ** xref:hbase:reference/crds.adoc[] *** {crd-docs}/hbase.stackable.tech/hbasecluster/v1alpha1/[HbaseCluster {external-link-icon}^] From 345144150401929793c6a1f5bbb0ed3c0a3dcfeb Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:49:07 +0300 Subject: [PATCH 06/19] update test context --- tests/release.yaml | 4 ++-- tests/test-definition.yaml | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/release.yaml b/tests/release.yaml index b291222b..eb06617e 100644 --- a/tests/release.yaml +++ b/tests/release.yaml @@ -16,7 +16,7 @@ releases: operatorVersion: 0.0.0-dev hdfs: operatorVersion: 0.0.0-dev - #hbase: - # operatorVersion: 0.0.0-dev + hbase: + operatorVersion: 0.0.0-dev opa: operatorVersion: 0.0.0-dev diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml index 67ce1dd8..73b38eae 100644 --- a/tests/test-definition.yaml +++ b/tests/test-definition.yaml @@ -2,11 +2,10 @@ dimensions: - name: hbase values: - #- 2.6.0 - #- 2.4.18 + - 2.6.0 + - 2.4.18 # To use a custom image, add a comma and the full name after the product version # - 2.6.0,docker.stackable.tech/sandbox/hbase:2.6.0-stackable0.0.0-dev - - 2.4.18,docker.stackable.tech/razvan/hbase:2.4.18-stackable0.0.0-dev - name: hbase-opa values: - 2.6.0 From 0e822e9a14cc9a75c013d1c524c6751c9c33e4be Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:54:43 +0300 Subject: [PATCH 07/19] fix spelling --- .../pages/usage-guide/operations/node-management.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc index 4ba40111..c58e38b1 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc @@ -1,14 +1,14 @@ = Node management -:description: Use tools provided by the HBase to decomission nodes and move regions within the cluster. +:description: Use tools provided by the HBase to decommission nodes and move regions within the cluster. :node-management-docs: https://hbase.apache.org/book.html#node.management For detailed instructions on how to manage HBase nodes see the Apache {node-management-docs}[documentation]. Here we'll describe some common usecases and how to handle them. -== Decomissioning a Kubernetes node +== Decommissioning a Kubernetes node -The steps required to decomission a Kubernetes node depend on the services running on that node. +The steps required to decommission a Kubernetes node depend on the services running on that node. Here we'll discuss some aspects from the HBase perspective. In a real-world scenario, additional steps are required to ensure a a node is successfully removed from the cluster. From HBase's perspective, it is important to consider the services running on that node. @@ -17,10 +17,10 @@ The commands below are executed on the respective region server container. [source,bash] ---- -$ /stackable/hbase shell 'decomission_regionservers ' #<1> +$ /stackable/hbase shell 'decommission_regionservers ' #<1> $ /stackable/hbase/bin/graceful_stop.sh --nobalancer localhost #<2> ---- -<1> Inform the HBase master that the region servers on the node are going to be decomissioned. This prevents those servers to receive additional regions during the decomissioning process. The `hostname` must contain the fully qualified name of the region server as known by HBase it's self. +<1> Inform the HBase master that the region servers on the node are going to be decommissioned. This prevents those servers to receive additional regions during the decommissioning process. The `hostname` must contain the fully qualified name of the region server as known by HBase it's self. <2> Move regions to other servers and nodes. Depending on the amount of data, this process can take between a couple of seconds and several hours. You must use `localhost` and not the fully qualified name of the region server because that requires ssh tools which are not installed. Now the region server is guaranteed to not manage any regions and can be safely stopped and removed from the cluster. From f61f44273601bf8c3de0ef25e576fc06113bc231 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 12:00:44 +0300 Subject: [PATCH 08/19] fix typo --- .../hbase/pages/usage-guide/operations/node-management.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc index c58e38b1..dca76d01 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc @@ -10,7 +10,7 @@ Here we'll describe some common usecases and how to handle them. The steps required to decommission a Kubernetes node depend on the services running on that node. Here we'll discuss some aspects from the HBase perspective. -In a real-world scenario, additional steps are required to ensure a a node is successfully removed from the cluster. +In a real-world scenario, additional steps are required to ensure a node is successfully removed from the cluster. From HBase's perspective, it is important to consider the services running on that node. A node where region servers are running usually require a transfer of those regions to other servers and nodes first as shown in the example below. The commands below are executed on the respective region server container. From c231e4514d6ee58b8b6570cd18f812cf265356b0 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 12:02:08 +0300 Subject: [PATCH 09/19] fix: more typos --- rust/operator-binary/src/hbase_controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/operator-binary/src/hbase_controller.rs b/rust/operator-binary/src/hbase_controller.rs index 6a4d78c7..7203be2c 100644 --- a/rust/operator-binary/src/hbase_controller.rs +++ b/rust/operator-binary/src/hbase_controller.rs @@ -835,7 +835,7 @@ fn build_rolegroup_statefulset( "-x".to_string(), // We don't use -u because there is a long list of environment variables that the // hbase-daemon.sh script uses without initializing them. - // Configring all of them in the environment would make the operator unnecessarily + // Configuring all of them in the environment would make the operator unnecessarily // complex and very sensible to all sorts of minor of changes. "-eo".to_string(), "pipefail".to_string(), From 9d42ded82a0f692d7ab1d7c3316b7dd8c507c68b Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 12:45:32 +0300 Subject: [PATCH 10/19] fix hbase shell command --- .../hbase/pages/usage-guide/operations/node-management.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc index dca76d01..73a92bae 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc @@ -17,7 +17,7 @@ The commands below are executed on the respective region server container. [source,bash] ---- -$ /stackable/hbase shell 'decommission_regionservers ' #<1> +$ echo "decommission_regionservers ''" | /stackable/hbase shell #<1> $ /stackable/hbase/bin/graceful_stop.sh --nobalancer localhost #<2> ---- <1> Inform the HBase master that the region servers on the node are going to be decommissioned. This prevents those servers to receive additional regions during the decommissioning process. The `hostname` must contain the fully qualified name of the region server as known by HBase it's self. From 9ca7234300a35b089a5a5ed185fc2eb581c73e98 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:05:16 +0300 Subject: [PATCH 11/19] update docs --- .../usage-guide/operations/node-management.adoc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc index 73a92bae..f51571d6 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc @@ -13,6 +13,16 @@ Here we'll discuss some aspects from the HBase perspective. In a real-world scenario, additional steps are required to ensure a node is successfully removed from the cluster. From HBase's perspective, it is important to consider the services running on that node. A node where region servers are running usually require a transfer of those regions to other servers and nodes first as shown in the example below. + +First, turn off the region balancer during the decommissioning process to prevent regions from being moved back to the decommissioned node. +The `graceful_stop.sh` script can also do this but it will never be able to turn the balancer back on because the container will be terminated as soon as the regions are moved. + +[source,bash] +---- +$ echo "balance_switch false" | /stackable/hbase shell +---- + +Then, decommision the server and move the regions to other servers. The commands below are executed on the respective region server container. [source,bash] @@ -23,4 +33,11 @@ $ /stackable/hbase/bin/graceful_stop.sh --nobalancer localhost #<2> <1> Inform the HBase master that the region servers on the node are going to be decommissioned. This prevents those servers to receive additional regions during the decommissioning process. The `hostname` must contain the fully qualified name of the region server as known by HBase it's self. <2> Move regions to other servers and nodes. Depending on the amount of data, this process can take between a couple of seconds and several hours. You must use `localhost` and not the fully qualified name of the region server because that requires ssh tools which are not installed. +Finally, turn the region balancer back on. + +[source,bash] +---- +$ echo "balance_switch true" | /stackable/hbase shell +---- + Now the region server is guaranteed to not manage any regions and can be safely stopped and removed from the cluster. From 7b11990bc1901cd2ec0fc9959d45cee8b2497ee4 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:33:09 +0300 Subject: [PATCH 12/19] document draining multiple servers at once --- .../operations/node-management.adoc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc index f51571d6..86be3b1a 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc @@ -16,10 +16,15 @@ A node where region servers are running usually require a transfer of those regi First, turn off the region balancer during the decommissioning process to prevent regions from being moved back to the decommissioned node. The `graceful_stop.sh` script can also do this but it will never be able to turn the balancer back on because the container will be terminated as soon as the regions are moved. +Inform the HBase master that the region servers on the node are going to be decommissioned. +This prevents those servers to receive additional regions during the decommissioning process (puts them in "draining" mode). +The `hostname` must contain the fully qualified name of the region server as known by HBase it's self. +If you plan to decommission multiple nodes, it is recommended to decommission all nodes at once to avoid moving regions unnecessarily back and forth between servers. [source,bash] ---- $ echo "balance_switch false" | /stackable/hbase shell +$ echo "decommission_regionservers ''" | /stackable/hbase shell ---- Then, decommision the server and move the regions to other servers. @@ -27,17 +32,17 @@ The commands below are executed on the respective region server container. [source,bash] ---- -$ echo "decommission_regionservers ''" | /stackable/hbase shell #<1> -$ /stackable/hbase/bin/graceful_stop.sh --nobalancer localhost #<2> +$ /stackable/hbase/bin/graceful_stop.sh --nobalancer localhost ---- -<1> Inform the HBase master that the region servers on the node are going to be decommissioned. This prevents those servers to receive additional regions during the decommissioning process. The `hostname` must contain the fully qualified name of the region server as known by HBase it's self. -<2> Move regions to other servers and nodes. Depending on the amount of data, this process can take between a couple of seconds and several hours. You must use `localhost` and not the fully qualified name of the region server because that requires ssh tools which are not installed. -Finally, turn the region balancer back on. +Depending on the amount of data, this process can take between a couple of seconds and several hours. +You must use `localhost` and not the fully qualified name of the region server because that requires ssh tools which are not installed. + +Now the region server is guaranteed to not manage any regions and can be safely stopped and removed from the cluster. + +Finally, after removing the nodes from the cluster, turn the region balancer back on. [source,bash] ---- $ echo "balance_switch true" | /stackable/hbase shell ---- - -Now the region server is guaranteed to not manage any regions and can be safely stopped and removed from the cluster. From 2d2d564f8ada02b52b9e6cdd12362f08f3f7e0bb Mon Sep 17 00:00:00 2001 From: Felix Hennig Date: Fri, 27 Sep 2024 12:53:18 +0200 Subject: [PATCH 13/19] docs: pod overrides, better install instructions, improved wording (#569) * ~ * Update docs/modules/hbase/pages/getting_started/installation.adoc * Update docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc * Update docs/modules/hbase/pages/usage-guide/operations/pod-placement.adoc * Update docs/modules/hbase/pages/usage-guide/security.adoc * fix: spelling --------- Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> --- .../pages/getting_started/first_steps.adoc | 18 +++++----- .../hbase/pages/getting_started/index.adoc | 2 +- .../pages/getting_started/installation.adoc | 34 ++++++++++--------- docs/modules/hbase/pages/index.adoc | 4 +-- .../reference/commandline-parameters.adoc | 2 +- .../reference/environment-variables.adoc | 2 +- .../operations/graceful-shutdown.adoc | 4 +-- .../usage-guide/operations/pod-placement.adoc | 4 +-- .../hbase/pages/usage-guide/overrides.adoc | 12 +++---- .../hbase/pages/usage-guide/phoenix.adoc | 2 +- .../hbase/pages/usage-guide/security.adoc | 6 ++-- 11 files changed, 46 insertions(+), 44 deletions(-) diff --git a/docs/modules/hbase/pages/getting_started/first_steps.adoc b/docs/modules/hbase/pages/getting_started/first_steps.adoc index b2e153f6..15c237dd 100644 --- a/docs/modules/hbase/pages/getting_started/first_steps.adoc +++ b/docs/modules/hbase/pages/getting_started/first_steps.adoc @@ -2,8 +2,8 @@ :description: Deploy and verify an HBase cluster using ZooKeeper, HDFS, and HBase configurations. Test with REST API and Apache Phoenix for table creation and data querying. :phoenix: https://phoenix.apache.org/index.html -Once you have followed the steps in the xref:getting_started/installation.adoc[] section to install the operator and its dependencies, you will now deploy an HBase cluster and its dependencies. -Afterwards you can <<_verify_that_it_works, verify that it works>> by creating tables and data in HBase using the REST API and Apache Phoenix (an SQL layer used to interact with HBase). +Once you have followed the steps in the xref:getting_started/installation.adoc[] section to install the operator and its dependencies, you deploy an HBase cluster and its dependencies. +Afterward you can <<_verify_that_it_works, verify that it works>> by creating tables and data in HBase using the REST API and Apache Phoenix (an SQL layer used to interact with HBase). == Setup @@ -14,7 +14,7 @@ To deploy a ZooKeeper cluster create one file called `zk.yaml`: [source,yaml] include::example$getting_started/zk.yaml[] -We also need to define a ZNode that will be used by the HDFS and HBase clusters to reference ZooKeeper. +We also need to define a ZNode that is used by the HDFS and HBase clusters to reference ZooKeeper. Create another file called `znode.yaml` and define a separate ZNode for each service: [source,yaml] @@ -73,8 +73,8 @@ include::example$getting_started/hbase.yaml[] == Verify that it works -To test the cluster you will use the REST API to check its version and status, and to create and inspect a new table. -You will also use Phoenix to create, populate and query a second new table, before listing all non-system tables in HBase. +To test the cluster, use the REST API to check its version and status, and to create and inspect a new table. +Use Phoenix to create, populate and query a second new table, before listing all non-system tables in HBase. These actions wil be carried out from one of the HBase components, the REST server. First, check the cluster version with this callout: @@ -82,7 +82,7 @@ First, check the cluster version with this callout: [source] include::example$getting_started/getting_started.sh[tag=cluster-version] -This will return the version that was specified in the HBase cluster definition: +This returns the version that was specified in the HBase cluster definition: [source,json] {"Version":"2.4.18"} @@ -92,7 +92,7 @@ The cluster status can be checked and formatted like this: [source] include::example$getting_started/getting_started.sh[tag=cluster-status] -which will display cluster metadata that looks like this (only the first region is included for the sake of readability): +which displays cluster metadata that looks like this (only the first region is included for the sake of readability): [source,json] { @@ -134,7 +134,7 @@ You can now create a table like this: [source] include::example$getting_started/getting_started.sh[tag=create-table] -This will create a table `users` with a single column family `cf`. +This creates a table `users` with a single column family `cf`. Its creation can be verified by listing it: [source] @@ -155,7 +155,7 @@ Use the Python utility `psql.py` (found in /stackable/phoenix/bin) to create, po [source] include::example$getting_started/getting_started.sh[tag=phoenix-table] -The final command will display some grouped data like this: +The final command displays some grouped data like this: [source] HO TOTAL_ACTIVE_VISITORS diff --git a/docs/modules/hbase/pages/getting_started/index.adoc b/docs/modules/hbase/pages/getting_started/index.adoc index 6cbdc32e..bab5bc4b 100644 --- a/docs/modules/hbase/pages/getting_started/index.adoc +++ b/docs/modules/hbase/pages/getting_started/index.adoc @@ -1,6 +1,6 @@ = Getting started -This guide will get you started with HBase using the Stackable operator. +This guide gets you started with HBase using the Stackable operator. It guides you through the installation of the operator and its dependencies, setting up your first HBase cluster and verifying its operation. == Prerequisites diff --git a/docs/modules/hbase/pages/getting_started/installation.adoc b/docs/modules/hbase/pages/getting_started/installation.adoc index fca0cffa..68eafc41 100644 --- a/docs/modules/hbase/pages/getting_started/installation.adoc +++ b/docs/modules/hbase/pages/getting_started/installation.adoc @@ -2,17 +2,17 @@ :description: Install Stackable HBase and required operators using stackablectl or Helm on Kubernetes. Follow setup and verification steps for a complete installation. :kind: https://kind.sigs.k8s.io/ -On this page you will install the Stackable HBase operator and its dependencies, the ZooKeeper and HDFS operators, as well as the commons, secret and listener operators which are required by all Stackable operators. +Install the Stackable HBase operator and its dependencies, the ZooKeeper and HDFS operators, as well as the commons, secret and listener operators which are required by all Stackable operators. -== Stackable Operators - -There are 2 ways to run Stackable operators - -. Using xref:management:stackablectl:index.adoc[] -. Using Helm - -=== stackablectl +There are multiple ways to install the Stackable Operator for Apache Zookeeper. +xref:management:stackablectl:index.adoc[] is the preferred way, but Helm is also supported. +OpenShift users may prefer installing the operator from the RedHat Certified Operator catalog using the OpenShift web console. +[tabs] +==== +stackablectl:: ++ +-- `stackablectl` is the command line tool to interact with Stackable operators and our recommended way to install operators. Follow the xref:management:stackablectl:installation.adoc[installation steps] for your platform. @@ -23,7 +23,7 @@ After you have installed stackablectl run the following command to install all o include::example$getting_started/getting_started.sh[tag=stackablectl-install-operators] ---- -The tool will show +The tool shows [source] include::example$getting_started/install_output.txt[] @@ -31,24 +31,26 @@ include::example$getting_started/install_output.txt[] TIP: Consult the xref:management:stackablectl:quickstart.adoc[] to learn more about how to use `stackablectl`. For example, you can use the `--cluster kind` flag to create a Kubernetes cluster with {kind}[kind]. +-- -=== Helm - -You can also use Helm to install the operators. +Helm:: ++ +-- Add the Stackable Helm repository: [source,bash] ---- include::example$getting_started/getting_started.sh[tag=helm-add-repo] ---- -Then install the Stackable Operators: +Install the Stackable operators: [source,bash] ---- include::example$getting_started/getting_started.sh[tag=helm-install-operators] ---- -Helm will deploy the operators in a Kubernetes Deployment and apply the CRDs for the HBase cluster (as well as the CRDs for the required operators). -You are now ready to deploy HBase in Kubernetes. +Helm deploys the operators in a Kubernetes Deployment and apply the CRDs for the HBase cluster (as well as the CRDs for the required operators). +-- +==== == What's next diff --git a/docs/modules/hbase/pages/index.adoc b/docs/modules/hbase/pages/index.adoc index 4a15ac44..23ea1ae2 100644 --- a/docs/modules/hbase/pages/index.adoc +++ b/docs/modules/hbase/pages/index.adoc @@ -18,7 +18,7 @@ Apache HBase is an open-source, distributed, non-relational database that runs o == Getting started Follow the xref:getting_started/index.adoc[] guide to learn how to xref:getting_started/installation.adoc[install] the Stackable operator for Apache HBase as well as the dependencies. -The guide will also show you how to xref:getting_started/first_steps.adoc[interact] with HBase running on Kubernetes by creating tables and some data using the REST API or Apache Phoenix. +The guide shows you how to xref:getting_started/first_steps.adoc[interact] with HBase running on Kubernetes by creating tables and some data using the REST API or Apache Phoenix. The xref:usage-guide/index.adoc[] contains more information on xref:usage-guide/phoenix.adoc[] as well as other topics such as xref:usage-guide/resource-requests.adoc[CPU and memory configuration], xref:usage-guide/monitoring.adoc[] and @@ -55,7 +55,7 @@ The xref:demos:hbase-hdfs-load-cycling-data.adoc[] demo shows how you can use HB == Supported versions The Stackable operator for Apache HBase currently supports the HBase versions listed below. -To use a specific HBase version in your HBaseCluster, you have to specify an image - this is explained in the xref:concepts:product-image-selection.adoc[] documentation. +To use a specific HBase version in your HBaseCluster, you have to specify an image -- this is explained in the xref:concepts:product-image-selection.adoc[] documentation. The operator also supports running images from a custom registry or running entirely customized images; both of these cases are explained under xref:concepts:product-image-selection.adoc[] as well. include::partial$supported-versions.adoc[] diff --git a/docs/modules/hbase/pages/reference/commandline-parameters.adoc b/docs/modules/hbase/pages/reference/commandline-parameters.adoc index 055b9cc0..8f28dd89 100644 --- a/docs/modules/hbase/pages/reference/commandline-parameters.adoc +++ b/docs/modules/hbase/pages/reference/commandline-parameters.adoc @@ -23,7 +23,7 @@ stackable-hbase-operator run --product-config /foo/bar/properties.yaml *Multiple values:* false -The operator will **only** watch for resources in the provided namespace `test`: +The operator **only** watches for resources in the provided namespace `test`: [source] ---- diff --git a/docs/modules/hbase/pages/reference/environment-variables.adoc b/docs/modules/hbase/pages/reference/environment-variables.adoc index 8efdc889..cf76fc7f 100644 --- a/docs/modules/hbase/pages/reference/environment-variables.adoc +++ b/docs/modules/hbase/pages/reference/environment-variables.adoc @@ -36,7 +36,7 @@ docker run \ *Multiple values:* false -The operator will **only** watch for resources in the provided namespace `test`: +The operator **only** watches for resources in the provided namespace `test`: [source] ---- diff --git a/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc b/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc index 0c8e365f..9e297286 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc @@ -6,8 +6,8 @@ You can configure the graceful shutdown as described in xref:concepts:operations As a default, masters have `20 minutes` to shut down gracefully. -The HBase master process will receive a `SIGTERM` signal when Kubernetes wants to terminate the Pod. -After the graceful shutdown timeout runs out, and the process still didn't exit, Kubernetes will issue a `SIGKILL` signal. +The HBase master process receives a `SIGTERM` signal when Kubernetes wants to terminate the Pod. +After the graceful shutdown timeout runs out, and the process is still running, Kubernetes issues a `SIGKILL` signal. == RegionServers diff --git a/docs/modules/hbase/pages/usage-guide/operations/pod-placement.adoc b/docs/modules/hbase/pages/usage-guide/operations/pod-placement.adoc index 4adaa1da..3401afa1 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/pod-placement.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/pod-placement.adoc @@ -106,7 +106,7 @@ In the examples above `cluster-name` is the name of the HBase custom resource th The `hdfs-cluster-name` is the name of the HDFS cluster that was configured in the `hdfsConfigMapName` property. NOTE: It is important that the `hdfsConfigMapName` property contains the name the HDFS cluster. -You could instead configure ConfigMaps of specific name or data roles, but for the purpose of pod placement, this will lead to faulty behavior. +You could instead configure ConfigMaps of specific name or data roles, but for the purpose of Pod placement, this leads to faulty behavior. == Use custom pod placement For general configuration of Pod placement, see the xref:concepts:operations/pod_placement.adoc[Pod placement concepts] page. @@ -131,4 +131,4 @@ spec: replicas: 2 ---- -WARNING: Please note that the Pods will be stuck in `Pending`, when your Kubernetes cluster does not have any node without a masters already running on it and sufficient compute resources. +WARNING: The Pods remain in the `Pending` phase until the masters are up and running and there are sufficient compute resources available. diff --git a/docs/modules/hbase/pages/usage-guide/overrides.adoc b/docs/modules/hbase/pages/usage-guide/overrides.adoc index b39fccb9..346c1100 100644 --- a/docs/modules/hbase/pages/usage-guide/overrides.adoc +++ b/docs/modules/hbase/pages/usage-guide/overrides.adoc @@ -4,15 +4,15 @@ The HBase xref:concepts:stacklet.adoc[Stacklet] definition also supports overriding configuration properties, environment variables and Pod specs, either per role or per role group, where the more specific override (role group) has precedence over the less specific one (role). -IMPORTANT: Overriding certain properties which are set by operator can interfere with the operator and can lead to problems. +IMPORTANT: Overriding operator-set properties can interfere with the operator and can lead to problems. == Configuration properties For a role or role group, at the same level of `config`, you can specify: `configOverrides` for the following files: -- `hbase-site.xml` -- `hbase-env.sh` -- `security.properties` +* `hbase-site.xml` +* `hbase-env.sh` +* `security.properties` NOTE: `hdfs-site.xml` is not listed here, the file is always taken from the referenced HDFS cluster. If you want to modify it, take a look at xref:hdfs:usage-guide/configuration-environment-overrides.adoc[HDFS configuration overrides]. @@ -33,7 +33,7 @@ restServers: replicas: 1 ---- -Just as for the `config`, it is possible to specify this at role level as well: +Just as for the `config`, you can specify this at role level as well: [source,yaml] ---- @@ -50,7 +50,7 @@ restServers: ---- All override property values must be strings. -The properties will be formatted and escaped correctly into the XML file, respectively inserted as is into the `hbase-env.sh` file. +The properties are formatted and escaped correctly into the XML file, respectively inserted as is into the `hbase-env.sh` file. For a full list of configuration options we refer to the HBase https://hbase.apache.org/book.html#config.files[configuration documentation]. diff --git a/docs/modules/hbase/pages/usage-guide/phoenix.adoc b/docs/modules/hbase/pages/usage-guide/phoenix.adoc index ba86a3f7..03205656 100644 --- a/docs/modules/hbase/pages/usage-guide/phoenix.adoc +++ b/docs/modules/hbase/pages/usage-guide/phoenix.adoc @@ -4,7 +4,7 @@ :sqlline-github: https://github.com/julianhyde/sqlline Apache Phoenix allows you to interact with HBase using a familiar SQL-syntax via a JDBC driver. -The Phoenix dependencies are bundled with the Stackable HBase image and do not need to be installed separately (client components will need to ensure that they have the correct client-side libraries available). +The Phoenix dependencies are bundled with the Stackable HBase image and do not need to be installed separately (client components need to ensure that they have the correct client-side libraries available). Information about client-side installation can be found {phoenix-installation}[here]. Apache Phoenix comes bundled with a few simple scripts to verify a correct server-side installation. diff --git a/docs/modules/hbase/pages/usage-guide/security.adoc b/docs/modules/hbase/pages/usage-guide/security.adoc index 6353ac26..a6c65e15 100644 --- a/docs/modules/hbase/pages/usage-guide/security.adoc +++ b/docs/modules/hbase/pages/usage-guide/security.adoc @@ -104,8 +104,8 @@ include::example$usage-guide/hbase-regorules.yaml[] ---- This rego rule is intended for demonstration purposes and allows every operation. -For a production setup you will probably need to have something much more granular. -We provide a more representative rego rule in our integration tests and in the aforementioned coprocessor repository. +For a production setup you probably need to have something much more granular. +A more representative rego rule can be found in our integration tests and in the aforementioned coprocessor repository. Details can be found below in the <> section. === How it works @@ -114,7 +114,7 @@ WARNING: This implementation takes an approach to HBase authorization that is fu The current rego rules ignore file ownership and permissions, and ACLs are persisted neither in ZooKeeper nor internal HBase tables. Keeping this state in HDFS/HBase clashes with the infrastructure-as-code approach (IaC). -Instead, HBase will send a request detailing who (e.g. `alice/test-hbase-permissions.default.svc.cluster.local@CLUSTER.LOCAL`) is trying to execute what type of action (e.g. `READ`, `WRITE`, `CREATE` or `ADMIN`) on what namespace or table (e.g. `developers:`, `developers/table1`) to OPA. +Instead, HBase sends a request detailing who (e.g. `alice/test-hbase-permissions.default.svc.cluster.local@CLUSTER.LOCAL`) is trying to execute what type of action (e.g. `READ`, `WRITE`, `CREATE` or `ADMIN`) on what namespace or table (e.g. `developers:`, `developers/table1`) to OPA. OPA then makes a decision whether this action is allowed or not. Instead of using the HBase shell to grant or revoke rights to users, you can create rules for OPA using the Rego language to define what a specific user is allowed or not allowed to do to. From 9cc7f623793e21699ff8feda56643d771f270a59 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:26:35 +0000 Subject: [PATCH 14/19] revert back to starting hbase directly --- rust/operator-binary/src/hbase_controller.rs | 49 ++++++++++++++++++-- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/rust/operator-binary/src/hbase_controller.rs b/rust/operator-binary/src/hbase_controller.rs index 7203be2c..a8b72a13 100644 --- a/rust/operator-binary/src/hbase_controller.rs +++ b/rust/operator-binary/src/hbase_controller.rs @@ -103,6 +103,44 @@ const HBASE_NO_REDIRECT_LOG: &str = "HBASE_NO_REDIRECT_LOG"; const DOCKER_IMAGE_BASE_NAME: &str = "hbase"; const HBASE_UID: i64 = 1000; +pub const HBASE_BASH_TRAP_FUNCTIONS: &str = r#" +prepare_signal_handlers() +{ + command="$1" + unset term_child_pid + unset term_kill_needed + trap "handle_term_signal $command" TERM +} + +handle_term_signal() +{ + command="$1" + if [ "${term_child_pid}" ]; then + if [ "regionserver" == "$command" ]; then + echo Start moving regions + bin/hbase org.apache.hadoop.hbase.util.RegionMover --regionserverhost localhost --operation unload + echo Done moving regions + fi + kill -TERM "${term_child_pid}" 2>/dev/null + else + term_kill_needed='yes' + fi +} + +wait_for_termination() +{ + set +e + term_child_pid=$1 + if [[ -v term_kill_needed ]]; then + kill -TERM "${term_child_pid}" 2>/dev/null + fi + wait ${term_child_pid} 2>/dev/null + trap - TERM + wait ${term_child_pid} 2>/dev/null + set -e +} +"#; + pub struct Ctx { pub client: stackable_operator::client::Client, pub product_config: ProductConfigManager, @@ -850,14 +888,15 @@ fn build_rolegroup_statefulset( {kerberos_container_start_commands} + {HBASE_BASH_TRAP_FUNCTIONS} + + prepare_signal_handlers {hbase_command} {remove_vector_shutdown_file_command} - # Evaluating the hbase-daemon.sh script in this shell with `source` is required - # for the signal handlers installed by the hbase-daemon.sh script to actually work. - # Also running the hbase process in the foreground is required for the container to stay alive. - source bin/hbase-daemon.sh foreground_start {hbase_role_name_in_command} + bin/hbase {hbase_command} start & + wait_for_termination $! {create_vector_shutdown_file_command} ", - hbase_role_name_in_command = hbase_role.cli_role_name(), + hbase_command = hbase_role.cli_role_name(), kerberos_container_start_commands = kerberos_container_start_commands(hbase), remove_vector_shutdown_file_command = remove_vector_shutdown_file_command(STACKABLE_LOG_DIR), From 51f84876c936fbe9a0678893c373235aeef7d430 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:43:57 +0000 Subject: [PATCH 15/19] make region moves on shutdown configurable (default off) --- rust/operator-binary/src/hbase_controller.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/rust/operator-binary/src/hbase_controller.rs b/rust/operator-binary/src/hbase_controller.rs index a8b72a13..7158e827 100644 --- a/rust/operator-binary/src/hbase_controller.rs +++ b/rust/operator-binary/src/hbase_controller.rs @@ -117,9 +117,12 @@ handle_term_signal() command="$1" if [ "${term_child_pid}" ]; then if [ "regionserver" == "$command" ]; then - echo Start moving regions - bin/hbase org.apache.hadoop.hbase.util.RegionMover --regionserverhost localhost --operation unload - echo Done moving regions + if [ "" != "$MOVE_REGIONS_ON_SHUTDOWN" ]; then + echo Start moving regions + REGION_MOVER_OPTS="--regionserverhost localhost --operation unload $REGION_MOVER_OPTS" + bin/hbase org.apache.hadoop.hbase.util.RegionMover "$REGION_MOVER_OPTS" + echo Done moving regions + fi fi kill -TERM "${term_child_pid}" 2>/dev/null else @@ -893,6 +896,9 @@ fn build_rolegroup_statefulset( prepare_signal_handlers {hbase_command} {remove_vector_shutdown_file_command} bin/hbase {hbase_command} start & + # Save the HBase process pid so other scripts provided by the HBase distribution + # (like graceful_stop.sh) can reuse it. + echo $! > /tmp/hbase--{hbase_command}.pid wait_for_termination $! {create_vector_shutdown_file_command} ", From e318019f3d8a71634cfb0eb4546c8a2f3fc76b4b Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:24:14 +0300 Subject: [PATCH 16/19] docs: update and fixes --- .../pages/usage-guide/operations/graceful-shutdown.adoc | 5 +++++ .../hbase/pages/usage-guide/operations/node-management.adoc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc b/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc index 7b85cee2..d5056540 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc @@ -37,3 +37,8 @@ In contrast to the Master servers, they will, however, acknowledge the graceful 2023-10-11 12:40:42,309 INFO [JettyShutdownThread] server.session: node0 Stopped scavenging 2023-10-11 12:40:42,316 INFO [main] RESTServer: ***** STOPPING service 'RESTServer' ***** ---- + +There are two environment variables that you can add to the regionserver roles (or groups) that allow you more control over the shotdonw process: `MOVE_REGIONS_ON_SHUTDOWN` and `REGION_MOVER_OPTS`. + +If `MOVE_REGIONS_ON_SHUTDOWN` (default is empty) is set to any value, the region server will attempt to move it's regions away to other servers before shutting down. +The `REGION_MOVER_OPTS` variable allows you to pass additional options to the region mover. For example, you can set the `--maxthreads` option to control the number of threads used to move regions. The operator will sets the `--regionserverhost localhost` and `--operation unload options`. diff --git a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc index 86be3b1a..79d21994 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/node-management.adoc @@ -15,7 +15,7 @@ From HBase's perspective, it is important to consider the services running on th A node where region servers are running usually require a transfer of those regions to other servers and nodes first as shown in the example below. First, turn off the region balancer during the decommissioning process to prevent regions from being moved back to the decommissioned node. -The `graceful_stop.sh` script can also do this but it will never be able to turn the balancer back on because the container will be terminated as soon as the regions are moved. +The `graceful_stop.sh` script can also do this, but it will never be able to turn the balancer back on because the container will be terminated as soon as the regions are moved. Inform the HBase master that the region servers on the node are going to be decommissioned. This prevents those servers to receive additional regions during the decommissioning process (puts them in "draining" mode). The `hostname` must contain the fully qualified name of the region server as known by HBase it's self. @@ -24,7 +24,7 @@ If you plan to decommission multiple nodes, it is recommended to decommission al [source,bash] ---- $ echo "balance_switch false" | /stackable/hbase shell -$ echo "decommission_regionservers ''" | /stackable/hbase shell +$ echo "decommission_regionservers " | /stackable/hbase shell ---- Then, decommision the server and move the regions to other servers. From 27f2fd0505df3f9912d3866ccb114e46c2f2a3cb Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:26:02 +0300 Subject: [PATCH 17/19] cleanup --- rust/operator-binary/src/hbase_controller.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/rust/operator-binary/src/hbase_controller.rs b/rust/operator-binary/src/hbase_controller.rs index 7158e827..91e6950b 100644 --- a/rust/operator-binary/src/hbase_controller.rs +++ b/rust/operator-binary/src/hbase_controller.rs @@ -96,10 +96,6 @@ const HDFS_DISCOVERY_TMP_DIR: &str = "/stackable/tmp/hdfs"; const HBASE_CONFIG_TMP_DIR: &str = "/stackable/tmp/hbase"; const HBASE_LOG_CONFIG_TMP_DIR: &str = "/stackable/tmp/log_config"; -// Set this env var to any value for the hbase-daemon.sh script to output to stdout. -// Java logging is not affected by this. -const HBASE_NO_REDIRECT_LOG: &str = "HBASE_NO_REDIRECT_LOG"; - const DOCKER_IMAGE_BASE_NAME: &str = "hbase"; const HBASE_UID: i64 = 1000; @@ -874,11 +870,7 @@ fn build_rolegroup_statefulset( .command(vec![ "/bin/bash".to_string(), "-x".to_string(), - // We don't use -u because there is a long list of environment variables that the - // hbase-daemon.sh script uses without initializing them. - // Configuring all of them in the environment would make the operator unnecessarily - // complex and very sensible to all sorts of minor of changes. - "-eo".to_string(), + "-euo".to_string(), "pipefail".to_string(), "-c".to_string(), ]) @@ -1153,7 +1145,6 @@ fn build_hbase_env_sh( let mut result = BTreeMap::new(); result.insert(HBASE_MANAGES_ZK.to_string(), "false".to_string()); - result.insert(HBASE_NO_REDIRECT_LOG.to_string(), "true".to_string()); // We always enable `-Djava.security.krb5.conf` even if it's not used. let all_hbase_opts = [ From 3686f0982a2bafe59100b1f5c3d590c6cddd0d68 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:31:06 +0300 Subject: [PATCH 18/19] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12e28030..6c5a5e5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - Reduce CRD size from `1.4MB` to `96KB` by accepting arbitrary YAML input instead of the underlying schema for the following fields ([#548]): - `podOverrides` - `affinity` -- Use the `hbase-daemon.sh` script to start and stop HBase processes ([#568]). +- Region servers can now optionally move regions to other servers before shutting down ([#568]). ### Fixed From 5854d163e7c7e9b663f6998b88ca58fe823dd0ad Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:32:59 +0300 Subject: [PATCH 19/19] fix(docs): typos --- .../hbase/pages/usage-guide/operations/graceful-shutdown.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc b/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc index d5056540..21884118 100644 --- a/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc +++ b/docs/modules/hbase/pages/usage-guide/operations/graceful-shutdown.adoc @@ -41,4 +41,4 @@ In contrast to the Master servers, they will, however, acknowledge the graceful There are two environment variables that you can add to the regionserver roles (or groups) that allow you more control over the shotdonw process: `MOVE_REGIONS_ON_SHUTDOWN` and `REGION_MOVER_OPTS`. If `MOVE_REGIONS_ON_SHUTDOWN` (default is empty) is set to any value, the region server will attempt to move it's regions away to other servers before shutting down. -The `REGION_MOVER_OPTS` variable allows you to pass additional options to the region mover. For example, you can set the `--maxthreads` option to control the number of threads used to move regions. The operator will sets the `--regionserverhost localhost` and `--operation unload options`. +The `REGION_MOVER_OPTS` variable allows you to pass additional options to the region mover. For example, you can set the `--maxthreads` option to control the number of threads used to move regions. The operator sets the `--regionserverhost localhost` and `--operation unload` options.