09-09-2017 08:40 AM
I'm working on a script that will send notification on the failed,killed application.
I'm using the Yarn histrory API and getting the the failed application in the last hour also i'm parsing the output.
I need ideas how to present this in the notification, for example: HTML table, json or free text.
If anyone who already did this and can advise or share how he did this, also i will appreciate if anyone can advise how i can get the failed and killed in the same request, i tried to use the OR operation with no success.
Thanks in advance, Below what i did so far:
STARTDATE=`date -d " -1 hour " +%s%N | cut -b1-13`
ENDDATE=`date +%s%N | cut -b1-13`
result=`curl -s 'http://ropr-mhc102:8088/ws/v1/cluster/apps?finishedTimeBegin='$STARTDATE'&finishedTimeEnd='$ENDDATE'&finalStatus=FAILED&user=dataaccess'`
echo $result | python -m json.tool | sed 's/["|,]//g' | grep -E "id|name|finalStatus|amContainerLogs|trackingUrl|diagnostics"
diagnostics: User class threw exception: java.io.FileNotFoundException: File hdfs://CAProd/liveperson/data/storage_Shared/data_Platform/dallas/output/VisitorSession/acc_id=88 does not exist.