This is an automated email from the ASF dual-hosted git repository.
okumin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 965a6a4bc3a HIVE-28973: Metastore service in Docker fails to start
unless --verbose is explicitly set (#5830)
965a6a4bc3a is described below
commit 965a6a4bc3ad7170058f001c409a45f05f538382
Author: kokila-19 <[email protected]>
AuthorDate: Sun Jun 1 10:43:43 2025 +0530
HIVE-28973: Metastore service in Docker fails to start unless --verbose is
explicitly set (#5830)
When VERBOSE is not set, an empty string argument ("") is passed to the
startup
command, which causes a parsing error. This commit avoids appending the
--verbose flag when it's not explicitly set, preventing invalid arguments
from being passed during metastore startup.
---
packaging/src/docker/entrypoint.sh | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/packaging/src/docker/entrypoint.sh
b/packaging/src/docker/entrypoint.sh
index 7b1b70b37b3..10d69e67ce9 100644
--- a/packaging/src/docker/entrypoint.sh
+++ b/packaging/src/docker/entrypoint.sh
@@ -22,14 +22,18 @@ set -x
: "${DB_DRIVER:=derby}"
SKIP_SCHEMA_INIT="${IS_RESUME:-false}"
-[[ $VERBOSE = "true" ]] && VERBOSE_MODE="--verbose" || VERBOSE_MODE=""
+[[ $VERBOSE = "true" ]] && VERBOSE_MODE="--verbose"
function initialize_hive {
COMMAND="-initOrUpgradeSchema"
if [ "$(echo "$HIVE_VER" | cut -d '.' -f1)" -lt "4" ]; then
COMMAND="-${SCHEMA_COMMAND:-initSchema}"
fi
- "$HIVE_HOME/bin/schematool" -dbType "$DB_DRIVER" "$COMMAND" "$VERBOSE_MODE"
+ if [[ -n "$VERBOSE_MODE" ]]; then
+ "$HIVE_HOME/bin/schematool" -dbType "$DB_DRIVER" "$COMMAND" "$VERBOSE_MODE"
+ else
+ "$HIVE_HOME/bin/schematool" -dbType "$DB_DRIVER" "$COMMAND"
+ fi
if [ $? -eq 0 ]; then
echo "Initialized Hive Metastore Server schema successfully.."
else
@@ -57,5 +61,9 @@ if [ "${SERVICE_NAME}" == "hiveserver2" ]; then
exec "$HIVE_HOME/bin/hive" --skiphadoopversion --skiphbasecp --service
"$SERVICE_NAME"
elif [ "${SERVICE_NAME}" == "metastore" ]; then
export METASTORE_PORT=${METASTORE_PORT:-9083}
- exec "$HIVE_HOME/bin/hive" --skiphadoopversion --skiphbasecp "$VERBOSE_MODE"
--service "$SERVICE_NAME"
+ if [[ -n "$VERBOSE_MODE" ]]; then
+ exec "$HIVE_HOME/bin/hive" --skiphadoopversion --skiphbasecp
"$VERBOSE_MODE" --service "$SERVICE_NAME"
+ else
+ exec "$HIVE_HOME/bin/hive" --skiphadoopversion --skiphbasecp --service
"$SERVICE_NAME"
+ fi
fi