vaijosh commented on code in PR #3041:
URL: https://github.com/apache/hugegraph/pull/3041#discussion_r3340208578
##########
docker/hbase/entrypoint.sh:
##########
@@ -17,7 +17,39 @@
#
set -e
+HBASE_HOSTNAME="${HBASE_HOSTNAME:-hbase}"
+HBASE_MASTER_HOSTNAME="${HBASE_MASTER_HOSTNAME:-${HBASE_HOSTNAME}}"
+HBASE_REGIONSERVER_HOSTNAME="${HBASE_REGIONSERVER_HOSTNAME:-${HBASE_HOSTNAME}}"
+HBASE_SITE_XML="${HBASE_HOME}/conf/hbase-site.xml"
+
+escape_sed_replacement() {
+ printf '%s' "$1" | sed -e 's/[&|]/\\&/g'
+}
+
+set_xml_property_value() {
+ local property_name="$1"
+ local property_value
+ property_value=$(escape_sed_replacement "$2")
+
+ # The in-place replacement below expects the standard HBase layout where
+ # <name>...</name> is followed by <value>...</value> on the next line.
+ # Fail loudly if the property entry is missing to avoid silent misconfig.
+ if ! grep -q "<name>${property_name}</name>" "${HBASE_SITE_XML}"; then
+ echo "Missing required property '${property_name}' in
${HBASE_SITE_XML}" >&2
+ exit 1
+ fi
Review Comment:
Addressed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]