viirya commented on a change in pull request #34942:
URL: https://github.com/apache/spark/pull/34942#discussion_r771798813



##########
File path: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -130,10 +131,16 @@ private[history] class FsHistoryProvider(conf: SparkConf, 
clock: Clock)
   private val fastInProgressParsing = conf.get(FAST_IN_PROGRESS_PARSING)
 
   private val hybridStoreEnabled = conf.get(History.HYBRID_STORE_ENABLED)
+  private val hybridStoreDiskBackend = 
conf.get(History.HYBRID_STORE_DISK_BACKEND)
 
   // Visible for testing.
   private[history] val listing: KVStore = storePath.map { path =>
-    val dbPath = Files.createDirectories(new File(path, 
"listing.ldb").toPath()).toFile()
+    val dir = hybridStoreDiskBackend match {
+      case "leveldb" => "listing.ldb"
+      case "rocksdb" => "listing.rdb"
+      case db => throw new IllegalStateException(s"$db is not supported.")

Review comment:
       nit: `IllegalArgumentException`? KVUtils uses `IllegalArgumentException` 
for wrong disk backend config.




-- 
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]

Reply via email to