You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GrahamDennis <gi...@git.apache.org> on 2014/08/07 08:41:22 UTC

[GitHub] spark pull request: SPARK-2893: Do not swallow Exceptions when run...

GitHub user GrahamDennis opened a pull request:

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

    SPARK-2893: Do not swallow Exceptions when running a custom kryo registrator

    The previous behaviour of swallowing ClassNotFound exceptions when running a custom Kryo registrator could lead to difficult to debug problems later on at serialisation / deserialisation time, see SPARK-2878.  Instead it is better to fail fast.
    
    Added test case.

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

    $ git pull https://github.com/GrahamDennis/spark feature/spark-2893

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

    https://github.com/apache/spark/pull/1827.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 #1827
    
----
commit 5618dd13a293510ba0ad6ad51b2880819f1484bb
Author: Graham Dennis <gd...@palantir.com>
Date:   2014-08-07T06:40:26Z

    SPARK-2893: Do not swallow Exceptions when running a custom spark.kryo.registrator
    
    The previous behaviour of swallowing ClassNotFound exceptions when running a custom Kryo registrator could lead to difficult to debug problems later on at serialisation / deserialisation time, see SPARK-2878.  Instead it is better to fail fast.
    
    Added test case.

----


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by GrahamDennis <gi...@git.apache.org>.
Github user GrahamDennis commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52162377
  
    Great, 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 pull request: SPARK-2893: Do not swallow Exceptions when run...

Posted by GrahamDennis <gi...@git.apache.org>.
Github user GrahamDennis commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52155381
  
    I forgot to update the test case when I changed the exception message generated.  Fixed now.


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#discussion_r16223757
  
    --- Diff: core/src/test/scala/org/apache/spark/serializer/KryoSerializerSuite.scala ---
    @@ -207,6 +207,16 @@ class KryoSerializerSuite extends FunSuite with SharedSparkContext {
             .fold(new ClassWithoutNoArgConstructor(10))((t1, t2) => new ClassWithoutNoArgConstructor(t1.x + t2.x)).x
         assert(10 + control.sum === result)
       }
    +  
    +  test("kryo with nonexistant custom registrator should fail") {
    --- End diff --
    
    small typo : nonexistent


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by debasish83 <gi...@git.apache.org>.
Github user debasish83 commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52151623
  
    will this fix back-ported to 1.0.1 ? I am getting these nondeterministic exceptions on both 1.0.1 and 1.1.0-SNAPSHOT....


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#issuecomment-51436596
  
    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 pull request: SPARK-2893: Do not swallow Exceptions when run...

Posted by GrahamDennis <gi...@git.apache.org>.
Github user GrahamDennis commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-51732795
  
    Jenkins, retest this please.


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52151384
  
    Jenkins, test this please.


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52156475
  
    Jenkins, retest this please.


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52161963
  
    I think the test failure is not caused by this. Those two tests have been flaky. I'm going to merge this in master & branch-1.1. 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 pull request: SPARK-2893: Do not swallow Exceptions when run...

Posted by GrahamDennis <gi...@git.apache.org>.
Github user GrahamDennis commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-51735277
  
    Fixed the exception message.
    
    So that's why the tests weren't running -- Thanks @ash211!


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

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


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by GrahamDennis <gi...@git.apache.org>.
Github user GrahamDennis commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52151330
  
    @rxin: I've made the change you've suggested, but as there can be at most one custom kryo registrator (the for loop is extracting the value from an option), I don't see how this really improves things?


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by ash211 <gi...@git.apache.org>.
Github user ash211 commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-51733401
  
    @GrahamDennis only people on the whitelist can trigger a jenkins test -- you need an admin to trigger this test for you and/or put you on the whitelist


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#issuecomment-52155040
  
    QA results for PR 1827:<br>- This patch FAILED unit tests.<br>- This patch merges cleanly<br>- This patch adds no public classes<br><br>For more information see test ouptut:<br>https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18530/consoleFull


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#issuecomment-52161823
  
    QA results for PR 1827:<br>- This patch FAILED unit tests.<br>- This patch merges cleanly<br>- This patch adds no public classes<br><br>For more information see test ouptut:<br>https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18533/consoleFull


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52151375
  
    Because this way you get to log the class name :)



