@Priyanka26 Can you please provide us the below details?
1) Are you using LLAP to run queries?
2) Complete stack trace
3) Your HDP version.
Without the complete stack trace we can't provide you the correct suggestion to fix the issue. From your description i guess you are using LLAP. If so you can try setting the below properties and check whether it helps you or not.
set hive.llap.io.enabled=false;
set hive.llap.io.memory.mode=none;
set hive.llap.object.cache.enabled=false;
Please try and see whether it helps or not. If not kindly provide the complete stack trace.
Please "Accept As Solution" if it is helpful to you.
Thanks
Shobika S