{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/102863165","pull_request_review_id":23633289,"id":102863165,"diff_hunk":"@@ -61,6 +62,9 @@ private[sql] class SharedState(val sparkContext: SparkContext) extends Logging {\n       // When neither spark.sql.warehouse.dir nor hive.metastore.warehouse.dir is set,\n       // we will set hive.metastore.warehouse.dir to the default value of spark.sql.warehouse.dir.\n       val sparkWarehouseDir = sparkContext.conf.get(WAREHOUSE_PATH)\n+      logInfo(s\"Setting hive.metastore.warehouse.dir ($hiveWarehouseDir) to the value of \" +\n+        s\"${WAREHOUSE_PATH.key} ('$sparkWarehouseDir').\")\n+      sparkContext.hadoopConfiguration.set(\"hive.metastore.warehouse.dir\", sparkWarehouseDir)\n       sparkContext.conf.set(\"hive.metastore.warehouse.dir\", sparkWarehouseDir)","path":"sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala","position":15,"original_position":15,"commit_id":"1d18636c0b27a25e504eb1ff273354cf6a87e99d","original_commit_id":"1d18636c0b27a25e504eb1ff273354cf6a87e99d","user":{"login":"windpiger","id":12979185,"avatar_url":"https://avatars.githubusercontent.com/u/12979185?v=3","gravatar_id":"","url":"https://api.github.com/users/windpiger","html_url":"https://github.com/windpiger","followers_url":"https://api.github.com/users/windpiger/followers","following_url":"https://api.github.com/users/windpiger/following{/other_user}","gists_url":"https://api.github.com/users/windpiger/gists{/gist_id}","starred_url":"https://api.github.com/users/windpiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windpiger/subscriptions","organizations_url":"https://api.github.com/users/windpiger/orgs","repos_url":"https://api.github.com/users/windpiger/repos","events_url":"https://api.github.com/users/windpiger/events{/privacy}","received_events_url":"https://api.github.com/users/windpiger/received_events","type":"User","site_admin":false},"body":"yes, it is ok to remove it, and  it will be more clear that  `hive.metastore.warehouse.dir` and `WAREHOUSE_PATH ` are all at their right places.","created_at":"2017-02-24T01:42:49Z","updated_at":"2017-02-24T01:42:49Z","html_url":"https://github.com/apache/spark/pull/16996#discussion_r102863165","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/16996","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/102863165"},"html":{"href":"https://github.com/apache/spark/pull/16996#discussion_r102863165"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/16996"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/16996","id":106940672,"html_url":"https://github.com/apache/spark/pull/16996","diff_url":"https://github.com/apache/spark/pull/16996.diff","patch_url":"https://github.com/apache/spark/pull/16996.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/16996","number":16996,"state":"open","locked":false,"title":"[SPARK-19664][SQL]put hive.metastore.warehouse.dir in hadoopconf to overwrite its original value","user":{"login":"windpiger","id":12979185,"avatar_url":"https://avatars.githubusercontent.com/u/12979185?v=3","gravatar_id":"","url":"https://api.github.com/users/windpiger","html_url":"https://github.com/windpiger","followers_url":"https://api.github.com/users/windpiger/followers","following_url":"https://api.github.com/users/windpiger/following{/other_user}","gists_url":"https://api.github.com/users/windpiger/gists{/gist_id}","starred_url":"https://api.github.com/users/windpiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windpiger/subscriptions","organizations_url":"https://api.github.com/users/windpiger/orgs","repos_url":"https://api.github.com/users/windpiger/repos","events_url":"https://api.github.com/users/windpiger/events{/privacy}","received_events_url":"https://api.github.com/users/windpiger/received_events","type":"User","site_admin":false},"body":"\r\n## What changes were proposed in this pull request?\r\n\r\nIn [SPARK-15959](https://issues.apache.org/jira/browse/SPARK-15959), we bring back the `hive.metastore.warehouse.dir` , while in the logic, when use the value of  `spark.sql.warehouse.dir` to overwrite `hive.metastore.warehouse.dir` , it set it to `sparkContext.conf` which does not overwrite the value is hadoopConf, I think it should put in `sparkContext.hadoopConfiguration` and overwrite the original value of hadoopConf\r\n\r\nhttps://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala#L64\r\n\r\n## How was this patch tested?\r\nN/A","created_at":"2017-02-20T05:08:53Z","updated_at":"2017-02-24T01:42:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64415c4691319806ffbb91ef5956a22f421e3db9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/16996/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/16996/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/16996/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/1d18636c0b27a25e504eb1ff273354cf6a87e99d","head":{"label":"windpiger:hivemetawarehouseConf","ref":"hivemetawarehouseConf","sha":"1d18636c0b27a25e504eb1ff273354cf6a87e99d","user":{"login":"windpiger","id":12979185,"avatar_url":"https://avatars.githubusercontent.com/u/12979185?v=3","gravatar_id":"","url":"https://api.github.com/users/windpiger","html_url":"https://github.com/windpiger","followers_url":"https://api.github.com/users/windpiger/followers","following_url":"https://api.github.com/users/windpiger/following{/other_user}","gists_url":"https://api.github.com/users/windpiger/gists{/gist_id}","starred_url":"https://api.github.com/users/windpiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windpiger/subscriptions","organizations_url":"https://api.github.com/users/windpiger/orgs","repos_url":"https://api.github.com/users/windpiger/repos","events_url":"https://api.github.com/users/windpiger/events{/privacy}","received_events_url":"https://api.github.com/users/windpiger/received_events","type":"User","site_admin":false},"repo":{"id":70575274,"name":"spark","full_name":"windpiger/spark","owner":{"login":"windpiger","id":12979185,"avatar_url":"https://avatars.githubusercontent.com/u/12979185?v=3","gravatar_id":"","url":"https://api.github.com/users/windpiger","html_url":"https://github.com/windpiger","followers_url":"https://api.github.com/users/windpiger/followers","following_url":"https://api.github.com/users/windpiger/following{/other_user}","gists_url":"https://api.github.com/users/windpiger/gists{/gist_id}","starred_url":"https://api.github.com/users/windpiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windpiger/subscriptions","organizations_url":"https://api.github.com/users/windpiger/orgs","repos_url":"https://api.github.com/users/windpiger/repos","events_url":"https://api.github.com/users/windpiger/events{/privacy}","received_events_url":"https://api.github.com/users/windpiger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/windpiger/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/windpiger/spark","forks_url":"https://api.github.com/repos/windpiger/spark/forks","keys_url":"https://api.github.com/repos/windpiger/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/windpiger/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/windpiger/spark/teams","hooks_url":"https://api.github.com/repos/windpiger/spark/hooks","issue_events_url":"https://api.github.com/repos/windpiger/spark/issues/events{/number}","events_url":"https://api.github.com/repos/windpiger/spark/events","assignees_url":"https://api.github.com/repos/windpiger/spark/assignees{/user}","branches_url":"https://api.github.com/repos/windpiger/spark/branches{/branch}","tags_url":"https://api.github.com/repos/windpiger/spark/tags","blobs_url":"https://api.github.com/repos/windpiger/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/windpiger/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/windpiger/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/windpiger/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/windpiger/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/windpiger/spark/languages","stargazers_url":"https://api.github.com/repos/windpiger/spark/stargazers","contributors_url":"https://api.github.com/repos/windpiger/spark/contributors","subscribers_url":"https://api.github.com/repos/windpiger/spark/subscribers","subscription_url":"https://api.github.com/repos/windpiger/spark/subscription","commits_url":"https://api.github.com/repos/windpiger/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/windpiger/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/windpiger/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/windpiger/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/windpiger/spark/contents/{+path}","compare_url":"https://api.github.com/repos/windpiger/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/windpiger/spark/merges","archive_url":"https://api.github.com/repos/windpiger/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/windpiger/spark/downloads","issues_url":"https://api.github.com/repos/windpiger/spark/issues{/number}","pulls_url":"https://api.github.com/repos/windpiger/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/windpiger/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/windpiger/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/windpiger/spark/labels{/name}","releases_url":"https://api.github.com/repos/windpiger/spark/releases{/id}","deployments_url":"https://api.github.com/repos/windpiger/spark/deployments","created_at":"2016-10-11T08:59:56Z","updated_at":"2016-10-11T09:00:21Z","pushed_at":"2017-02-23T15:09:24Z","git_url":"git://github.com/windpiger/spark.git","ssh_url":"git@github.com:windpiger/spark.git","clone_url":"https://github.com/windpiger/spark.git","svn_url":"https://github.com/windpiger/spark","homepage":null,"size":262581,"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":"776b8f17cfc687a57c005a421a81e591c8d44a3f","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}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2017-02-23T23:57:16Z","pushed_at":"2017-02-24T01:37:39Z","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":263680,"stargazers_count":11780,"watchers_count":11780,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11070,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":452,"forks":11070,"open_issues":452,"watchers":11780,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/16996"},"html":{"href":"https://github.com/apache/spark/pull/16996"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/16996"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/16996/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/16996/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/16996/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/1d18636c0b27a25e504eb1ff273354cf6a87e99d"}}}}
{"actor":{"display_login":"windpiger"}}