From 4572f9f61c6b2fc1300bc5efb0c0c59fc19353e0 Mon Sep 17 00:00:00 2001 From: RongGu Date: Fri, 28 Mar 2014 01:43:03 +0800 Subject: [PATCH] reserving the old apply function API of StorageLevel --- .../scala/org/apache/spark/storage/StorageLevel.scala | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala b/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala index 1d8d88bbcb94c..68ef36b743dd6 100644 --- a/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala +++ b/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala @@ -135,10 +135,15 @@ object StorageLevel { val MEMORY_AND_DISK_SER_2 = new StorageLevel(true, true, false, false, 2) val OFF_HEAP = new StorageLevel(false, false, true, false) - /** Create a new StorageLevel object */ + /** Create a new StorageLevel object without setting useTachyon*/ def apply(useDisk: Boolean, useMemory: Boolean, useTachyon: Boolean, - deserialized: Boolean, replication: Int = 1) = getCachedStorageLevel( + deserialized: Boolean, replication: Int) = getCachedStorageLevel( new StorageLevel(useDisk, useMemory, useTachyon, deserialized, replication)) + + /** Create a new StorageLevel object */ + def apply(useDisk: Boolean, useMemory: Boolean, + deserialized: Boolean, replication: Int = 1) = getCachedStorageLevel( + new StorageLevel(useDisk, useMemory, false, deserialized, replication)) /** Create a new StorageLevel object from its integer representation */ def apply(flags: Int, replication: Int) =