woj-i commented on code in PR #40821:
URL: https://github.com/apache/spark/pull/40821#discussion_r1173378918
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSink.scala:
##########
@@ -68,8 +68,15 @@ object FileStreamSink extends Logging {
}
}
- def getMetadataLogPath(fs: FileSystem, path: Path, sqlConf: SQLConf): Path =
{
- val metadataDir = new Path(path, FileStreamSink.metadataDir)
+ def getMetadataLogPath(
+ hadoopConfiguration: Configuration,
+ path: Path,
+ sqlConf: SQLConf): Path = {
+ val metadataDir = sqlConf.streamingMetadataOutputPath match {
+ case Some(customPath) => new Path(customPath, FileStreamSink.metadataDir)
+ case None => new Path(path, FileStreamSink.metadataDir)
+ }
Review Comment:
This looks nice, but `streamingMetadataOutputPath` is `String` type, path is
`Path` type, so I would need to do something like
val metadataPath =
sqlConf.streamingMetadataOutputPath.getOrElse(path.toString)
that IMO is worse than match, because `path.toString` changes type of `path`
and then is used back in `Path()`
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]