rameeshm commented on code in PR #660:
URL: https://github.com/apache/ranger/pull/660#discussion_r2393515206


##########
dev-support/ranger-docker/scripts/ranger-hive.sh:
##########
@@ -50,14 +91,49 @@ fi
 cd "${HIVE_HOME}" || exit
 
 # Start Hive MetaStore
+echo "Starting Hive MetaStore..."
 su -c "nohup ${HIVE_HOME}/bin/hive --service metastore > metastore.log 2>&1 &" 
hive
 
 # Start HiveServer2
+echo "Starting HiveServer2..."
 su -c "nohup ${HIVE_HOME}/bin/hiveserver2 > hive-server2.log 2>&1 &" hive
 
+# Wait for services to initialize
+echo "Waiting for Hive services to initialize..."
 sleep 10
 
-HIVE_SERVER2_PID=`ps -ef  | grep -v grep | grep -i 
"org.apache.hive.service.server.HiveServer2" | awk '{print $2}'`
+# Verify Hive services are running and ready
+echo "Verifying Hive services are ready for beeline connections..."
+METASTORE_PID=`ps -ef | grep -v grep | grep -i 
"org.apache.hadoop.hive.metastore.HiveMetaStore" | awk '{print $2}'`
+HIVE_SERVER2_PID=`ps -ef | grep -v grep | grep -i 
"org.apache.hive.service.server.HiveServer2" | awk '{print $2}'`
+
+if [ -n "$METASTORE_PID" ]; then
+  echo "Hive MetaStore is running (PID: $METASTORE_PID)"
+else
+  echo "WARNING: Hive MetaStore process not found!"
+fi
+
+if [ -n "$HIVE_SERVER2_PID" ]; then
+  echo "HiveServer2 is running (PID: $HIVE_SERVER2_PID)"
+else
+  echo "WARNING: HiveServer2 process not found!"
+fi
+
+# Additional verification: Check if HiveServer2 is listening on port 10000
+echo "Checking if HiveServer2 is listening on port 10000..."

Review Comment:
   @kumaab I shall address the health check changes in another JIRA as this is 
to enable TEZ in hivesever2.



-- 
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]

Reply via email to