I am writing an automation batch script that will check beeline status in a scheduled interval of time.
I have written the code below to do this, but the problem is that, it seems the edge nodes of my cluster requires password to run the beeline command.
Code:
for node in `cat /root/myscripts/edgeNodes.txt`
do
ssh ${node} "beeline -u jdbc:hive2://${node}:10000/default -n $usrnm -p $pwd -e 'select col1 , col2 from my_tab limit 3;'" >> /root/report/beeline_report.txt
done
The -n $ntid -p $pwd
is where the roadblock is. Right now I'm passing the username and password as my parameters, but while deploying it I can't hardcode my password in this script as the script is automated and doesn't require human inputs (I will have to remove the -n $ntid -p $pwd
part. Also the passwords keep changing every month).
Is there a way to change the Beeline configurations to remove the authentication requirement? If yes, then how should I proceed, which files do I make changes to ?
Please help,
Regards.