@@ -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 " \n Estimates: ${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
110110object 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