Skip to content

Commit 4572f9f

Browse files
committed
reserving the old apply function API of StorageLevel
1 parent 04301d3 commit 4572f9f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

core/src/main/scala/org/apache/spark/storage/StorageLevel.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,15 @@ object StorageLevel {
135135
val MEMORY_AND_DISK_SER_2 = new StorageLevel(true, true, false, false, 2)
136136
val OFF_HEAP = new StorageLevel(false, false, true, false)
137137

138-
/** Create a new StorageLevel object */
138+
/** Create a new StorageLevel object without setting useTachyon*/
139139
def apply(useDisk: Boolean, useMemory: Boolean, useTachyon: Boolean,
140-
deserialized: Boolean, replication: Int = 1) = getCachedStorageLevel(
140+
deserialized: Boolean, replication: Int) = getCachedStorageLevel(
141141
new StorageLevel(useDisk, useMemory, useTachyon, deserialized, replication))
142+
143+
/** Create a new StorageLevel object */
144+
def apply(useDisk: Boolean, useMemory: Boolean,
145+
deserialized: Boolean, replication: Int = 1) = getCachedStorageLevel(
146+
new StorageLevel(useDisk, useMemory, false, deserialized, replication))
142147

143148
/** Create a new StorageLevel object from its integer representation */
144149
def apply(flags: Int, replication: Int) =

0 commit comments

Comments
 (0)