maheshk114 commented on code in PR #45228:
URL: https://github.com/apache/spark/pull/45228#discussion_r1542849547
##########
core/src/main/scala/org/apache/spark/storage/FallbackStorage.scala:
##########
@@ -110,14 +158,35 @@ private[spark] object FallbackStorage extends Logging {
/** We use one block manager id as a place holder. */
val FALLBACK_BLOCK_MANAGER_ID: BlockManagerId = BlockManagerId("fallback",
"remote", 7337)
- def getFallbackStorage(conf: SparkConf): Option[FallbackStorage] = {
- if (conf.get(STORAGE_DECOMMISSION_FALLBACK_STORAGE_PATH).isDefined) {
- Some(new FallbackStorage(conf))
+ // There should be only one fallback storage thread pool per executor.
+ var fallbackStorage: Option[FallbackStorage] = None
+ def getFallbackStorage(conf: SparkConf): Option[FallbackStorage] =
this.synchronized {
+ if (conf != null &&
conf.get(STORAGE_DECOMMISSION_FALLBACK_STORAGE_PATH).isDefined) {
Review Comment:
Some unit tests scenario, the conf is not initialized.
--
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]