hive执行日志解析,job日志解析

 

python读取api解析

 

http://nn1:19888/ws/v1/history/mapreduce/jobs
http://nn1:19888/ws/v1/history/mapreduce/jobs/job_1519454868369_30158/conf

 

curl --compressed -H "Accept: application/json" -X GET "http://nn1:19888/ws/v1/history/mapreduce/jobs"
curl --compressed -H "Accept: application/json" -X GET http://nn1:19888/ws/v1/history/mapreduce/jobs/job_1519454868369_30158/conf

 

 

解析json

CDH中,在HDFS的”/user/history/done”目录下

在”/user/history/done”目录下,每个job有两个文件:job.jhist和job.xml,job.jhist是作业运行过程的详细记录,格式为json。job.xml是作业的配置文件

 

如果不是json,更改一下配置:

image

 

参考:

http://blog.csdn.net/u012948976/article/details/51623228

您可以选择一种方式赞助本站