You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rednaxelafx <gi...@git.apache.org> on 2017/05/24 18:52:37 UTC

[GitHub] spark pull request #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName shoul...

GitHub user rednaxelafx opened a pull request:

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

    [SPARK-20872][SQL] ShuffleExchange.nodeName should handle null coordinator

    ## What changes were proposed in this pull request?
    
    A one-liner change in `ShuffleExchange.nodeName` to cover the case when `coordinator` is `null`, so that the match expression is exhaustive.
    
    Please refer to [SPARK-20872](https://issues.apache.org/jira/browse/SPARK-20872) for a description of the symptoms.
    
    ## How was this patch tested?
    
    Manually tested this change with a case where the `coordinator` is null to make sure `ShuffleExchange.nodeName` doesn't throw a `MatchError` any more.


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

    $ git pull https://github.com/rednaxelafx/apache-spark shuffleexchange-nodename

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

    https://github.com/apache/spark/pull/18095.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 #18095
    
----
commit 23aff2a468b9b1522f6520489bdca2ee7389a10a
Author: Kris Mok <kr...@databricks.com>
Date:   2017-05-24T18:44:43Z

    SPARK-20872: make ShuffleExchange.nodeName handle null coordinator

----


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName shoul...

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

    https://github.com/apache/spark/pull/18095#discussion_r118384528
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchange.scala ---
    @@ -40,14 +40,17 @@ case class ShuffleExchange(
         child: SparkPlan,
         @transient coordinator: Option[ExchangeCoordinator]) extends Exchange {
     
    +  // NOTE: coordinator can be null after serialization/deserialization,
    +  //       e.g. it can be null on the Executor side
    +
    --- End diff --
    
    Sounds good to me.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    Merged build finished. Test PASSed.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName shoul...

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

    https://github.com/apache/spark/pull/18095#discussion_r118382726
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchange.scala ---
    @@ -40,14 +40,17 @@ case class ShuffleExchange(
         child: SparkPlan,
         @transient coordinator: Option[ExchangeCoordinator]) extends Exchange {
     
    +  // NOTE: coordinator can be null after serialization/deserialization,
    +  //       e.g. it can be null on the Executor side
    +
    --- End diff --
    
    This note is meant to be a class internal comment, and not a comment on `override lazy val metrics = Map(`, so I'd say leaving the added empty line here makes more sense. Would you agree?


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    Merged build finished. Test PASSed.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    Updated patch to address the comments on making two other match conditions on `coordinator` so that they're consistently handled.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77307/
    Test PASSed.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName shoul...

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

    https://github.com/apache/spark/pull/18095#discussion_r118361491
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchange.scala ---
    @@ -47,7 +47,7 @@ case class ShuffleExchange(
         val extraInfo = coordinator match {
           case Some(exchangeCoordinator) =>
             s"(coordinator id: ${System.identityHashCode(exchangeCoordinator)})"
    -      case None => ""
    +      case _ => ""
    --- End diff --
    
    Let's do it then, that will enable future readers easier to understand the code.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    Also cc @gatorsmile 


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    **[Test build #77307 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77307/testReport)** for PR 18095 at commit [`23aff2a`](https://github.com/apache/spark/commit/23aff2a468b9b1522f6520489bdca2ee7389a10a).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77309/
    Test PASSed.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    **[Test build #77307 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77307/testReport)** for PR 18095 at commit [`23aff2a`](https://github.com/apache/spark/commit/23aff2a468b9b1522f6520489bdca2ee7389a10a).


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    LGTM, and I think it would be great if you can also address Sameer's comment.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    **[Test build #77309 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77309/testReport)** for PR 18095 at commit [`a65ac4f`](https://github.com/apache/spark/commit/a65ac4fe14f4bd274e62da58103ea8cbdb737c11).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    Thanks, LGTM too


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName shoul...

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

    https://github.com/apache/spark/pull/18095#discussion_r118359189
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchange.scala ---
    @@ -47,7 +47,7 @@ case class ShuffleExchange(
         val extraInfo = coordinator match {
           case Some(exchangeCoordinator) =>
             s"(coordinator id: ${System.identityHashCode(exchangeCoordinator)})"
    -      case None => ""
    +      case _ => ""
    --- End diff --
    
    I had left the other match conditions unchanged so that this change itself can be small and contained, because I'd need to verify whether or not the other match conditions should only be invoked with some valid `Option[ExchangeCoordinator]` value.
    
    Anyway, I checked the two other `coordinator match { ... }` cases below, and both of them should still work fine to change to match on `_` instead of `None`. But semantically both of these cases should only be invoked on the Driver side, where the `coordinator` shouldn't be `null`. I'm okay to change these two cases if reviewers suggest so.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName shoul...

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

    https://github.com/apache/spark/pull/18095#discussion_r118365866
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchange.scala ---
    @@ -40,14 +40,17 @@ case class ShuffleExchange(
         child: SparkPlan,
         @transient coordinator: Option[ExchangeCoordinator]) extends Exchange {
     
    +  // NOTE: coordinator can be null after serialization/deserialization,
    +  //       e.g. it can be null on the Executor side
    +
    --- End diff --
    
    nit: remove this empty line.


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName shoul...

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

    https://github.com/apache/spark/pull/18095#discussion_r118339002
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchange.scala ---
    @@ -47,7 +47,7 @@ case class ShuffleExchange(
         val extraInfo = coordinator match {
           case Some(exchangeCoordinator) =>
             s"(coordinator id: ${System.identityHashCode(exchangeCoordinator)})"
    -      case None => ""
    +      case _ => ""
    --- End diff --
    
    should we adjust this pattern match condition at other places in the class below as well?


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    **[Test build #77309 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77309/testReport)** for PR 18095 at commit [`a65ac4f`](https://github.com/apache/spark/commit/a65ac4fe14f4bd274e62da58103ea8cbdb737c11).


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName shoul...

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

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


---
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 #18095: [SPARK-20872][SQL] ShuffleExchange.nodeName should handl...

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

    https://github.com/apache/spark/pull/18095
  
    Thanks! Merging to master/2.2


---
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