Skip to content

Commit

Permalink
Change last two println's to log4j logger
Browse files Browse the repository at this point in the history
  • Loading branch information
sboeschhuawei committed Jan 28, 2015
1 parent 88aacc8 commit 43ab10b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class PIClusteringSuite extends FunSuite with LocalSparkContext {

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

Expand Down Expand Up @@ -108,6 +108,7 @@ class PIClusteringSuite extends FunSuite with LocalSparkContext {
}

object PIClusteringSuite {
val logger = Logger.getLogger(getClass.getName)
val LA = PICLinalg
val A = Array

Expand Down Expand Up @@ -141,7 +142,7 @@ object PIClusteringSuite {
circlePoints
}
val points = circles.flatten.sortBy(_.label)
println(printPoints(points))
logger.info(printPoints(points))
points
}

Expand All @@ -158,7 +159,7 @@ object PIClusteringSuite {
)

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

0 comments on commit 43ab10b

Please sign in to comment.