Dear Sampath,
Hope you are doing well.
Please run below command to resolve the issue
sudo rm /var/lib/hive/metastore/metastore_db/*lck
sudo chmod 777 -R /var/lib/hive/metastore/metastore_db
After running below command restart all the daemon and run hive query.
Please let me know if the issue still persist.
We will be waiting for your response.