You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by neoremind <gi...@git.apache.org> on 2017/08/11 14:19:24 UTC

[GitHub] spark pull request #18922: [SPARK-21701][CORE] Enable RPC client to use SO_R...

GitHub user neoremind opened a pull request:

    https://github.com/apache/spark/pull/18922

    [SPARK-21701][CORE] Enable RPC client to use SO_RCVBUF, SO_SNDBUF and SO_BACKLOG in SparkConf

    ## What changes were proposed in this pull request?
    
    1. TCP parameters like SO_RCVBUF, SO_SNDBUF and SO_BACKLOG can be set in `SparkConf`, and `org.apache.spark.network.server.TransportServer` can use those parameters to build server by leveraging netty. But for `TransportClientFactory`, there is no such way to set those parameters from `SparkConf`. This could be inconsistent in server and client side when people set parameters in `SparkConf`. So this PR make RPC client to be enable to use those TCP parameters as well.
    
    2. Add some comments to `MessageDecoder` class to show how wire format looks like for a RPC message and draw a vivid graph to present to detailed wire protocol.
    
    ## How was this patch tested?
    Existing tests and refine asking non-existent endpoint test case in `RpcEnvSuite`.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/neoremind/spark SPARK-21701

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18922.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18922
    
----
commit 09734e2a1cf611bfb05e5873f55e9423f8851fe8
Author: xu.zhang <xu...@hulu.com>
Date:   2017-08-11T14:06:15Z

    1.	Enable RPC client to use ` SO_RCVBUF` and ` SO_SNDBUF` and `SO_BACKLOG` in SparkConf.
    2.	Add Javadoc comment in MessageEncoder class.
    3.	Refine test case of asking non-existent endpoint in RPC test suite.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18922: [SPARK-21701][CORE] Enable RPC client to use SO_RCVBUF, ...

Posted by neoremind <gi...@git.apache.org>.
Github user neoremind commented on the issue:

    https://github.com/apache/spark/pull/18922
  
    @jerryshao Thanks for your reviewing! Per your advice, I have separated the issue into different PRs, 
    https://github.com/apache/spark/pull/18964
    and
    https://github.com/apache/spark/pull/18965


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18922: [SPARK-21701][CORE] Enable RPC client to use SO_R...

Posted by neoremind <gi...@git.apache.org>.
Github user neoremind closed the pull request at:

    https://github.com/apache/spark/pull/18922


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18922: [SPARK-21701][CORE] Enable RPC client to use SO_RCVBUF, ...

Posted by neoremind <gi...@git.apache.org>.
Github user neoremind commented on the issue:

    https://github.com/apache/spark/pull/18922
  
    @zsxwing Would you mind verifying the patch for me? I notice you have contributed to rpc module in spark. Many thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18922: [SPARK-21701][CORE] Enable RPC client to use SO_RCVBUF, ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18922
  
    Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18922: [SPARK-21701][CORE] Enable RPC client to use SO_RCVBUF, ...

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on the issue:

    https://github.com/apache/spark/pull/18922
  
    @neoremind can we separate different issues into different PRs? I saw you add several different fixes other than the PR title described.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18922: [SPARK-21701][CORE] Enable RPC client to use SO_R...

Posted by neoremind <gi...@git.apache.org>.
Github user neoremind commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18922#discussion_r133467528
  
    --- Diff: common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java ---
    @@ -210,6 +210,18 @@ private TransportClient createClient(InetSocketAddress address)
           .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, conf.connectionTimeoutMs())
           .option(ChannelOption.ALLOCATOR, pooledAllocator);
     
    +    if (conf.backLog() > 0) {
    +      bootstrap.option(ChannelOption.SO_BACKLOG, conf.backLog());
    --- End diff --
    
    I see your thoughts. I will eliminate the setting of the param.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18922: [SPARK-21701][CORE] Enable RPC client to use SO_R...

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18922#discussion_r133387011
  
    --- Diff: common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java ---
    @@ -210,6 +210,18 @@ private TransportClient createClient(InetSocketAddress address)
           .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, conf.connectionTimeoutMs())
           .option(ChannelOption.ALLOCATOR, pooledAllocator);
     
    +    if (conf.backLog() > 0) {
    +      bootstrap.option(ChannelOption.SO_BACKLOG, conf.backLog());
    --- End diff --
    
    It is really used for Client bootstrap? AFAIK backlog is mainly used in server side to cache the incoming connections.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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