File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
mllib/src/main/scala/org/apache/spark/mllib/clustering Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,9 @@ class BisectingKMeans private (
197197 newClusters = summarize(d, newAssignments)
198198 newClusterCenters = newClusters.mapValues(_.center).map(identity)
199199 }
200- if (preIndices != null ) preIndices.unpersist(blocking = false )
200+ if (preIndices != null ) {
201+ preIndices.unpersist(false )
202+ }
201203 preIndices = indices
202204 indices = updateAssignments(assignments, divisibleIndices, newClusterCenters).keys
203205 .persist(StorageLevel .MEMORY_AND_DISK )
@@ -212,9 +214,13 @@ class BisectingKMeans private (
212214 }
213215 level += 1
214216 }
215- if (preIndices != null ) preIndices.unpersist(blocking = false )
216- if (indices != null ) indices.unpersist(blocking = false )
217- norms.unpersist(blocking = false )
217+ if (preIndices != null ) {
218+ preIndices.unpersist(false )
219+ }
220+ if (indices != null ) {
221+ indices.unpersist(false )
222+ }
223+ norms.unpersist(false )
218224 val clusters = activeClusters ++ inactiveClusters
219225 val root = buildTree(clusters)
220226 new BisectingKMeansModel (root)
You can’t perform that action at this time.
0 commit comments