Skip to content

Commit

Permalink
fix StorageUtils.externalShuffleServicePort
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngone51 committed Jan 15, 2025
1 parent 61466a5 commit 6bb1f60
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ private[spark] object StorageUtils extends Logging {
* set through the Hadoop configuration as the server is launched in the Yarn NM.
*/
def externalShuffleServicePort(conf: SparkConf): Int = {
if (Utils.isLocalSparkCluster(conf)) {
assert(sys.env.contains(ExternalShuffleService.TESTING_ESS_PORT_ENV),
s"${ExternalShuffleService.TESTING_ESS_PORT_ENV} is not available")
if (sys.env.contains(ExternalShuffleService.TESTING_ESS_PORT_ENV)) {
assert(Utils.isLocalSparkCluster(conf), s"${ExternalShuffleService.TESTING_ESS_PORT_ENV} " +
s"should only be set in local Spark cluster")
val port = sys.env(ExternalShuffleService.TESTING_ESS_PORT_ENV).toInt
if (conf.contains(config.SHUFFLE_SERVICE_PORT.key)) {
logWarning(log"Setting external shuffle service port in Spark local cluster " +
Expand Down

0 comments on commit 6bb1f60

Please sign in to comment.