{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/216380605","pull_request_review_id":153848251,"id":216380605,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjM4MDYwNQ==","diff_hunk":"@@ -73,6 +73,11 @@ abstract class SparkPlan extends QueryPlan[SparkPlan] with Logging with Serializ\n     super.makeCopy(newArgs)\n   }\n \n+  /**\n+   * @return Metadata that describes more details of this SparkPlan.\n+   */\n+  def metadata: Map[String, String] = Map.empty\n+","path":"sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala","position":8,"original_position":8,"commit_id":"82dc3d7b43f20cf7e7b254048e4ed5d848556d55","original_commit_id":"82dc3d7b43f20cf7e7b254048e4ed5d848556d55","user":{"login":"dongjoon-hyun","id":9700541,"node_id":"MDQ6VXNlcjk3MDA1NDE=","avatar_url":"https://avatars2.githubusercontent.com/u/9700541?v=4","gravatar_id":"","url":"https://api.github.com/users/dongjoon-hyun","html_url":"https://github.com/dongjoon-hyun","followers_url":"https://api.github.com/users/dongjoon-hyun/followers","following_url":"https://api.github.com/users/dongjoon-hyun/following{/other_user}","gists_url":"https://api.github.com/users/dongjoon-hyun/gists{/gist_id}","starred_url":"https://api.github.com/users/dongjoon-hyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongjoon-hyun/subscriptions","organizations_url":"https://api.github.com/users/dongjoon-hyun/orgs","repos_url":"https://api.github.com/users/dongjoon-hyun/repos","events_url":"https://api.github.com/users/dongjoon-hyun/events{/privacy}","received_events_url":"https://api.github.com/users/dongjoon-hyun/received_events","type":"User","site_admin":false},"body":"cc @cloud-fan ","created_at":"2018-09-10T16:06:50Z","updated_at":"2018-09-10T16:06:50Z","html_url":"https://github.com/apache/spark/pull/22353#discussion_r216380605","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/22353","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/216380605"},"html":{"href":"https://github.com/apache/spark/pull/22353#discussion_r216380605"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/22353"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/22353","id":213631920,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNjMxOTIw","html_url":"https://github.com/apache/spark/pull/22353","diff_url":"https://github.com/apache/spark/pull/22353.diff","patch_url":"https://github.com/apache/spark/pull/22353.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/22353","number":22353,"state":"open","locked":false,"title":"[SPARK-25357][SQL] Add metadata to SparkPlanInfo to dump more information like file path to event log","user":{"login":"LantaoJin","id":1853780,"node_id":"MDQ6VXNlcjE4NTM3ODA=","avatar_url":"https://avatars0.githubusercontent.com/u/1853780?v=4","gravatar_id":"","url":"https://api.github.com/users/LantaoJin","html_url":"https://github.com/LantaoJin","followers_url":"https://api.github.com/users/LantaoJin/followers","following_url":"https://api.github.com/users/LantaoJin/following{/other_user}","gists_url":"https://api.github.com/users/LantaoJin/gists{/gist_id}","starred_url":"https://api.github.com/users/LantaoJin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LantaoJin/subscriptions","organizations_url":"https://api.github.com/users/LantaoJin/orgs","repos_url":"https://api.github.com/users/LantaoJin/repos","events_url":"https://api.github.com/users/LantaoJin/events{/privacy}","received_events_url":"https://api.github.com/users/LantaoJin/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nField metadata removed from SparkPlanInfo in #18600 . Corresponding, many meta data was also removed from event SparkListenerSQLExecutionStart in Spark event log. If we want to analyze event log to get all input paths, we couldn't get them. Instead, simpleString of SparkPlanInfo JSON only display 100 characters, it won't help.\r\n\r\nBefore 2.3, the fragment of SparkListenerSQLExecutionStart in event log looks like below (It contains the metadata field which has the intact information):\r\n>{\"Event\":\"org.apache.spark.sql.execution.ui.SparkListenerSQLExecutionStart\", Location: InMemoryFileIndex[hdfs://cluster1/sys/edw/test1/test2/test3/test4..., \"metadata\": {\"Location\": \"InMemoryFileIndex[hdfs://cluster1/sys/edw/test1/test2/test3/test4/test5/snapshot/dt=20180904]\",\"ReadSchema\":\"struct<snpsht_start_dt:date,snpsht_end_dt:date,am_ntlogin_name:string,am_first_name:string,am_last_name:string,isg_name:string,CRE_DATE:date,CRE_USER:string,UPD_DATE:timestamp,UPD_USER:string>\"}\r\n\r\nAfter #18600, metadata field was removed.\r\n>{\"Event\":\"org.apache.spark.sql.execution.ui.SparkListenerSQLExecutionStart\", Location: InMemoryFileIndex[hdfs://cluster1/sys/edw/test1/test2/test3/test4...,\r\n\r\nSo I add this field back to SparkPlanInfo class. Then it will log out the meta data to event log. Intact information in event log is very useful for offline job analysis.\r\n\r\n## How was this patch tested?\r\nManual test/Check event log","created_at":"2018-09-06T14:08:49Z","updated_at":"2018-09-10T16:06:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a633b8cf42bfd84b38306c689605659596f2ab80","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/22353/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/22353/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/22353/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/82dc3d7b43f20cf7e7b254048e4ed5d848556d55","head":{"label":"LantaoJin:SPARK-25357","ref":"SPARK-25357","sha":"82dc3d7b43f20cf7e7b254048e4ed5d848556d55","user":{"login":"LantaoJin","id":1853780,"node_id":"MDQ6VXNlcjE4NTM3ODA=","avatar_url":"https://avatars0.githubusercontent.com/u/1853780?v=4","gravatar_id":"","url":"https://api.github.com/users/LantaoJin","html_url":"https://github.com/LantaoJin","followers_url":"https://api.github.com/users/LantaoJin/followers","following_url":"https://api.github.com/users/LantaoJin/following{/other_user}","gists_url":"https://api.github.com/users/LantaoJin/gists{/gist_id}","starred_url":"https://api.github.com/users/LantaoJin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LantaoJin/subscriptions","organizations_url":"https://api.github.com/users/LantaoJin/orgs","repos_url":"https://api.github.com/users/LantaoJin/repos","events_url":"https://api.github.com/users/LantaoJin/events{/privacy}","received_events_url":"https://api.github.com/users/LantaoJin/received_events","type":"User","site_admin":false},"repo":{"id":90969496,"node_id":"MDEwOlJlcG9zaXRvcnk5MDk2OTQ5Ng==","name":"spark","full_name":"LantaoJin/spark","owner":{"login":"LantaoJin","id":1853780,"node_id":"MDQ6VXNlcjE4NTM3ODA=","avatar_url":"https://avatars0.githubusercontent.com/u/1853780?v=4","gravatar_id":"","url":"https://api.github.com/users/LantaoJin","html_url":"https://github.com/LantaoJin","followers_url":"https://api.github.com/users/LantaoJin/followers","following_url":"https://api.github.com/users/LantaoJin/following{/other_user}","gists_url":"https://api.github.com/users/LantaoJin/gists{/gist_id}","starred_url":"https://api.github.com/users/LantaoJin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LantaoJin/subscriptions","organizations_url":"https://api.github.com/users/LantaoJin/orgs","repos_url":"https://api.github.com/users/LantaoJin/repos","events_url":"https://api.github.com/users/LantaoJin/events{/privacy}","received_events_url":"https://api.github.com/users/LantaoJin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LantaoJin/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/LantaoJin/spark","forks_url":"https://api.github.com/repos/LantaoJin/spark/forks","keys_url":"https://api.github.com/repos/LantaoJin/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LantaoJin/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LantaoJin/spark/teams","hooks_url":"https://api.github.com/repos/LantaoJin/spark/hooks","issue_events_url":"https://api.github.com/repos/LantaoJin/spark/issues/events{/number}","events_url":"https://api.github.com/repos/LantaoJin/spark/events","assignees_url":"https://api.github.com/repos/LantaoJin/spark/assignees{/user}","branches_url":"https://api.github.com/repos/LantaoJin/spark/branches{/branch}","tags_url":"https://api.github.com/repos/LantaoJin/spark/tags","blobs_url":"https://api.github.com/repos/LantaoJin/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LantaoJin/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LantaoJin/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/LantaoJin/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LantaoJin/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/LantaoJin/spark/languages","stargazers_url":"https://api.github.com/repos/LantaoJin/spark/stargazers","contributors_url":"https://api.github.com/repos/LantaoJin/spark/contributors","subscribers_url":"https://api.github.com/repos/LantaoJin/spark/subscribers","subscription_url":"https://api.github.com/repos/LantaoJin/spark/subscription","commits_url":"https://api.github.com/repos/LantaoJin/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/LantaoJin/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/LantaoJin/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/LantaoJin/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/LantaoJin/spark/contents/{+path}","compare_url":"https://api.github.com/repos/LantaoJin/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LantaoJin/spark/merges","archive_url":"https://api.github.com/repos/LantaoJin/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LantaoJin/spark/downloads","issues_url":"https://api.github.com/repos/LantaoJin/spark/issues{/number}","pulls_url":"https://api.github.com/repos/LantaoJin/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/LantaoJin/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/LantaoJin/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LantaoJin/spark/labels{/name}","releases_url":"https://api.github.com/repos/LantaoJin/spark/releases{/id}","deployments_url":"https://api.github.com/repos/LantaoJin/spark/deployments","created_at":"2017-05-11T10:58:27Z","updated_at":"2017-05-11T10:58:53Z","pushed_at":"2018-09-10T09:32:51Z","git_url":"git://github.com/LantaoJin/spark.git","ssh_url":"git@github.com:LantaoJin/spark.git","clone_url":"https://github.com/LantaoJin/spark.git","svn_url":"https://github.com/LantaoJin/spark","homepage":null,"size":276557,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"64c314e22fecca1ca3fe32378fc9374d8485deec","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkxNzE2NTY1OA==","name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2018-09-10T14:17:03Z","pushed_at":"2018-09-10T16:02:44Z","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":281273,"stargazers_count":18713,"watchers_count":18713,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16867,"mirror_url":null,"archived":false,"open_issues_count":498,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":16867,"open_issues":498,"watchers":18713,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/22353"},"html":{"href":"https://github.com/apache/spark/pull/22353"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/22353"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/22353/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/22353/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/22353/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/82dc3d7b43f20cf7e7b254048e4ed5d848556d55"}},"author_association":"NONE"}}
{"actor":{"display_login":"dongjoon-hyun"}}