{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/20715","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/20715/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/20715/comments","events_url":"https://api.github.com/repos/apache/spark/issues/20715/events","html_url":"https://github.com/apache/spark/pull/20715","id":301651370,"number":20715,"title":"[SPARK-23434][SQL][BRANCH-2.2] Spark should not warn `metadata directory` for a HDFS file path","user":{"login":"dongjoon-hyun","id":9700541,"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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-02T04:40:50Z","updated_at":"2018-03-02T04:42:58Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/20715","html_url":"https://github.com/apache/spark/pull/20715","diff_url":"https://github.com/apache/spark/pull/20715.diff","patch_url":"https://github.com/apache/spark/pull/20715.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nIn a kerberized cluster, when Spark reads a file path (e.g. `people.json`), it warns with a wrong warning message during looking up `people.json/_spark_metadata`. The root cause of this situation is the difference between `LocalFileSystem` and `DistributedFileSystem`. `LocalFileSystem.exists()` returns `false`, but `DistributedFileSystem.exists` raises `org.apache.hadoop.security.AccessControlException`.\r\n\r\n```scala\r\nscala> spark.version\r\nres0: String = 2.4.0-SNAPSHOT\r\n\r\nscala> spark.read.json(\"file:///usr/hdp/current/spark-client/examples/src/main/resources/people.json\").show\r\n+----+-------+\r\n| age|   name|\r\n+----+-------+\r\n|null|Michael|\r\n|  30|   Andy|\r\n|  19| Justin|\r\n+----+-------+\r\n\r\nscala> spark.read.json(\"hdfs:///tmp/people.json\")\r\n18/02/15 05:00:48 WARN streaming.FileStreamSink: Error while looking for metadata directory.\r\n18/02/15 05:00:48 WARN streaming.FileStreamSink: Error while looking for metadata directory.\r\n```\r\n\r\nAfter this PR,\r\n```scala\r\nscala> spark.read.json(\"hdfs:///tmp/people.json\").show\r\n+----+-------+\r\n| age|   name|\r\n+----+-------+\r\n|null|Michael|\r\n|  30|   Andy|\r\n|  19| Justin|\r\n+----+-------+\r\n```\r\n\r\n## How was this patch tested?\r\n\r\nManual."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/369818567","html_url":"https://github.com/apache/spark/pull/20715#issuecomment-369818567","issue_url":"https://api.github.com/repos/apache/spark/issues/20715","id":369818567,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars1.githubusercontent.com/u/8108735?v=4","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":"2018-03-02T04:42:58Z","updated_at":"2018-03-02T04:42:58Z","author_association":"NONE","body":"**[Test build #87874 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/87874/testReport)** for PR 20715 at commit [`314fae2`](https://github.com/apache/spark/commit/314fae2d36a3b0916fd6e04713a923f1a6f203c2)."}}
{"actor":{"display_login":"SparkQA"}}