{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/45096704","id":45096704,"diff_hunk":"@@ -131,6 +135,17 @@ case class SparkListenerApplicationEnd(time: Long) extends SparkListenerEvent\n private[spark] case class SparkListenerLogStart(sparkVersion: String) extends SparkListenerEvent\n \n /**\n+ * Interface for registering listeners defined in other modules like SQL, which are used to\n+ * rebuild the history UI.\n+ */\n+trait SparkListenerRegister {","path":"core/src/main/scala/org/apache/spark/scheduler/SparkListener.scala","position":32,"original_position":32,"commit_id":"fe5c16529d821098658cb61ca0f0a21d2a568270","original_commit_id":"fe5c16529d821098658cb61ca0f0a21d2a568270","user":{"login":"vanzin","id":1694083,"avatar_url":"https://avatars.githubusercontent.com/u/1694083?v=3","gravatar_id":"","url":"https://api.github.com/users/vanzin","html_url":"https://github.com/vanzin","followers_url":"https://api.github.com/users/vanzin/followers","following_url":"https://api.github.com/users/vanzin/following{/other_user}","gists_url":"https://api.github.com/users/vanzin/gists{/gist_id}","starred_url":"https://api.github.com/users/vanzin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanzin/subscriptions","organizations_url":"https://api.github.com/users/vanzin/orgs","repos_url":"https://api.github.com/users/vanzin/repos","events_url":"https://api.github.com/users/vanzin/events{/privacy}","received_events_url":"https://api.github.com/users/vanzin/received_events","type":"User","site_admin":false},"body":"I know it's a little annoying to rename things, but I don't like this name very much... how about `SparkHistoryListenerFactory` or something along those lines?\r\n\r\nAlso, this trait should probably be `private[spark]`.","created_at":"2015-11-17T18:16:36Z","updated_at":"2015-11-17T18:16:36Z","html_url":"https://github.com/apache/spark/pull/9297#discussion_r45096704","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/9297","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/45096704"},"html":{"href":"https://github.com/apache/spark/pull/9297#discussion_r45096704"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/9297"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/9297","id":48844547,"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","issue_url":"https://api.github.com/repos/apache/spark/issues/9297","number":9297,"state":"open","locked":false,"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},"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 `SparkListenerRegister` 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","created_at":"2015-10-27T09:15:08Z","updated_at":"2015-11-17T18:16:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6fc3bb3e1f0ff0eb478478c3965527688838ace0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/9297/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/9297/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/9297/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/fe5c16529d821098658cb61ca0f0a21d2a568270","head":{"label":"carsonwang:SqlHistoryUI","ref":"SqlHistoryUI","sha":"fe5c16529d821098658cb61ca0f0a21d2a568270","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},"repo":{"id":36279354,"name":"spark","full_name":"carsonwang/spark","owner":{"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},"private":false,"html_url":"https://github.com/carsonwang/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/carsonwang/spark","forks_url":"https://api.github.com/repos/carsonwang/spark/forks","keys_url":"https://api.github.com/repos/carsonwang/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carsonwang/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carsonwang/spark/teams","hooks_url":"https://api.github.com/repos/carsonwang/spark/hooks","issue_events_url":"https://api.github.com/repos/carsonwang/spark/issues/events{/number}","events_url":"https://api.github.com/repos/carsonwang/spark/events","assignees_url":"https://api.github.com/repos/carsonwang/spark/assignees{/user}","branches_url":"https://api.github.com/repos/carsonwang/spark/branches{/branch}","tags_url":"https://api.github.com/repos/carsonwang/spark/tags","blobs_url":"https://api.github.com/repos/carsonwang/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carsonwang/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carsonwang/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/carsonwang/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carsonwang/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/carsonwang/spark/languages","stargazers_url":"https://api.github.com/repos/carsonwang/spark/stargazers","contributors_url":"https://api.github.com/repos/carsonwang/spark/contributors","subscribers_url":"https://api.github.com/repos/carsonwang/spark/subscribers","subscription_url":"https://api.github.com/repos/carsonwang/spark/subscription","commits_url":"https://api.github.com/repos/carsonwang/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/carsonwang/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/carsonwang/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/carsonwang/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/carsonwang/spark/contents/{+path}","compare_url":"https://api.github.com/repos/carsonwang/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carsonwang/spark/merges","archive_url":"https://api.github.com/repos/carsonwang/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carsonwang/spark/downloads","issues_url":"https://api.github.com/repos/carsonwang/spark/issues{/number}","pulls_url":"https://api.github.com/repos/carsonwang/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/carsonwang/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/carsonwang/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carsonwang/spark/labels{/name}","releases_url":"https://api.github.com/repos/carsonwang/spark/releases{/id}","created_at":"2015-05-26T07:28:13Z","updated_at":"2015-05-26T07:28:35Z","pushed_at":"2015-11-12T06:37:10Z","git_url":"git://github.com/carsonwang/spark.git","ssh_url":"git@github.com:carsonwang/spark.git","clone_url":"https://github.com/carsonwang/spark.git","svn_url":"https://github.com/carsonwang/spark","homepage":null,"size":125750,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"17f499920776e0e995434cfa300ff2ff38658fa8","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-11-17T17:52:24Z","pushed_at":"2015-11-17T18:04:36Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":384131,"stargazers_count":6217,"watchers_count":6217,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5737,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":374,"forks":5737,"open_issues":374,"watchers":6217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/9297"},"html":{"href":"https://github.com/apache/spark/pull/9297"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/9297"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/9297/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/9297/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/9297/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/fe5c16529d821098658cb61ca0f0a21d2a568270"}}}}