{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/34573822","id":34573822,"diff_hunk":"@@ -248,19 +250,25 @@ class SparkHadoopUtil extends Logging {\n       dir: Path,\n       prefix: String,\n       exclusionSuffix: String): Array[FileStatus] = {\n-    val fileStatuses = remoteFs.listStatus(dir,\n-      new PathFilter {\n-        override def accept(path: Path): Boolean = {\n-          val name = path.getName\n-          name.startsWith(prefix) && !name.endsWith(exclusionSuffix)\n+    try {\n+      val fileStatuses = remoteFs.listStatus(dir,\n+        new PathFilter {\n+          override def accept(path: Path): Boolean = {\n+            val name = path.getName\n+            name.startsWith(prefix) && !name.endsWith(exclusionSuffix)\n+          }\n+        })\n+      Arrays.sort(fileStatuses, new Comparator[FileStatus] {\n+        override def compare(o1: FileStatus, o2: FileStatus): Int = {\n+          Longs.compare(o1.getModificationTime, o2.getModificationTime)\n         }\n       })\n-    Arrays.sort(fileStatuses, new Comparator[FileStatus] {\n-      override def compare(o1: FileStatus, o2: FileStatus): Int = {\n-        Longs.compare(o1.getModificationTime, o2.getModificationTime)\n-      }\n-    })\n-    fileStatuses\n+      fileStatuses\n+    } catch {\n+      case NonFatal(e) =>\n+        logWarning(\"Error while attempting to list files from application straging dir\", e)","path":"core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala","position":40,"original_position":40,"commit_id":"26f8bfa20f15b2a1be62d23b9b1d09a7b4b874d1","original_commit_id":"26f8bfa20f15b2a1be62d23b9b1d09a7b4b874d1","user":{"login":"tgravescs","id":4563792,"avatar_url":"https://avatars.githubusercontent.com/u/4563792?v=3","gravatar_id":"","url":"https://api.github.com/users/tgravescs","html_url":"https://github.com/tgravescs","followers_url":"https://api.github.com/users/tgravescs/followers","following_url":"https://api.github.com/users/tgravescs/following{/other_user}","gists_url":"https://api.github.com/users/tgravescs/gists{/gist_id}","starred_url":"https://api.github.com/users/tgravescs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgravescs/subscriptions","organizations_url":"https://api.github.com/users/tgravescs/orgs","repos_url":"https://api.github.com/users/tgravescs/repos","events_url":"https://api.github.com/users/tgravescs/events{/privacy}","received_events_url":"https://api.github.com/users/tgravescs/received_events","type":"User","site_admin":false},"body":"staging spelled wrong","created_at":"2015-07-14T14:31:56Z","updated_at":"2015-07-14T14:31:56Z","html_url":"https://github.com/apache/spark/pull/7394#discussion_r34573822","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/7394","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/34573822"},"html":{"href":"https://github.com/apache/spark/pull/7394#discussion_r34573822"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/7394"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/7394","id":39890366,"html_url":"https://github.com/apache/spark/pull/7394","diff_url":"https://github.com/apache/spark/pull/7394.diff","patch_url":"https://github.com/apache/spark/pull/7394.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/7394","number":7394,"state":"open","locked":false,"title":"[SPARK-8851][YARN] In Client mode, make sure the client logs in and updates tokens","user":{"login":"harishreedharan","id":1481194,"avatar_url":"https://avatars.githubusercontent.com/u/1481194?v=3","gravatar_id":"","url":"https://api.github.com/users/harishreedharan","html_url":"https://github.com/harishreedharan","followers_url":"https://api.github.com/users/harishreedharan/followers","following_url":"https://api.github.com/users/harishreedharan/following{/other_user}","gists_url":"https://api.github.com/users/harishreedharan/gists{/gist_id}","starred_url":"https://api.github.com/users/harishreedharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harishreedharan/subscriptions","organizations_url":"https://api.github.com/users/harishreedharan/orgs","repos_url":"https://api.github.com/users/harishreedharan/repos","events_url":"https://api.github.com/users/harishreedharan/events{/privacy}","received_events_url":"https://api.github.com/users/harishreedharan/received_events","type":"User","site_admin":false},"body":"In client side, the flow is SparkSubmit -> SparkContext -> yarn/Client. Since the yarn client only gets a cloned config and the staging dir is set here, it is not really possible to do re-logins in the SparkContext. So, do the initial logins in Spark Submit and do re-logins as we do now in the AM, but the Client behaves like an executor in this specific context and reads the credentials file to update the tokens. This way, even if the streaming context is started up from checkpoint - it is fine since we have logged in from SparkSubmit itself itself.","created_at":"2015-07-14T07:54:21Z","updated_at":"2015-07-14T14:31:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57e7cb83895b0430c8560b46b3e836fd4207f79a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/7394/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/7394/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/7394/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/26f8bfa20f15b2a1be62d23b9b1d09a7b4b874d1","head":{"label":"harishreedharan:yarn-client-login","ref":"yarn-client-login","sha":"26f8bfa20f15b2a1be62d23b9b1d09a7b4b874d1","user":{"login":"harishreedharan","id":1481194,"avatar_url":"https://avatars.githubusercontent.com/u/1481194?v=3","gravatar_id":"","url":"https://api.github.com/users/harishreedharan","html_url":"https://github.com/harishreedharan","followers_url":"https://api.github.com/users/harishreedharan/followers","following_url":"https://api.github.com/users/harishreedharan/following{/other_user}","gists_url":"https://api.github.com/users/harishreedharan/gists{/gist_id}","starred_url":"https://api.github.com/users/harishreedharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harishreedharan/subscriptions","organizations_url":"https://api.github.com/users/harishreedharan/orgs","repos_url":"https://api.github.com/users/harishreedharan/repos","events_url":"https://api.github.com/users/harishreedharan/events{/privacy}","received_events_url":"https://api.github.com/users/harishreedharan/received_events","type":"User","site_admin":false},"repo":{"id":18419952,"name":"spark","full_name":"harishreedharan/spark","owner":{"login":"harishreedharan","id":1481194,"avatar_url":"https://avatars.githubusercontent.com/u/1481194?v=3","gravatar_id":"","url":"https://api.github.com/users/harishreedharan","html_url":"https://github.com/harishreedharan","followers_url":"https://api.github.com/users/harishreedharan/followers","following_url":"https://api.github.com/users/harishreedharan/following{/other_user}","gists_url":"https://api.github.com/users/harishreedharan/gists{/gist_id}","starred_url":"https://api.github.com/users/harishreedharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harishreedharan/subscriptions","organizations_url":"https://api.github.com/users/harishreedharan/orgs","repos_url":"https://api.github.com/users/harishreedharan/repos","events_url":"https://api.github.com/users/harishreedharan/events{/privacy}","received_events_url":"https://api.github.com/users/harishreedharan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/harishreedharan/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/harishreedharan/spark","forks_url":"https://api.github.com/repos/harishreedharan/spark/forks","keys_url":"https://api.github.com/repos/harishreedharan/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harishreedharan/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harishreedharan/spark/teams","hooks_url":"https://api.github.com/repos/harishreedharan/spark/hooks","issue_events_url":"https://api.github.com/repos/harishreedharan/spark/issues/events{/number}","events_url":"https://api.github.com/repos/harishreedharan/spark/events","assignees_url":"https://api.github.com/repos/harishreedharan/spark/assignees{/user}","branches_url":"https://api.github.com/repos/harishreedharan/spark/branches{/branch}","tags_url":"https://api.github.com/repos/harishreedharan/spark/tags","blobs_url":"https://api.github.com/repos/harishreedharan/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harishreedharan/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harishreedharan/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/harishreedharan/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harishreedharan/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/harishreedharan/spark/languages","stargazers_url":"https://api.github.com/repos/harishreedharan/spark/stargazers","contributors_url":"https://api.github.com/repos/harishreedharan/spark/contributors","subscribers_url":"https://api.github.com/repos/harishreedharan/spark/subscribers","subscription_url":"https://api.github.com/repos/harishreedharan/spark/subscription","commits_url":"https://api.github.com/repos/harishreedharan/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/harishreedharan/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/harishreedharan/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/harishreedharan/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/harishreedharan/spark/contents/{+path}","compare_url":"https://api.github.com/repos/harishreedharan/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harishreedharan/spark/merges","archive_url":"https://api.github.com/repos/harishreedharan/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harishreedharan/spark/downloads","issues_url":"https://api.github.com/repos/harishreedharan/spark/issues{/number}","pulls_url":"https://api.github.com/repos/harishreedharan/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/harishreedharan/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/harishreedharan/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harishreedharan/spark/labels{/name}","releases_url":"https://api.github.com/repos/harishreedharan/spark/releases{/id}","created_at":"2014-04-03T22:17:22Z","updated_at":"2014-07-10T22:11:34Z","pushed_at":"2015-07-14T07:53:37Z","git_url":"git://github.com/harishreedharan/spark.git","ssh_url":"git@github.com:harishreedharan/spark.git","clone_url":"https://github.com/harishreedharan/spark.git","svn_url":"https://github.com/harishreedharan/spark","homepage":null,"size":106263,"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":"408b384de96b9dbe94945753f7947fbe84272ae1","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-07-14T13:25:43Z","pushed_at":"2015-07-14T14:26:16Z","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":1512303,"stargazers_count":4751,"watchers_count":4751,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4221,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":355,"forks":4221,"open_issues":355,"watchers":4751,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/7394"},"html":{"href":"https://github.com/apache/spark/pull/7394"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/7394"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/7394/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/7394/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/7394/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/26f8bfa20f15b2a1be62d23b9b1d09a7b4b874d1"}}}}