Skip to content
Snippets Groups Projects
Commit bc909c29 authored by Patrick Wendell's avatar Patrick Wendell
Browse files

Changes based on Matei's comments

parent c387e40f
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,6 @@ import scala.collection.mutable.ArrayBuffer
import scala.collection.Map
import scala.collection.mutable.HashMap
import scala.collection.JavaConversions.mapAsScalaMap
import scala.util.control.Breaks._
import org.apache.hadoop.io.BytesWritable
import org.apache.hadoop.io.NullWritable
......@@ -142,21 +141,22 @@ abstract class RDD[T: ClassManifest](@transient sc: SparkContext) extends Serial
var firstUserMethod = "<not_found>"
var firstUserFile = "<not_found>"
var firstUserLine = -1
breakable {
for (el <- trace) {
if (el.getClassName().contains("spark") && !el.getClassName().contains("spark.examples")) {
lastSparkMethod = el.getMethodName()
}
else {
firstUserMethod = el.getMethodName()
firstUserLine = el.getLineNumber()
firstUserFile = el.getFileName()
break
}
var finished = false
for (el <- trace) {
if (!finished) {
if (el.getClassName().contains("spark") && !el.getClassName().startsWith("spark.examples")) {
lastSparkMethod = el.getMethodName()
}
else {
firstUserMethod = el.getMethodName()
firstUserLine = el.getLineNumber()
firstUserFile = el.getFileName()
finished = true
}
}
}
"%s called in %s (%s:%s)".format(lastSparkMethod, firstUserMethod, firstUserFile, firstUserLine)
"%s at: %s (%s:%s)".format(lastSparkMethod, firstUserMethod, firstUserFile, firstUserLine)
}
// Transformations (return a new RDD)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment