Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ private void init(String hostToBind, int portToBind) {
bootstrap.childHandler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(SocketChannel ch) {
logger.debug("New connection accepted for remote address {}.", ch.remoteAddress());

RpcHandler rpcHandler = appRpcHandler;
for (TransportServerBootstrap bootstrap : bootstraps) {
rpcHandler = bootstrap.doBootstrap(ch, rpcHandler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public int numConnectionsPerPeer() {
return conf.getInt(SPARK_NETWORK_IO_NUMCONNECTIONSPERPEER_KEY, 1);
}

/** Requested maximum length of the queue of incoming connections. Default -1 for no backlog. */
public int backLog() { return conf.getInt(SPARK_NETWORK_IO_BACKLOG_KEY, -1); }
/** Requested maximum length of the queue of incoming connections. Default is 64. */
public int backLog() { return conf.getInt(SPARK_NETWORK_IO_BACKLOG_KEY, 64); }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the different between setting to -1 or to 64 as a default? does this change any existing behavior?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the default previously was effectively 50 from the PR comments

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just being explicit, in case there are differences between various JREs. For the most common ones, at least, the default was 50.


/** Number of threads used in the server thread pool. Default to 0, which is 2x#cores. */
public int serverThreads() { return conf.getInt(SPARK_NETWORK_IO_SERVERTHREADS_KEY, 0); }
Expand Down
20 changes: 20 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,17 @@ Apart from these, the following properties are also available, and may be useful
is 15 seconds by default, calculated as <code>maxRetries * retryWait</code>.
</td>
</tr>
<tr>
<td><code>spark.shuffle.io.backLog</code></td>
<td>64</td>
<td>
Length of the accept queue for the shuffle service. For large applications, this value may
need to be increased, so that incoming connections are not dropped if the service cannot keep
up with a large number of connections arriving in a short period of time. This needs to
be configured wherever the shuffle service itself is running, which may be outside of the
application (see <code>spark.shuffle.service.enabled</code> option below).
</td>
</tr>
<tr>
<td><code>spark.shuffle.service.enabled</code></td>
<td>false</td>
Expand Down Expand Up @@ -1515,6 +1526,15 @@ Apart from these, the following properties are also available, and may be useful
This is used for communicating with the executors and the standalone Master.
</td>
</tr>
<tr>
<td><code>spark.rpc.io.backLog</code></td>
<td>64</td>
<td>
Length of the accept queue for the RPC server. For large applications, this value may
need to be increased, so that incoming connections are not dropped when a large number of
connections arrives in a short period of time.
</td>
</tr>
<tr>
<td><code>spark.network.timeout</code></td>
<td>120s</td>
Expand Down