зеркало из https://github.com/microsoft/spark.git
Changes based on Matei's comments
This commit is contained in:
Родитель
c387e40fb1
Коммит
bc909c2903
|
@ -12,7 +12,6 @@ import scala.collection.mutable.ArrayBuffer
|
||||||
import scala.collection.Map
|
import scala.collection.Map
|
||||||
import scala.collection.mutable.HashMap
|
import scala.collection.mutable.HashMap
|
||||||
import scala.collection.JavaConversions.mapAsScalaMap
|
import scala.collection.JavaConversions.mapAsScalaMap
|
||||||
import scala.util.control.Breaks._
|
|
||||||
|
|
||||||
import org.apache.hadoop.io.BytesWritable
|
import org.apache.hadoop.io.BytesWritable
|
||||||
import org.apache.hadoop.io.NullWritable
|
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 firstUserMethod = "<not_found>"
|
||||||
var firstUserFile = "<not_found>"
|
var firstUserFile = "<not_found>"
|
||||||
var firstUserLine = -1
|
var firstUserLine = -1
|
||||||
|
var finished = false
|
||||||
|
|
||||||
breakable {
|
|
||||||
for (el <- trace) {
|
for (el <- trace) {
|
||||||
if (el.getClassName().contains("spark") && !el.getClassName().contains("spark.examples")) {
|
if (!finished) {
|
||||||
|
if (el.getClassName().contains("spark") && !el.getClassName().startsWith("spark.examples")) {
|
||||||
lastSparkMethod = el.getMethodName()
|
lastSparkMethod = el.getMethodName()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
firstUserMethod = el.getMethodName()
|
firstUserMethod = el.getMethodName()
|
||||||
firstUserLine = el.getLineNumber()
|
firstUserLine = el.getLineNumber()
|
||||||
firstUserFile = el.getFileName()
|
firstUserFile = el.getFileName()
|
||||||
break
|
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)
|
// Transformations (return a new RDD)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче