HeartSaVioR commented on code in PR #41099:
URL: https://github.com/apache/spark/pull/41099#discussion_r1198779061


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBFileManager.scala:
##########
@@ -134,6 +137,27 @@ class RocksDBFileManager(
   private val onlyZipFiles = new PathFilter {
     override def accept(path: Path): Boolean = path.toString.endsWith(".zip")
   }
+  private val onlyDeltaFiles = new PathFilter {
+    override def accept(path: Path): Boolean = 
path.toString.endsWith(".changelog")
+  }
+
+  private lazy val sparkConf = Option(SparkEnv.get).map(_.conf).getOrElse(new 
SparkConf)
+
+  private def codec = CompressionCodec.createCodec(sparkConf, codecName)
+
+  def getChangeLogWriter(version: Long): StateStoreChangelogWriter = {
+    val rootDir = new Path(dfsRootDir)
+    val deltaFile = dfsDeltaFile(version)
+    if (!fm.exists(rootDir)) fm.mkdirs(rootDir)
+    val changelogWriter = new StateStoreChangelogWriter(fm, deltaFile, codec)

Review Comment:
   (Or leave it as it is and check whether we restrict modification of the 
config like we do for number of shuffle partition.)



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to