Skip to content

Commit

Permalink
NOJIRA fixed the Kryo unable to serialze void problem
Browse files Browse the repository at this point in the history
  • Loading branch information
pferrel committed Oct 28, 2016
1 parent a511d6f commit 00a2883
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -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) =>

Expand Down Expand Up @@ -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)) {
Expand Down
Expand Up @@ -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]]
Expand Down

0 comments on commit 00a2883

Please sign in to comment.