{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/9297","labels_url":"https://api.github.com/repos/apache/spark/issues/9297/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/9297/comments","events_url":"https://api.github.com/repos/apache/spark/issues/9297/events","html_url":"https://github.com/apache/spark/pull/9297","id":113537371,"number":9297,"title":"[SPARK-11206] Support SQL UI on the history server","user":{"login":"carsonwang","id":9278199,"avatar_url":"https://avatars.githubusercontent.com/u/9278199?v=3","gravatar_id":"","url":"https://api.github.com/users/carsonwang","html_url":"https://github.com/carsonwang","followers_url":"https://api.github.com/users/carsonwang/followers","following_url":"https://api.github.com/users/carsonwang/following{/other_user}","gists_url":"https://api.github.com/users/carsonwang/gists{/gist_id}","starred_url":"https://api.github.com/users/carsonwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carsonwang/subscriptions","organizations_url":"https://api.github.com/users/carsonwang/orgs","repos_url":"https://api.github.com/users/carsonwang/repos","events_url":"https://api.github.com/users/carsonwang/events{/privacy}","received_events_url":"https://api.github.com/users/carsonwang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2015-10-27T09:15:08Z","updated_at":"2015-11-20T02:54:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/9297","html_url":"https://github.com/apache/spark/pull/9297","diff_url":"https://github.com/apache/spark/pull/9297.diff","patch_url":"https://github.com/apache/spark/pull/9297.patch"},"body":"On the live web UI, there is a SQL tab which provides valuable information for the SQL query. But once the workload is finished, we won't see the SQL tab on the history server. It will be helpful if we support SQL UI on the history server so we can analyze it even after its execution.\r\n\r\nTo support SQL UI on the history server:\r\n1. I added an `onOtherEvent` method to the `SparkListener` trait and post all SQL related events to the same event bus.\r\n2. Two SQL events `SparkListenerSQLExecutionStart` and `SparkListenerSQLExecutionEnd` are defined in the sql module.\r\n3. The new SQL events are written to event log using Jackson.\r\n4.  A new trait `SparkHistoryListenerFactory` is added to allow the history server to feed events to the SQL history listener. The SQL implementation is loaded at runtime using `java.util.ServiceLoader`.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/158264570","html_url":"https://github.com/apache/spark/pull/9297#issuecomment-158264570","issue_url":"https://api.github.com/repos/apache/spark/issues/9297","id":158264570,"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":"2015-11-20T02:54:42Z","updated_at":"2015-11-20T02:54:42Z","body":"**[Test build #46386 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/46386/consoleFull)** for PR 9297 at commit [`690277e`](https://github.com/apache/spark/commit/690277e37c76b98ba57bc4bd5b0ae2c87669578d)."}}