diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2012-09-30 21:48:27 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2012-09-30 21:48:27 -0700 |
commit | 3128c57f9031541d1b77e763b614751b536847b0 (patch) | |
tree | cccbe095738b0b2547e2ddff7ea00b216d7666e6 /core/src/main | |
parent | 83143f9a5f92ca5c341332c809f0adf7e58885b6 (diff) | |
download | spark-3128c57f9031541d1b77e763b614751b536847b0.tar.gz spark-3128c57f9031541d1b77e763b614751b536847b0.tar.bz2 spark-3128c57f9031541d1b77e763b614751b536847b0.zip |
Simplified Class / ClassLoader test
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/scala/spark/SizeEstimator.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/spark/SizeEstimator.scala b/core/src/main/scala/spark/SizeEstimator.scala index 71b9c1f62a..6a71522922 100644 --- a/core/src/main/scala/spark/SizeEstimator.scala +++ b/core/src/main/scala/spark/SizeEstimator.scala @@ -142,7 +142,7 @@ object SizeEstimator extends Logging { val cls = obj.getClass if (cls.isArray) { visitArray(obj, cls, state) - } else if (classOf[ClassLoader].isAssignableFrom(cls) || classOf[Class].isAssignableFrom(cls)) { + } else if (obj.isInstanceOf[ClassLoader] || obj.isInstanceOf[Class[_]]) { // Hadoop JobConfs created in the interpreter have a ClassLoader, which greatly confuses // the size estimator since it references the whole REPL. Do nothing in this case. In // general all ClassLoaders and Classes will be shared between objects anyway. |