Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7023#discussion_r33375326
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala ---
    @@ -784,6 +784,37 @@ class DAGSchedulerSuite
         assert(sc.parallelize(1 to 10, 2).first() === 1)
       }
     
    +  test("getPartitions exceptions should not crash DAGScheduler and 
SparkContext (SPARK-8606)") {
    +    val e1 = intercept[DAGSchedulerSuiteDummyException] {
    +      val rdd = new MyRDD(sc, 2, Nil) {
    +        override def getPartitions: Array[Partition] = {
    +          throw new DAGSchedulerSuiteDummyException
    +        }
    +      }
    +      rdd.reduceByKey(_ + _, 1).count()
    +    }
    +
    +    // Make sure we can still run local commands as well as cluster 
commands.
    +    assert(sc.parallelize(1 to 10, 2).count() === 10)
    +    assert(sc.parallelize(1 to 10, 2).first() === 1)
    +  }
    +
    +  test("getPreferredLocations errors should not crash DAGScheduler and 
SparkContext (SPARK-8606)") {
    +    val e1 = intercept[SparkException] {
    +      val rdd = new MyRDD(sc, 2, Nil) {
    +        override def getPreferredLocations(split: Partition): Seq[String] 
= {
    +          throw new DAGSchedulerSuiteDummyException
    +        }
    +      }
    +      rdd.count()
    +    }
    +    
assert(e1.getMessage.contains(classOf[DAGSchedulerSuiteDummyException].getName))
    --- End diff --
    
    oh yeah, that is fine with me -- sorry I didn't mean to imply this should 
wait on the other PR.  I was really just making a random observation, sorry if 
I confused 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to