Skip to main content

Snowflake Documentation

GET /common/app/{app_id}/recommendation
New API: GET /spark/{clusterUid}/{app_id}/analysis

Gets Unravel's recommendations for the given application.

Request
GET http://<unravel-host>:3000/api/v1/spark/{clusterUid}/{app_id}/analysis
Path parameters

Name

Description

app_id

App ID.

clusterUid

Cluster unique ID.

Query parameters

None.

Examples

Request:

curl -X GET -H "Authorization: JWT <token>" -H "Content-Type:application/json" -H "Accept: application/json" http://myserver.com:3000/api/v1/spark/default/application_1648561667886_0027/analysis

Response:

"id":"application_1648115466090_0016","kind":"SPARK","insights":[],"insightsV2":[{"key":"efficiency","categories":{"Low
utilization of CPU resources":{"instances":[{"key":"efficiency","subcategory":"0","title":"Low utilization of CPU
resources","events":"Nodes running this application have less than 50% CPU usage for more than 95% of the
time","actions":"<ul>
	<li>Consider increasing the number of parallel tasks running per container via the <em>--executor-cores</em>
		parameter or the <em>spark.executor.cores</em> property. Ensure that the application has enough number of
		partitions</li>
	<li>Consider increasing the number of executors or adjusting the dynamic allocation of containers</li>
</ul>
","type":"IR","impact":7}],"impact":7,"numQueries":0}}},{"key":"SparkAppTimeReport","categories":{"":{"instances":[{"key":"SparkAppTimeReport","subcategory":"0","title":"","events":"{\"appTaskTimeDetail\":{\"totalTaskTime\":81002,\"inputStageDetail\":{\"numTasks\":0,\"taskTime\":0,\"taskTimeDetail\":{\"cpuTime\":0,\"scheduleWaitTime\":0,\"gcTime\":0,\"dataSanTime\":0,\"executorDeserializeTime\":0,\"resultSerializationTime\":0,\"executorRunTime\":0,\"unAccountedTime\":0,\"totalDataRead\":0,\"totalDataWritten\":0,\"totalShuffleWrite\":0,\"totalShuffleWriteTime\":0,\"totalShuffleRead\":0,\"totalFetchWaitTime\":0,\"totalShuffleReadLocal\":0,\"totalShuffleReadRemote\":0},\"insights\":[],\"topStages\":[]},\"outputStageDetail\":{\"numTasks\":0,\"taskTime\":0,\"taskTimeDetail\":{\"cpuTime\":0,\"scheduleWaitTime\":0,\"gcTime\":0,\"dataSanTime\":0,\"executorDeserializeTime\":0,\"resultSerializationTime\":0,\"executorRunTime\":0,\"unAccountedTime\":0,\"totalDataRead\":0,\"totalDataWritten\":0,\"totalShuffleWrite\":0,\"totalShuffleWriteTime\":0,\"totalShuffleRead\":0,\"totalFetchWaitTime\":0,\"totalShuffleReadLocal\":0,\"totalShuffleReadRemote\":0},\"insights\":[],\"topStages\":[]},\"processStageDetail\":{\"numTasks\":1000,\"taskTime\":81002,\"taskTimeDetail\":{\"cpuTime\":7848,\"scheduleWaitTime\":11575,\"gcTime\":1085,\"dataSanTime\":0,\"executorDeserializeTime\":14245,\"resultSerializationTime\":112,\"executorRunTime\":55070,\"unAccountedTime\":46927,\"totalDataRead\":0,\"totalDataWritten\":0,\"totalShuffleWrite\":12078,\"totalShuffleWriteTime\":292,\"totalShuffleRead\":13176,\"totalFetchWaitTime\":3,\"totalShuffleReadLocal\":12932,\"totalShuffleReadRemote\":244},\"insights\":[\"1.
StageId 404 has inefficient partition size 12 Bytes while shuffling.\",\"2. Processing stages spent less than 50% task
time on CPU.\"],\"topStages\":[0,1,404]},\"insights\":[\"Wall clock time of processing stages is more than 30% of
overall stage wall clock
time.\"]},\"appTimeDistributions\":{\"totalAppTime\":42950,\"totalDriverTime\":7977,\"totalJobTime\":34973,\"queueWaitTime\":7680,\"totalFileWriteSetupTime\":0,\"totalFileWriteCommitTime\":0}}","actions":"","type":"RE","impact":20}],"impact":20,"numQueries":0}}}],"recommendation":[]}