Skip to content

Commit 3767e80

Browse files
committed
update style
1 parent e05cc26 commit 3767e80

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

mllib/src/main/scala/org/apache/spark/mllib/clustering/BisectingKMeans.scala

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)