Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to disable hive CLI for all the users . Planning to use "beeline" instead of hive CLI

avatar
Explorer

Currently we are using Hive CLI on my cluster,For the security purpose we planned to use "beeline" by disabling "Hive CLI" from the existing cluster. I have added the lines below in hive-env template thru ambari to disable the hive shell

if["$SERVICE"="cli"];then

echo "Sorry! I have disabled hive-shell"

exit1

fi

Once I restarted the hive service I could see 2 CRIT alerts from ambari "Hive Metastore process cannot be determined to be up and listening on the network."

I know that I can revoke execute permission for below file on all hive-clients.

/usr/hdp/current/hive-client/bin/hive

Could someone suggest me the better approach to disable "Hive CLI" .

1 ACCEPTED SOLUTION

avatar

@Parameswara Nangi

if [ "$SERVICE" = "cli" ] && [ "$USER" != "ambari-qa" ]; then 
echo "Sorry! hive cli has been disabled for security purpose, please use beeline instead." 
exit 1 
fi 

This gives ambari-qa the hive cli access and therefore the hive metastore health check passes.

View solution in original post

3 REPLIES 3

avatar

@Parameswara Nangi

if [ "$SERVICE" = "cli" ] && [ "$USER" != "ambari-qa" ]; then 
echo "Sorry! hive cli has been disabled for security purpose, please use beeline instead." 
exit 1 
fi 

This gives ambari-qa the hive cli access and therefore the hive metastore health check passes.

avatar
Explorer

Hi Sandeep,

Thank you very much for the prompt response..

I have added the above lines to hive-env template and restarted the hive services and it worked, the error was disappeared from from ambari.

Connected to beeline thru backend submitted a query and it was executed . but I could see the below error.

ERROR hdfs.KeyProviderCache: Could not find uri with key [dfs.encryption.key.provider.uri] to create a keyProvider !!

Please suggest me on this.