Made the default cache BoundedMemoryCache, and reduced its default size

This commit is contained in:
Matei Zaharia 2012-02-09 22:32:02 -08:00
parent a766780f4c
commit c0a0df3285
2 changed files with 2 additions and 2 deletions

View file

@ -46,7 +46,7 @@ class BoundedMemoryCache extends Cache with Logging {
private def getMaxBytes(): Long = {
val memoryFractionToUse = System.getProperty(
"spark.boundedMemoryCache.memoryFraction", "0.75").toDouble
"spark.boundedMemoryCache.memoryFraction", "0.66").toDouble
(Runtime.getRuntime.totalMemory * memoryFractionToUse).toLong
}

View file

@ -21,7 +21,7 @@ object SparkEnv {
}
def createFromSystemProperties(isMaster: Boolean): SparkEnv = {
val cacheClass = System.getProperty("spark.cache.class", "spark.SoftReferenceCache")
val cacheClass = System.getProperty("spark.cache.class", "spark.BoundedMemoryCache")
val cache = Class.forName(cacheClass).newInstance().asInstanceOf[Cache]
val serializerClass = System.getProperty("spark.serializer", "spark.JavaSerializer")