Hi,
Our cluster is secured using Kerberos. Now I need to run hive queries in a shell script which would be scheduled to run periodically.
In my shell script, I was thinking to use the below commands in sequence
>beeline -u"jdbc:hive2://$hive_server2:10000/$hive_db;principal=$user_principal"
>beeline -e"SHOW DATABASES"
But then I realised that once I run the beeline -u command, it would take me to the beeline shell instead of being in the bash shell. So wondering how to get this sorted out. I need to use beeline -e command, but need to connect to the cluster first using kerberos principal. Any ideas whats the best way to handle this?
FYI, we are not using Oozie, but shell script with crontab scheduling.
Thanks