Skip to content

Commit 7126547

Browse files
committed
Do not let Yarn Shuffle Server retry its server port.
1 parent 8a53de1 commit 7126547

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

network/yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ private boolean isAuthenticationEnabled() {
9898
*/
9999
@Override
100100
protected void serviceInit(Configuration conf) {
101+
102+
// It's better to let the NodeManager get down rather than take a port retry
103+
// when `spark.shuffle.service.port` has been conflicted during starting
104+
// the Spark Yarn Shuffle Server, because the retry mechanism will make the
105+
// inconsistency of shuffle port and also make client fail to find the port.
106+
conf.setInt("spark.port.maxRetries", 0);
107+
101108
TransportConf transportConf = new TransportConf(new HadoopConfigProvider(conf));
102109
// If authentication is enabled, set up the shuffle server to use a
103110
// special RPC handler that filters out unauthenticated fetch requests

0 commit comments

Comments
 (0)