Skip to content

Commit 43ab10b

Browse files
committed
Change last two println's to log4j logger
1 parent 88aacc8 commit 43ab10b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mllib/src/test/scala/org/apache/spark/mllib/clustering/PIClusteringSuite.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class PIClusteringSuite extends FunSuite with LocalSparkContext {
6565

6666
val nVertices = vertices.length
6767
val (ccenters, estCollected) = PIC.run(sc, vertices, nClusters, nIterations)
68-
println(s"Cluster centers: ${ccenters.mkString(",")} " +
68+
logger.info(s"Cluster centers: ${ccenters.mkString(",")} " +
6969
s"\nEstimates: ${estCollected.mkString("[", ",", "]")}")
7070
assert(ccenters.size == circleSpecs.length, "Did not get correct number of centers")
7171

@@ -108,6 +108,7 @@ class PIClusteringSuite extends FunSuite with LocalSparkContext {
108108
}
109109

110110
object PIClusteringSuite {
111+
val logger = Logger.getLogger(getClass.getName)
111112
val LA = PICLinalg
112113
val A = Array
113114

@@ -141,7 +142,7 @@ object PIClusteringSuite {
141142
circlePoints
142143
}
143144
val points = circles.flatten.sortBy(_.label)
144-
println(printPoints(points))
145+
logger.info(printPoints(points))
145146
points
146147
}
147148

@@ -158,7 +159,7 @@ object PIClusteringSuite {
158159
)
159160

160161
val aMat = new BDM(dat1.length, dat1.length, dat1.flatten)
161-
println(s"Input mat: ${LA.printMatrix(dat1.flatten, 4, 4)}")
162+
logger.info(s"Input mat: ${LA.printMatrix(dat1.flatten, 4, 4)}")
162163
val Darrarr = dat1.toArray.zipWithIndex.map { case (dvect, ix) =>
163164
val sum = dvect.foldLeft(0.0) {
164165
_ + _

0 commit comments

Comments
 (0)