Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rename to setIntermediateRDDStorageLevel
  • Loading branch information
mengxr committed Aug 14, 2014
commit d942017b36e3c5e7d829486b26eeabbfbf3e623c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class ALS private (
private var nonnegative = false

/** storage level for user/product in/out links */
private var intermediateDataStorageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK
private var intermediateRDDStorageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK

/**
* Set the number of blocks for both user blocks and product blocks to parallelize the computation
Expand Down Expand Up @@ -199,8 +199,8 @@ class ALS private (
* set `spark.rdd.compress` to `true` to reduce the space requirement, at the cost of speed.
*/
@DeveloperApi
def setIntermediateDataStorageLevel(storageLevel: StorageLevel): this.type = {
this.intermediateDataStorageLevel = storageLevel
def setIntermediateRDDStorageLevel(storageLevel: StorageLevel): this.type = {
this.intermediateRDDStorageLevel = storageLevel
this
}

Expand Down Expand Up @@ -456,8 +456,8 @@ class ALS private (
}, preservesPartitioning = true)
val inLinks = links.mapValues(_._1)
val outLinks = links.mapValues(_._2)
inLinks.persist(intermediateDataStorageLevel)
outLinks.persist(intermediateDataStorageLevel)
inLinks.persist(intermediateRDDStorageLevel)
outLinks.persist(intermediateRDDStorageLevel)
(inLinks, outLinks)
}

Expand Down