{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/15307","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/15307/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/15307/comments","events_url":"https://api.github.com/repos/apache/spark/issues/15307/events","html_url":"https://github.com/apache/spark/pull/15307","id":180212705,"number":15307,"title":"[SPARK-17731][SQL][STREAMING] Metrics for structured streaming","user":{"login":"tdas","id":663212,"avatar_url":"https://avatars.githubusercontent.com/u/663212?v=3","gravatar_id":"","url":"https://api.github.com/users/tdas","html_url":"https://github.com/tdas","followers_url":"https://api.github.com/users/tdas/followers","following_url":"https://api.github.com/users/tdas/following{/other_user}","gists_url":"https://api.github.com/users/tdas/gists{/gist_id}","starred_url":"https://api.github.com/users/tdas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdas/subscriptions","organizations_url":"https://api.github.com/users/tdas/orgs","repos_url":"https://api.github.com/users/tdas/repos","events_url":"https://api.github.com/users/tdas/events{/privacy}","received_events_url":"https://api.github.com/users/tdas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":27,"created_at":"2016-09-30T03:33:54Z","updated_at":"2016-10-06T00:42:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/15307","html_url":"https://github.com/apache/spark/pull/15307","diff_url":"https://github.com/apache/spark/pull/15307.diff","patch_url":"https://github.com/apache/spark/pull/15307.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nMetrics are needed for monitoring structured streaming apps. Here is the design doc for implementing the necessary metrics.\r\nhttps://docs.google.com/document/d/1NIdcGuR1B3WIe8t7VxLrt58TJB4DtipWEbj5I_mzJys/edit?usp=sharing\r\n\r\nSpecifically, this PR adds the following public APIs.\r\n- StreamingQuery.status returns a StreamingQueryInfo obejct\r\n\r\n- StreamingQueryInfo has the following important fields\r\n  - inputRate - Current rate (rows/sec) at which data is being generated by all the sources\r\n  - processingRate - Current rate (rows/sec) at which the query is processing data from\r\n                                  all the sources\r\n  - outputRate - Current rate (rows/sec) at which the query is writing data to the sink\r\n  - latency - Current average latency between the data being available in source and the sink writing the corresponding output \r\n  - sourceStatuses: Array[SourceStatus] - Current statuses of the sources\r\n  - sinkStatus: SinkStatus - Current status of the sink\r\n  - triggerStatus - Low-level detailed status of the last completed/currently active trigger\r\n    - latencies - getOffset, getBatch, full trigger, wal writes\r\n    - timestamps - trigger start, finish, after getOffset, after getBatch\r\n    - numRows - input, output, state total/updated rows for aggregations\r\n\r\n- SourceStatus has the following important fields\r\n  - inputRate - Current rate (rows/sec) at which data is being generated by the source\r\n  - processingRate - Current rate (rows/sec) at which the query is processing data from the source\r\n  - triggerStatus - Low-level detailed status of the last completed/currently active trigger\r\n\r\n- SinkStatus has the following important fields\r\n - outputRate - Current rate (rows/sec) at which the query is writing data to the sink\r\n\r\n## How was this patch tested?\r\nUnits tests, old and new."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/251839097","html_url":"https://github.com/apache/spark/pull/15307#issuecomment-251839097","issue_url":"https://api.github.com/repos/apache/spark/issues/15307","id":251839097,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T00:42:39Z","updated_at":"2016-10-06T00:42:39Z","body":"**[Test build #66411 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/66411/consoleFull)** for PR 15307 at commit [`713f773`](https://github.com/apache/spark/commit/713f77349a596d94177db8a237faaa53bb176714)."}}
{"actor":{"display_login":"SparkQA"}}