---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52151742
  
    Yes, back to branch-1.0. (not 1.0.1 since we cannot change a released version, but we can push  1.0.3).


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#discussion_r16225918
  
    --- Diff: core/src/test/scala/org/apache/spark/serializer/KryoSerializerSuite.scala ---
    @@ -207,6 +207,16 @@ class KryoSerializerSuite extends FunSuite with SharedSparkContext {
             .fold(new ClassWithoutNoArgConstructor(10))((t1, t2) => new ClassWithoutNoArgConstructor(t1.x + t2.x)).x
         assert(10 + control.sum === result)
       }
    +  
    +  test("kryo with nonexistent custom registrator should fail") {
    +    import org.apache.spark.{SparkConf, SparkException}
    +
    +    val conf = new SparkConf(false)
    +    conf.set("spark.kryo.registrator", "this.class.does.not.exist")
    +    
    +    val thrown = intercept[SparkException](new KryoSerializer(conf).newInstance())
    +    assert(thrown.getMessage.contains("Failed to invoke this.class.does.not.exist"))
    --- End diff --
    
    you need to update this error message now.


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#issuecomment-52151723
  
    QA tests have started for PR 1827. This patch merges cleanly. <br>View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18530/consoleFull


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by GrahamDennis <gi...@git.apache.org>.
Github user GrahamDennis commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-51436619
  
    Jenkins, test this please.


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#discussion_r16034797
  
    --- Diff: core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala ---
    @@ -87,7 +87,8 @@ class KryoSerializer(conf: SparkConf)
             reg.registerClasses(kryo)
           }
         } catch {
    -      case e: Exception => logError("Failed to run spark.kryo.registrator", e)
    +      case e: Exception => throw
    +        new SparkException("Failed to run spark.kryo.registrator due to %s".format(e.getMessage))
    --- End diff --
    
    This loses the stacktrace on exception e -- can we include that in the second parameter of the SparkException as the cause?


---
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: SPARK-2893: Do not swallow Exceptions when run...

Posted by debasish83 <gi...@git.apache.org>.
Github user debasish83 commented on the pull request:

    https://github.com/apache/spark/pull/1827#issuecomment-52151882
  
    branch-1.0 is fine 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 pull request: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#discussion_r16226313
  
    --- Diff: core/src/test/scala/org/apache/spark/serializer/KryoSerializerSuite.scala ---
    @@ -207,6 +207,16 @@ class KryoSerializerSuite extends FunSuite with SharedSparkContext {
             .fold(new ClassWithoutNoArgConstructor(10))((t1, t2) => new ClassWithoutNoArgConstructor(t1.x + t2.x)).x
         assert(10 + control.sum === result)
       }
    +  
    +  test("kryo with nonexistent custom registrator should fail") {
    +    import org.apache.spark.{SparkConf, SparkException}
    +
    +    val conf = new SparkConf(false)
    +    conf.set("spark.kryo.registrator", "this.class.does.not.exist")
    +    
    +    val thrown = intercept[SparkException](new KryoSerializer(conf).newInstance())
    +    assert(thrown.getMessage.contains("Failed to invoke this.class.does.not.exist"))
    --- End diff --
    
    This is the updated message.  I beat you to it.


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#discussion_r16223901
  
    --- Diff: core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala ---
    @@ -87,7 +87,8 @@ class KryoSerializer(conf: SparkConf)
             reg.registerClasses(kryo)
           }
         } catch {
    -      case e: Exception => logError("Failed to run spark.kryo.registrator", e)
    +      case e: Exception => throw
    --- End diff --
    
    can you change this to
    
    ```scala
        // Allow the user to register their own classes by setting spark.kryo.registrator
        for (regCls <- registrator) {
          logDebug("Running user registrator: " + regCls)
          try {
            val reg = Class.forName(regCls, true, classLoader).newInstance()
              .asInstanceOf[KryoRegistrator]
            reg.registerClasses(kryo)
          } catch {
            case e: Exception => 
              throw new SparkException(s"Failed to invoke $regCls", e)
          }
        }
    ```


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#issuecomment-52156952
  
    QA tests have started for PR 1827. This patch merges cleanly. <br>View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18533/consoleFull


---
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: SPARK-2893: Do not swallow Exceptions when run...

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

    https://github.com/apache/spark/pull/1827#discussion_r16226363
  
    --- Diff: core/src/test/scala/org/apache/spark/serializer/KryoSerializerSuite.scala ---
    @@ -207,6 +207,16 @@ class KryoSerializerSuite extends FunSuite with SharedSparkContext {
             .fold(new ClassWithoutNoArgConstructor(10))((t1, t2) => new ClassWithoutNoArgConstructor(t1.x + t2.x)).x
         assert(10 + control.sum === result)
       }
    +  
    +  test("kryo with nonexistent custom registrator should fail") {
    +    import org.apache.spark.{SparkConf, SparkException}
    +
    +    val conf = new SparkConf(false)
    +    conf.set("spark.kryo.registrator", "this.class.does.not.exist")
    +    
    +    val thrown = intercept[SparkException](new KryoSerializer(conf).newInstance())
    +    assert(thrown.getMessage.contains("Failed to invoke this.class.does.not.exist"))
    --- End diff --
    
    (I've run this test locally, and it passes).


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