{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/85865112","pull_request_review_id":6554755,"id":85865112,"diff_hunk":"@@ -1700,19 +1700,34 @@ class SparkContext(config: SparkConf) extends Logging {\n    * Adds a JAR dependency for all tasks to be executed on this SparkContext in the future.\n    * The `path` passed can be either a local file, a file in HDFS (or other Hadoop-supported\n    * filesystems), an HTTP, HTTPS or FTP URI, or local:/path for a file on every worker node.\n+   * If addToCurrentClassLoader is true, attempt to add the new class to the current threads' class\n+   * loader. In general adding to the current threads' class loader will impact all other\n+   * application threads unless they have explicitly changed their class loader.\n    */\n   def addJar(path: String) {\n+    addJar(path, false)\n+  }\n+\n+  def addJar(path: String, addToCurrentClassLoader: Boolean) {\n     if (path == null) {\n       logWarning(\"null specified as parameter to addJar\")\n     } else {\n       var key = \"\"\n-      if (path.contains(\"\\\\\")) {\n+\n+      val uri = if (path.contains(\"\\\\\")) {\n         // For local paths with backslashes on Windows, URI throws an exception\n-        key = env.rpcEnv.fileServer.addJar(new File(path))","path":"core/src/main/scala/org/apache/spark/SparkContext.scala","position":21,"original_position":21,"commit_id":"fccb141dd9e6d36db242997f1c6f3e007caa514f","original_commit_id":"fccb141dd9e6d36db242997f1c6f3e007caa514f","user":{"login":"mariusvniekerk","id":73973,"avatar_url":"https://avatars.githubusercontent.com/u/73973?v=3","gravatar_id":"","url":"https://api.github.com/users/mariusvniekerk","html_url":"https://github.com/mariusvniekerk","followers_url":"https://api.github.com/users/mariusvniekerk/followers","following_url":"https://api.github.com/users/mariusvniekerk/following{/other_user}","gists_url":"https://api.github.com/users/mariusvniekerk/gists{/gist_id}","starred_url":"https://api.github.com/users/mariusvniekerk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariusvniekerk/subscriptions","organizations_url":"https://api.github.com/users/mariusvniekerk/orgs","repos_url":"https://api.github.com/users/mariusvniekerk/repos","events_url":"https://api.github.com/users/mariusvniekerk/events{/privacy}","received_events_url":"https://api.github.com/users/mariusvniekerk/received_events","type":"User","site_admin":false},"body":"So this change gets the URI for the windows URI which is used later on to construct a File instance.  That should allow the windows special case to work.  ","created_at":"2016-11-01T01:41:03Z","updated_at":"2016-11-01T01:41:04Z","html_url":"https://github.com/apache/spark/pull/15666#discussion_r85865112","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/15666","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/85865112"},"html":{"href":"https://github.com/apache/spark/pull/15666#discussion_r85865112"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/15666"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/15666","id":91305184,"html_url":"https://github.com/apache/spark/pull/15666","diff_url":"https://github.com/apache/spark/pull/15666.diff","patch_url":"https://github.com/apache/spark/pull/15666.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/15666","number":15666,"state":"open","locked":false,"title":"[SPARK-11421] [Core][Python][R] Added ability for addJar to augment the current classloader","user":{"login":"mariusvniekerk","id":73973,"avatar_url":"https://avatars.githubusercontent.com/u/73973?v=3","gravatar_id":"","url":"https://api.github.com/users/mariusvniekerk","html_url":"https://github.com/mariusvniekerk","followers_url":"https://api.github.com/users/mariusvniekerk/followers","following_url":"https://api.github.com/users/mariusvniekerk/following{/other_user}","gists_url":"https://api.github.com/users/mariusvniekerk/gists{/gist_id}","starred_url":"https://api.github.com/users/mariusvniekerk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariusvniekerk/subscriptions","organizations_url":"https://api.github.com/users/mariusvniekerk/orgs","repos_url":"https://api.github.com/users/mariusvniekerk/repos","events_url":"https://api.github.com/users/mariusvniekerk/events{/privacy}","received_events_url":"https://api.github.com/users/mariusvniekerk/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\n\nAdds a flag to sc.addJar to add the jar to the current classloader\n## How was this patch tested?\n\nUnit tests, manual tests\n\nThis is a continuation of the pull request in https://github.com/apache/spark/pull/9313 and is mostly a rebase of that moved to master with SparkR additions.\n\ncc @holdenk \n","created_at":"2016-10-28T00:37:03Z","updated_at":"2016-11-01T01:41:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"970ee0c44b23f422c022bfdea320463b482b4a11","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/15666/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/15666/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/15666/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/fccb141dd9e6d36db242997f1c6f3e007caa514f","head":{"label":"mariusvniekerk:SPARK-11421","ref":"SPARK-11421","sha":"fccb141dd9e6d36db242997f1c6f3e007caa514f","user":{"login":"mariusvniekerk","id":73973,"avatar_url":"https://avatars.githubusercontent.com/u/73973?v=3","gravatar_id":"","url":"https://api.github.com/users/mariusvniekerk","html_url":"https://github.com/mariusvniekerk","followers_url":"https://api.github.com/users/mariusvniekerk/followers","following_url":"https://api.github.com/users/mariusvniekerk/following{/other_user}","gists_url":"https://api.github.com/users/mariusvniekerk/gists{/gist_id}","starred_url":"https://api.github.com/users/mariusvniekerk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariusvniekerk/subscriptions","organizations_url":"https://api.github.com/users/mariusvniekerk/orgs","repos_url":"https://api.github.com/users/mariusvniekerk/repos","events_url":"https://api.github.com/users/mariusvniekerk/events{/privacy}","received_events_url":"https://api.github.com/users/mariusvniekerk/received_events","type":"User","site_admin":false},"repo":{"id":44324240,"name":"spark","full_name":"mariusvniekerk/spark","owner":{"login":"mariusvniekerk","id":73973,"avatar_url":"https://avatars.githubusercontent.com/u/73973?v=3","gravatar_id":"","url":"https://api.github.com/users/mariusvniekerk","html_url":"https://github.com/mariusvniekerk","followers_url":"https://api.github.com/users/mariusvniekerk/followers","following_url":"https://api.github.com/users/mariusvniekerk/following{/other_user}","gists_url":"https://api.github.com/users/mariusvniekerk/gists{/gist_id}","starred_url":"https://api.github.com/users/mariusvniekerk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariusvniekerk/subscriptions","organizations_url":"https://api.github.com/users/mariusvniekerk/orgs","repos_url":"https://api.github.com/users/mariusvniekerk/repos","events_url":"https://api.github.com/users/mariusvniekerk/events{/privacy}","received_events_url":"https://api.github.com/users/mariusvniekerk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mariusvniekerk/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/mariusvniekerk/spark","forks_url":"https://api.github.com/repos/mariusvniekerk/spark/forks","keys_url":"https://api.github.com/repos/mariusvniekerk/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mariusvniekerk/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mariusvniekerk/spark/teams","hooks_url":"https://api.github.com/repos/mariusvniekerk/spark/hooks","issue_events_url":"https://api.github.com/repos/mariusvniekerk/spark/issues/events{/number}","events_url":"https://api.github.com/repos/mariusvniekerk/spark/events","assignees_url":"https://api.github.com/repos/mariusvniekerk/spark/assignees{/user}","branches_url":"https://api.github.com/repos/mariusvniekerk/spark/branches{/branch}","tags_url":"https://api.github.com/repos/mariusvniekerk/spark/tags","blobs_url":"https://api.github.com/repos/mariusvniekerk/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mariusvniekerk/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mariusvniekerk/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/mariusvniekerk/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mariusvniekerk/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/mariusvniekerk/spark/languages","stargazers_url":"https://api.github.com/repos/mariusvniekerk/spark/stargazers","contributors_url":"https://api.github.com/repos/mariusvniekerk/spark/contributors","subscribers_url":"https://api.github.com/repos/mariusvniekerk/spark/subscribers","subscription_url":"https://api.github.com/repos/mariusvniekerk/spark/subscription","commits_url":"https://api.github.com/repos/mariusvniekerk/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/mariusvniekerk/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/mariusvniekerk/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/mariusvniekerk/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/mariusvniekerk/spark/contents/{+path}","compare_url":"https://api.github.com/repos/mariusvniekerk/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mariusvniekerk/spark/merges","archive_url":"https://api.github.com/repos/mariusvniekerk/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mariusvniekerk/spark/downloads","issues_url":"https://api.github.com/repos/mariusvniekerk/spark/issues{/number}","pulls_url":"https://api.github.com/repos/mariusvniekerk/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/mariusvniekerk/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/mariusvniekerk/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mariusvniekerk/spark/labels{/name}","releases_url":"https://api.github.com/repos/mariusvniekerk/spark/releases{/id}","deployments_url":"https://api.github.com/repos/mariusvniekerk/spark/deployments","created_at":"2015-10-15T14:46:29Z","updated_at":"2016-10-28T00:32:53Z","pushed_at":"2016-10-30T00:16:09Z","git_url":"git://github.com/mariusvniekerk/spark.git","ssh_url":"git@github.com:mariusvniekerk/spark.git","clone_url":"https://github.com/mariusvniekerk/spark.git","svn_url":"https://github.com/mariusvniekerk/spark","homepage":null,"size":239027,"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":"ccb11543048dccd4cc590a8db1df1d9d5847d112","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":"2016-10-31T22:11:43Z","pushed_at":"2016-11-01T01:31:53Z","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":604443,"stargazers_count":10562,"watchers_count":10562,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9844,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":480,"forks":9844,"open_issues":480,"watchers":10562,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/15666"},"html":{"href":"https://github.com/apache/spark/pull/15666"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/15666"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/15666/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/15666/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/15666/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/fccb141dd9e6d36db242997f1c6f3e007caa514f"}}}}
{"actor":{"display_login":"mariusvniekerk"}}