Query Resource

The Query REST service is the most complex of the rest services. It contains detailed information about nodes, and other details that capture the state and history of a query being executed on a openLooKeng installation.

  • GET /v1/query

This service returns information and statistics about queries that are currently being executed on a openLooKeng coordinator.

When you point a web browser at a openLooKeng coordinate you’ll see a rendered version of the output from this service which will display recent queries that have executed on a openLooKeng installation.

  • GET /v1/query/{queryId}

If you are looking to gather very detailed statistics about a query, this is the service you would call. If you load the web interface of a openLooKeng coordinator you will see a list of current queries. Clicking on a query will reveal a link to this service.

Example response:

  1. {
  2. "queryId" : "20131229_211533_00017_dk5x2",
  3. "session" : {
  4. "user" : "tobrien",
  5. "source" : "openlk-cli",
  6. "catalog" : "jmx",
  7. "schema" : "jmx",
  8. "remoteUserAddress" : ""192.168.1.1"",
  9. "userAgent" : "StatementClient/0.55-SNAPSHOT",
  10. "startTime" : 1388351852026
  11. },
  12. "state" : "FINISHED",
  13. "self" : "http://127.0.0.1:8080/v1/query/20131229_211533_00017_dk5x2",
  14. "fieldNames" : [ "name" ],
  15. "query" : "select name from \"java.lang:type=runtime\"",
  16. "queryStats" : {
  17. "createTime" : "2013-12-29T16:17:32.027-05:00",
  18. "executionStartTime" : "2013-12-29T16:17:32.086-05:00",
  19. "lastHeartbeat" : "2013-12-29T16:17:44.561-05:00",
  20. "endTime" : "2013-12-29T16:17:32.152-05:00",
  21. "elapsedTime" : "125.00ms",
  22. "queuedTime" : "1.31ms",
  23. "analysisTime" : "4.84ms",
  24. "distributedPlanningTime" : "353.00us",
  25. "totalTasks" : 2,
  26. "runningTasks" : 0,
  27. "completedTasks" : 2,
  28. "totalDrivers" : 2,
  29. "queuedDrivers" : 0,
  30. "runningDrivers" : 0,
  31. "completedDrivers" : 2,
  32. "totalMemoryReservation" : "0B",
  33. "totalScheduledTime" : "5.84ms",
  34. "totalCpuTime" : "710.49us",
  35. "totalBlockedTime" : "27.38ms",
  36. "rawInputDataSize" : "27B",
  37. "rawInputPositions" : 1,
  38. "processedInputDataSize" : "32B",
  39. "processedInputPositions" : 1,
  40. "outputDataSize" : "32B",
  41. "outputPositions" : 1
  42. },
  43. "outputStage" : ...
  44. }