Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11241#discussion_r53528644
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -135,6 +135,11 @@ private[spark] class BlockManager(
       // Whether to compress shuffle output temporarily spilled to disk
       private val compressShuffleSpill = 
conf.getBoolean("spark.shuffle.spill.compress", true)
     
    +  // Max number of failures before this block manager refreshes the block 
locations from the driver
    +  private val maxFailuresBeforeLocationRefresh =
    +    conf.getInt("spark.block.failures.beforeLocationRefresh", Int.MaxValue)
    --- End diff --
    
    I would just make this a constant instead of introducing another config:
    ```
    private[spark] object BlockManager {
      /**
       * Max number of failures when fetching a block remotely before 
refreshing the block's
       * locations from the driver. This is useful for cases where many 
executors fail at once,
       * e.g. dynamic allocation. (SPARK-13328)
       */
      private val REFRESH_LOCATION_FETCH_FAILURE_THRESHOLD = 10
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to