Home

Applications

Like the Applications page, these APIs provide detailed information about your applications. You can collect data based on application name, type, user, queues, and tags.

All commands require:

  • Unravel_Host: Unravel server

  • Port: port #

  • app_id: assigned application id

Unravel's Recommendations for the Application

/common/app/app_id/recommendation

curl -X GET "http://playground.unraveldata.com:3000/api/v1/common/app/job_1543784013107_1631/recommendation" -H  "accept: application/json" -H  "Authorization: JWT token"

Sample Output Summary

[
   {
      "parameter": "mapreduce.map.memory.mb",
      "current_value": "7596",
      "recommended_value": "3896"
   },
   {
      "parameter": "mapreduce.map.java.opts",
      "current_value": "-Xmx8192m",
      "recommended_value": "-Xmx3117m"
   }
]

Application's Summary

/common/app/app_id/summary

curl -X GET "http://playground.unraveldatalab.com:3000/api/v1/common/app/parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF/summary" -H  "accept: application/json" -H  "Authorization: JWT token"

Sample Output Summary

{
  "@class": "com.unraveldata.annotation.HiveQueryAnnotation",
  "vcoreSeconds": 0,
  "memorySeconds": 0,
  "cents": 0,
  "version": 1,
  "source": "post-db",
  "kind": "hive",
  "id": "parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF",
  "nick": "Hive Query",
  "status": "S",
  "user": "parwinder",
  "mrJobIds": [
    "job_1550559654567_8334"
  ],
  "duration": 82120,
  "startTime": 1551405626487,
  "numMRJobs": 0,
  "totalMRJobs": 1,
  "totalMapTasks": 0,
  "sm": 0,
  "km": 0,
  "kmu": 0,
  "fm": 0,
  "fmu": 0,
  "totalReduceTasks": 0,
  "sr": 0,
  "kr": 0,
  "kru": 0,
  "fr": 0,
  "fru": 0,
  "totalMapSlotDuration": 0,
  "totalReduceSlotDuration": 0,
  "totalDfsBytesRead": 0,
  "totalDfsBytesWritten": 0,
  "queryString": "\nINSERT OVERWRITE DIRECTORY '\/user\/benchmark-user\/benchmarks\/oozie\/workflows\/road_accident_db\/output\/'\nROW FORMAT DELIMITED\nFIELDS TERMINATED BY '\\t'\nSTORED AS TEXTFILE\nselect reflect(\"java.lang.Thread\", \"sleep\", bigint(60000))",
  "type": "DML",
  "numEvents": 0
}

Application's Status

/common/app/app_id/status

curl -X GET "http://playground.unraveldatalab.com:3000/api/v1/common/app/parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF/status" -H "accept: application/json" -H "Authorization: JWT token"

Sample Output

{
  "status": "Success",
  "message": "The app status of parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF is Success"
}

Application's Errors

/common/app/app_id/errors

curl -X GET "http://playground.unraveldatalab.com:3000/api/v1/common/app/parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF/errors" -H "accept: application/json" -H "Authorization: JWT token.

Sample Output

No errors found
Application's Logs

/common/app/app_id/logs

curl -X GET "http://playground.unraveldatalab.com:3000/api/v1/common/app/parwinder_20190228180000_db0d2b83-849f-u_SOyF/logs" -H "accept: application/json" -H "Authorization: JWT token"

Sample Output

No log view found for app hive_20190126160707_1d3f4e51-55eb-4cc7-8a8b-bca05d598920

Application's Resource Usage

/apps/app_id/resourceusage

Required Parameter

metric_id: where

  • 115: gcLoad

  • 125: maxHeap

  • 126: usedHeap

  • 134: processCpuLoad

  • 135: systemCpuLoad

  • 137: availableMemory

  • 138: vmRss

curl -X GET "http://playground.unraveldatalab.com:3000/api/v1/apps/parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF/logs" -H "accept: application/json" -H "Authorization: JWT token"

Sample Output

[
   {
     "appId":"job_1552417866244_0074",
     "unravel_metric_id":138,
     "system":"mr",
     "entity_id":"a_1","entity_name":"a_1",
     "host_name":"congo28.unraveldata.com",
     "sampleCount":2,"sum":772329472,
     "min":384274432,
     "max":388055040,
     "avg":386164736,
     "ts":1553500850000,
     "endTs":1553500860000,
     "unit":"BYTES"
   }
]