As discussed in SPARK-22765, with
SPARK-21656, an executor will not idle out when there are pending tasks to run. When there is no task to run, an executor will die out after spark.dynamicAllocation.executorIdleTimeout, which is currently required to be greater than zero. However, for efficiency, a user should be able to specify that an executor can die out immediately w/o being required to be idle for at least 1s.
This is to make 0 a valid value for spark.dynamicAllocation.executorIdleTimeout, and special handling such a case might be needed.