cloud-fan commented on a change in pull request #27665: [SPARK-30623][Core]
Spark external shuffle allow disable of separate event loop group
URL: https://github.com/apache/spark/pull/27665#discussion_r397102478
##########
File path:
common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java
##########
@@ -339,12 +341,25 @@ public int chunkFetchHandlerThreads() {
return 0;
}
int chunkFetchHandlerThreadsPercent =
- conf.getInt("spark.shuffle.server.chunkFetchHandlerThreadsPercent", 100);
+
Integer.parseInt(conf.get("spark.shuffle.server.chunkFetchHandlerThreadsPercent"));
int threads =
this.serverThreads() > 0 ? this.serverThreads() : 2 *
NettyRuntime.availableProcessors();
return (int) Math.ceil(threads * (chunkFetchHandlerThreadsPercent /
100.0));
}
+ /**
+ * Whether to use a separate EventLoopGroup to process ChunkFetchRequest
messages, it is decided
+ * by the config `spark.shuffle.server.chunkFetchHandlerThreadsPercent` is
set or not.
+ */
+ public boolean separateChunkFetchRequest() {
+ try {
+ conf.get("spark.shuffle.server.chunkFetchHandlerThreadsPercent");
Review comment:
how about
`conf.getInt("spark.shuffle.server.chunkFetchHandlerThreadsPercent", 0) > 0`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]