karlhigley / spark-neighbors

Spark-based approximate nearest neighbor search using locality-sensitive hashing
MIT License
104 stars 23 forks source link

build error for scala 2.11 #57

Open sain-lee opened 6 years ago

sain-lee commented 6 years ago

change the scala verison to 2.11 and sbt build error: [info] Compiling 15 Scala sources to /data0/jd_ad/lisai/keyword/lsh/spark-neighbors-master/target/scala-2.11/classes... [error] /data0/jdad/lisai/keyword/lsh/spark-neighbors-master/src/main/scala/com/github/karlhigley/spark/neighbors/ANNModel.scala:153: type arguments [Any] do not conform to class HashTableEntry's type parameter bounds [+S <: com.github.karlhigley.spark.neighbors.lsh.Signature[\]] [error] indHashFunctions.map { [error] ^ [error] /data0/jdad/lisai/keyword/lsh/spark-neighbors-master/src/main/scala/com/github/karlhigley/spark/neighbors/ANNModel.scala:153: type arguments [Any] do not conform to class HashTableEntry's type parameter bounds [+S <: com.github.karlhigley.spark.neighbors.lsh.Signature[]] [error] indHashFunctions.map { [error] ^ [error] two errors found [error] (compile:compileIncremental) Compilation failed

Nirvanada commented 6 years ago

I did some minor changes at line 153

indHashFunctions.map { case (hashFunc: LSHFunction[_], table) => hashFunc.hashTableEntry(id, table, vector) }.toIterator