A Sandbox we're running has become corrupted, with HDFS no longer accessible. If possible, I would like to recover the Hive queries I wrote on this Sandbox. Not the data itself, but the actual SQL like querying in format 'SELECT * FROM...'
Does anyone know where this text is stored? On HDFS or Linux file system?
Hive query log is located at the value of hive.query.log.location in hive-site.xml. By default it should be at /tmp/[user_name]. In that log, you can see hive queries.
OK I looked it up, it's in /root/conf, but I don't see that either! Are these on HDFS or linux? If on HDFS, inaccessible to me unfortunately.
@ Aidan Condron
you will get currrent used hive-site.sml file is following path:- /usr/hdp/hdp_version/hive.
And by default the location of the query log files (by default /tmp/user).
and you can change the directory with following property:- <property>
<name>hive.querylog.location</name> <value>/Changed/Log/Directory</value> </property> <property> <name>hive.querylog.enable.plan.progress</name> <value>false</value> </property>
If this will help you plz accept and close this so that it will help others.
The file is on Linux, not HDFS.
hive-site.xml should be located on /etc/hive/conf/hive-site.xml. If hive.query.log.location is undefined in hive-site.xml. You can run 'set hive.query.log.location' via CLI to get the value of hive.query.log.location.
Hope this helps.