Skip to content

Commit 059c390

Browse files
zsxwingrxin
authored andcommitted
[SPARK-6998][MLlib] Make StreamingKMeans 'Serializable'
If `StreamingKMeans` is not `Serializable`, we cannot do checkpoint for applications that using `StreamingKMeans`. So we should make it `Serializable`. Author: zsxwing <[email protected]> Closes apache#5582 from zsxwing/SPARK-6998 and squashes the following commits: 67c2a14 [zsxwing] Make StreamingKMeans 'Serializable' (cherry picked from commit fa73da0) Signed-off-by: Reynold Xin <[email protected]>
1 parent e1e7fc0 commit 059c390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class StreamingKMeansModel(
160160
class StreamingKMeans(
161161
var k: Int,
162162
var decayFactor: Double,
163-
var timeUnit: String) extends Logging {
163+
var timeUnit: String) extends Logging with Serializable {
164164

165165
def this() = this(2, 1.0, StreamingKMeans.BATCHES)
166166

0 commit comments

Comments
 (0)