Skip to content

Commit

Permalink
Cross scala build support (#15)
Browse files Browse the repository at this point in the history
* Merge branch 'master' of https://github.com/marufaytekin/lsh-spark

# Conflicts:
#	.gitignore
#	.travis.yml
#	README.md
#	build.sbt
#	src/main/resources/log4j.properties
#	src/main/scala/com/lendap/lsh/Hasher.scala
#	src/main/scala/com/lendap/lsh/LSHModel.scala
#	src/main/scala/com/lendap/lsh/Main.scala

* added travis scala cross builds

* initial commit

* initial commit

* initial commit

* rndRDD changes

* rndRDD changes

* initial commit

* initial commit

* prediction added.

* added data

* initial commit

* intellij files removed.

* License added.

* initial commit

* rndRDD changes

* added data

* load and save added

* intellij files removed.

* - updated readme.
- license file added..

* cosine similarity calculation added.

* Cosine similarity usage added to readme.md.

* - Package structure changed.
- band term replaced with hash table.

* added properties

* Delete unnecessary files

* groupId changed to "lendapp"

Signed-off-by: Ramazan Ayyildiz <ramazan.ayyildiz@symanto.net>

* removed recomndation package.
  • Loading branch information
rayyildiz authored and marufaytekin committed Sep 10, 2017
1 parent 89d1a1f commit 5723fd5
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 15 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -17,8 +17,7 @@ project/plugins/project/

# Scala-IDE specific
.scala_dependencies
/data/ml-1m.data
.worksheet
.idea/*
*.iml


6 changes: 5 additions & 1 deletion .travis.yml
@@ -1,9 +1,13 @@
language: scala
scala:
- 2.10.4
- 2.11.7
- 2.11.8
- 2.11.10
- 2.11.11
jdk:
- openjdk7
- openjdk6
- openjdk8
sudo: false
script:
- sbt -jvm-opts travis/jvmopts.compile compile
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions README.md
@@ -1,5 +1,7 @@
# Locality Sensitive Hashing for Apache Spark #

[![Build Status](https://travis-ci.org/marufaytekin/lsh-spark.svg?branch=master)](https://travis-ci.org/marufaytekin/lsh-spark)

Locality-sensitive hashing (LSH) is an approximate nearest neighbor search and
clustering method for high dimensional data points (http://www.mit.edu/~andoni/LSH/).
Locality-Sensitive functions
Expand Down
14 changes: 4 additions & 10 deletions build.sbt
@@ -1,11 +1,5 @@
name := "lsh-scala"

version := "0.0.1-SNAPSHOT"

scalaVersion := "2.10.4"

libraryDependencies += "org.apache.spark" % "spark-core_2.10" % "1.4.1"

libraryDependencies += "org.apache.spark" % "spark-mllib_2.10" % "1.4.1"

libraryDependencies += "org.scalatest" % "scalatest_2.10" % "2.1.3" % "test"
lazy val lsh = (project in file(".")).
settings(Settings.settings: _*).
settings(Settings.lshSettings: _*).
settings(libraryDependencies ++=Dependencies.lshDependencies )
22 changes: 22 additions & 0 deletions project/Dependencies.scala
@@ -0,0 +1,22 @@
import sbt._

object Dependencies {

lazy val version = new {
val scalaTest = "2.2.2"
val spark = "1.4.1"
}

lazy val library = new {
val sparkCore ="org.apache.spark" %% "spark-core" % version.spark
val sparkMLib ="org.apache.spark" %% "spark-mllib" % version.spark
val test = "org.scalatest" %% "scalatest" % version.scalaTest % Test
}

val lshDependencies: Seq[ModuleID] = Seq(
library.sparkCore,
library.sparkMLib,
library.test
)

}
21 changes: 21 additions & 0 deletions project/Settings.scala
@@ -0,0 +1,21 @@
import sbt._
import Keys._

object Settings {
lazy val settings = Seq(
organization := "com.lendap",
version := "0.1." + sys.props.getOrElse("buildNumber", default="0-SNAPSHOT"),
scalaVersion := "2.10.4",
publishMavenStyle := true,
publishArtifact in Test := false
)

lazy val testSettings = Seq(
fork in Test := false,
parallelExecution in Test := false
)

lazy val lshSettings = Seq(
name := "lsh-scala"
)
}
1 change: 1 addition & 0 deletions project/build.properties
@@ -0,0 +1 @@
sbt.version=0.13.15
3 changes: 1 addition & 2 deletions src/test/scala/com/lendap/spark/lsh/LocalSparkContext.scala
Expand Up @@ -14,7 +14,7 @@ trait LocalSparkContext extends BeforeAndAfterAll { self: Suite =>
override def beforeAll() {
val conf = new SparkConf()
.setMaster("local")
.setAppName("lsh-test")
.setAppName("test")
sc = new SparkContext(conf)
super.beforeAll()
}
Expand All @@ -25,5 +25,4 @@ trait LocalSparkContext extends BeforeAndAfterAll { self: Suite =>
}
super.afterAll()
}

}

0 comments on commit 5723fd5

Please sign in to comment.