Github user mubarak commented on the pull request:
https://github.com/apache/spark/pull/1723#issuecomment-53229308
@tdas
I don't think the new (proposed) REGEX in `Utils.getCallSite` works for
test suite. For instance,
`bagel/src/test/scala/org/apache/spark/bagel/BagelSuite.scala`
```scala
32 class BagelSuite extends FunSuite with Assertions with BeforeAndAfter
with Timeouts {
33
34 var sc: SparkContext = _
35
36 after {
37 if (sc != null) {
38 sc.stop()
39 sc = null
40 }
41 }
42
43 test("halting by voting") {
44 sc = new SparkContext("local", "test")
45 println("getCallSite: " + sc.getCallSite.longForm)
46
47 val rdd1 = sc.makeRDD(Array(1, 2, 3, 4))
48 println("creationSite: " + rdd1.getCreationLongSite)
49 println("creationShortSite: " + rdd1.getCreationSite)
```
creationSite for `makeRDD (line #47)` would look like
```
org.apache.spark.SparkContext.makeRDD(SparkContext.scala:455)
org.apache.spark.bagel.BagelSuite$$anonfun$2.apply$mcV$sp(BagelSuite.scala:47)
org.apache.spark.bagel.BagelSuite$$anonfun$2.apply(BagelSuite.scala:43)
org.apache.spark.bagel.BagelSuite$$anonfun$2.apply(BagelSuite.scala:43)
org.scalatest.Transformer$$anonfun$apply$1.apply(Transformer.scala:22)
org.scalatest.Transformer$$anonfun$apply$1.apply(Transformer.scala:22)
org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
org.scalatest.Transformer.apply(Transformer.scala:22)
org.scalatest.Transformer.apply(Transformer.scala:20)
org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:158)
org.scalatest.Suite$class.withFixture(Suite.scala:1121)
org.scalatest.FunSuite.withFixture(FunSuite.scala:1559)
org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:155)
org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:167)
org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:167)
org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:167)
org.apache.spark.bagel.BagelSuite.org$scalatest$BeforeAndAfter$$super$runTest(BagelSuite.scala:32)
org.scalatest.BeforeAndAfter$class.runTest(BeforeAndAfter.scala:200)
```
and after new REGEX, callSite will be `apply at Transformer.scala:22` as
`org.apache.spark.bagel.*` will come inside spark (same-thing will be applied
to `SparkContextInfoSuite`)
Thoughts?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]