Github user zuotingbing commented on a diff in the pull request:
https://github.com/apache/spark/pull/16614#discussion_r97032463
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
@@ -93,10 +94,12 @@ private[history] class FsHistoryProvider(conf:
SparkConf, clock: Clock)
private val NUM_PROCESSING_THREADS =
conf.getInt(SPARK_HISTORY_FS_NUM_REPLAY_THREADS,
Math.ceil(Runtime.getRuntime.availableProcessors() / 4f).toInt)
- private val logDir = conf.getOption("spark.history.fs.logDirectory")
+ private val logURIString =
conf.getOption("spark.history.fs.logDirectory")
.map { d => Utils.resolveURI(d).toString }
.getOrElse(DEFAULT_LOG_DIR)
+ private val logDir = URLDecoder.decode(logURIString, "UTF-8")
--- End diff --
Yes you are right. I think the logic in Utils:resolveURI(path: String)
seems not correct. When the path is "hdfs://namenode:9000/a b", "new
URI(path)" will throws URISyntaxException and return a URI with "file" scheme
instead of âhdfsâ scheme .
To avoid this maybe we can use Path.getFileSystem to get the right
filesystem. Thank you.
---
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]