Created on 12-07-2018 03:55 AM - edited 09-16-2022 06:57 AM
I am trying to get Hive query and its details, But i can get its details not the full query. I need to get all the data by API or command, please give me an perfect solution asap.
Created 12-07-2018 09:58 AM
You could get the full query string from "<jobID>_conf.xml" from Job history server
1. Job history server -> Click job ID-> Configuration -> Search for "hive.query.string"
2. From HDFS location -> "hdfs://<Hostname>:8020/user/history/done/2018/12/07/000000/<job_ID>_conf.xml -> search for "hive.query.string"
Hope it help. let us know if any questions.
Created 12-08-2018 04:48 AM
Thank you so much,
Is there a way to take all the users queries, users name,time of execution through API. Its is difficult to get all the xml file and extract its queries for one user, we have many users and there are several queries for the user. Even though I manage to get all the users query, the old query will get deleted. If i write a script, I want all the extracted queries and its username,time from the xml into a single file. So all the users, Query, uses name and time of execution will be in a single file.
Lets us consider a scenario that if I write a script like that, If a users has 5 xml and the script took all the query and the users details, If I execute again the new query only should append the file and not the old query.
Can you suggest any solution for my scenario?, please
Is there a way to get job id and start and finished time from that xml file.