You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/01/07 02:33:42 UTC

[GitHub] kiszk commented on a change in pull request #23278: [SPARK-24920][Core] Allow sharing Netty's memory pool allocators

kiszk commented on a change in pull request #23278: [SPARK-24920][Core] Allow sharing Netty's memory pool allocators
URL: https://github.com/apache/spark/pull/23278#discussion_r245537668
 
 

 ##########
 File path: common/network-common/src/main/java/org/apache/spark/network/util/NettyUtils.java
 ##########
 @@ -95,6 +111,38 @@ public static String getRemoteAddress(Channel channel) {
     return "<unknown remote>";
   }
 
+  /**
+   * Returns the default number of threads for both the Netty client and server thread pools.
+   * If numUsableCores is 0, we will use Runtime get an approximate number of available cores.
+   */
+  public static int defaultNumThreads(int numUsableCores) {
+    final int availableCores;
 
 Review comment:
   nit: remove `final` 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org