mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject [2/2] mahout git commit: NOJIRA fixed the Kryo unable to serialze void problem
Date Fri, 28 Oct 2016 19:25:51 GMT
NOJIRA fixed the Kryo unable to serialze void problem


Project: http://git-wip-us.apache.org/repos/asf/mahout/repo
Commit: http://git-wip-us.apache.org/repos/asf/mahout/commit/00a2883e
Tree: http://git-wip-us.apache.org/repos/asf/mahout/tree/00a2883e
Diff: http://git-wip-us.apache.org/repos/asf/mahout/diff/00a2883e

Branch: refs/heads/master
Commit: 00a2883ec69b0807a5486c61dfcc7ef27f35ddc6
Parents: a511d6f
Author: pferrel <pat@occamsmachete.com>
Authored: Fri Oct 28 12:25:34 2016 -0700
Committer: pferrel <pat@occamsmachete.com>
Committed: Fri Oct 28 12:25:34 2016 -0700

----------------------------------------------------------------------
 .../scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala     | 4 +++-
 .../apache/mahout/sparkbindings/io/MahoutKryoRegistrator.scala   | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mahout/blob/00a2883e/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala
----------------------------------------------------------------------
diff --git a/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala
b/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala
index b8d9041..f69bf81 100644
--- a/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala
+++ b/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala
@@ -320,6 +320,8 @@ object SimilarityAnalysis extends Serializable {
 
     //val minLLR = minLLROpt.getOrElse(0.0d) // accept all values if not specified
 
+    val minLLR = minLLROpt
+
     drm.mapBlock() {
       case (keys, block) =>
 
@@ -351,7 +353,7 @@ object SimilarityAnalysis extends Serializable {
               // val candidate = thingA -> normailizedLLR
 
               // Enqueue item with score, if belonging to the top-k
-              if(minLLROpt.nonEmpty && candidate._2 >= minLLROpt.get) {//llr threshold
takes precedence over max per row
+              if(minLLR.isEmpty || llr >= minLLR.get) { // llr threshold takes precedence
over max per row
                 if (topItemsPerThing.size < maxInterestingItemsPerThing) {
                   topItemsPerThing.enqueue(candidate)
                 } else if (orderByScore.lt(candidate, topItemsPerThing.head)) {

http://git-wip-us.apache.org/repos/asf/mahout/blob/00a2883e/spark/src/main/scala/org/apache/mahout/sparkbindings/io/MahoutKryoRegistrator.scala
----------------------------------------------------------------------
diff --git a/spark/src/main/scala/org/apache/mahout/sparkbindings/io/MahoutKryoRegistrator.scala
b/spark/src/main/scala/org/apache/mahout/sparkbindings/io/MahoutKryoRegistrator.scala
index 2afea8a..b7d36ed 100644
--- a/spark/src/main/scala/org/apache/mahout/sparkbindings/io/MahoutKryoRegistrator.scala
+++ b/spark/src/main/scala/org/apache/mahout/sparkbindings/io/MahoutKryoRegistrator.scala
@@ -57,7 +57,8 @@ object MahoutKryoRegistrator {
       Class.forName(classOf[DenseVector].getName + "$DenseVectorView"),
       // This is supported by twitter.chill, but kryo still is offended by lack of registration:
       classOf[Range],
-      classOf[Unit],
+      //classOf[Unit], // this causes an error with "void not serializable" or some such
on a real cluster. Not found
+      // in unit tests
       classOf[scala.collection.mutable.WrappedArray.ofRef[_]],
       classOf[Array[Int]],
       classOf[Array[String]]


Mime
View raw message