gnanda commented on code in PR #54529:
URL: https://github.com/apache/spark/pull/54529#discussion_r2881398146
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/StateStoreSuite.scala:
##########
@@ -1547,6 +1547,35 @@ class StateStoreSuite extends
StateStoreSuiteBase[HDFSBackedStateStoreProvider]
}
}
+ test("fileChecksumThreadPoolSize propagates to
ChecksumCheckpointFileManager") {
+ Seq(0, 1, 6).foreach { numThreads =>
+ withTempDir { dir =>
+ val sqlConf = SQLConf.get.clone()
+
sqlConf.setConfString(SQLConf.STREAMING_CHECKPOINT_FILE_CHECKSUM_ENABLED.key,
"true")
+ sqlConf.setConfString(
+ SQLConf.STATE_STORE_FILE_CHECKSUM_THREAD_POOL_SIZE.key,
numThreads.toString)
+
+ val provider = newStoreProvider(
+ opId = Random.nextInt(), partition = 0, dir = dir.getCanonicalPath,
+ sqlConfOpt = Some(sqlConf))
+ val fileManagerMethod =
PrivateMethod[CheckpointFileManager](Symbol("fm"))
+ val fm = provider invokePrivate fileManagerMethod()
+
+ assert(fm.isInstanceOf[ChecksumCheckpointFileManager])
+ assert(fm.asInstanceOf[ChecksumCheckpointFileManager].numThreads ===
numThreads)
+ provider.close()
+ }
+ }
+ }
Review Comment:
Added
--
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]