Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-13889][YARN] Fix integer overflow when calculating the max num…
…ber of executor failure ## What changes were proposed in this pull request? The max number of executor failure before failing the application is default to twice the maximum number of executors if dynamic allocation is enabled. The default value for "spark.dynamicAllocation.maxExecutors" is Int.MaxValue. So this causes an integer overflow and a wrong result. The calculated value of the default max number of executor failure is 3. This PR adds a check to avoid the overflow. ## How was this patch tested? It tests if the value is greater that Int.MaxValue / 2 to avoid the overflow when it multiplies 2. Author: Carson Wang <carson.wang@intel.com> Closes apache#11713 from carsonwang/IntOverflow.
- Loading branch information