Made the default cache BoundedMemoryCache, and reduced its default size
This commit is contained in:
parent
a766780f4c
commit
c0a0df3285
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue