Github user tsudukim commented on a diff in the pull request:
https://github.com/apache/spark/pull/5447#discussion_r28302293
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -1659,9 +1659,14 @@ private[spark] object Utils extends Logging {
val windowsDrive = "([a-zA-Z])".r
/**
- * Format a Windows path such that it can be safely passed to a URI.
+ * Format a path such that it can be safely passed to a URI.
*/
- def formatWindowsPath(path: String): String = path.replace("\\", "/")
+ def formatPath(path: String, windows: Boolean): String = {
+ val formatted = path.replace(" ", "%20")
--- End diff --
Do you mean we should assume `path` never contains fragment?
If we execute `bin/spark-shell --jars hdfs:/path/to/jar1.jar`, URI-style
string is passed to `path`.
So I thought `path` may have fragment. (though I wonder if there are any
good working example of the path with fragment...)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]