diff options
author | Shivaram Venkataraman <shivaram@eecs.berkeley.edu> | 2012-08-11 16:40:33 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@eecs.berkeley.edu> | 2012-08-13 13:31:39 -0700 |
commit | 44661df9ccab0bfcbf7059840f1bfd2fbee8b052 (patch) | |
tree | 05fe35d54745dacc4e882d1a32cecf319eac459a /core/src/main/scala/spark/SizeEstimator.scala | |
parent | 0dd8fe73ba99478b639c4a32fdc962a451de8b81 (diff) | |
download | spark-44661df9ccab0bfcbf7059840f1bfd2fbee8b052.tar.gz spark-44661df9ccab0bfcbf7059840f1bfd2fbee8b052.tar.bz2 spark-44661df9ccab0bfcbf7059840f1bfd2fbee8b052.zip |
If spark.test.useCompressedOops is set, use that to infer compressed oops
setting. This is useful to get a deterministic test case
Diffstat (limited to 'core/src/main/scala/spark/SizeEstimator.scala')
-rw-r--r-- | core/src/main/scala/spark/SizeEstimator.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/main/scala/spark/SizeEstimator.scala b/core/src/main/scala/spark/SizeEstimator.scala index d43558dc09..45f9a1cd40 100644 --- a/core/src/main/scala/spark/SizeEstimator.scala +++ b/core/src/main/scala/spark/SizeEstimator.scala @@ -63,6 +63,9 @@ object SizeEstimator extends Logging { classInfos.put(classOf[Object], new ClassInfo(OBJECT_SIZE, Nil)) private def getIsCompressedOops : Boolean = { + if (System.getProperty("spark.test.useCompressedOops") != null) { + return System.getProperty("spark.test.useCompressedOops").toBoolean + } try { val hotSpotMBeanName = "com.sun.management:type=HotSpotDiagnostic"; val server = ManagementFactory.getPlatformMBeanServer(); |