Skip to content

Commit

Permalink
Merge pull request #77 from holdenk/build-spark-mllib-with-spark-version
Browse files Browse the repository at this point in the history
Build spark mllib tests with spark version
  • Loading branch information
jkbradley committed Aug 5, 2015
2 parents 9a48aaf + 1cb45d3 commit 03f2ce3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/sparkperf/main.py
Expand Up @@ -121,7 +121,7 @@
"tests, but %s was not already present") % StreamingTests.test_jar_path

if should_prep_mllib_tests:
MLlibTests.build()
MLlibTests.build(config.MLLIB_SPARK_VERSION)
elif run_mllib_tests:
assert MLlibTests.is_built(), ("You tried to skip packaging the MLlib perf " +
"tests, but %s was not already present") % MLlibTests.test_jar_path
Expand Down
4 changes: 2 additions & 2 deletions lib/sparkperf/testsuites.py
Expand Up @@ -251,8 +251,8 @@ class MLlibTests(JVMPerfTestSuite, MLlibTestHelper):
test_jar_path = "%s/mllib-tests/target/mllib-perf-tests-assembly.jar" % PROJ_DIR

@classmethod
def build(cls):
run_cmd("cd %s/mllib-tests; %s clean assembly" % (PROJ_DIR, SBT_CMD))
def build(cls, spark_version):
run_cmd("cd %s/mllib-tests; %s -Dspark.version=%s.0 clean assembly" % (PROJ_DIR, SBT_CMD, spark_version))

@classmethod
def process_output(cls, config, short_name, opt_list, stdout_filename, stderr_filename):
Expand Down
4 changes: 2 additions & 2 deletions mllib-tests/project/MLlibTestsBuild.scala
Expand Up @@ -17,7 +17,7 @@ object MLlibTestsBuild extends Build {
organization := "org.spark-project",
version := "0.1",
scalaVersion := "2.10.4",
sparkVersion := sys.props.get("spark.version").getOrElse("1.3.1"),
sparkVersion := sys.props.getOrElse("spark.version", default="1.3.1"),
libraryDependencies ++= Seq(
"net.sf.jopt-simple" % "jopt-simple" % "4.6",
"org.scalatest" %% "scalatest" % "2.2.1" % "test",
Expand All @@ -38,7 +38,7 @@ object MLlibTestsBuild extends Build {
case v if v.startsWith("1.2.") => "v1p2"
case v if v.startsWith("1.3.") => "v1p3"
case v if v.startsWith("1.4.") => "v1p4"
case _ => throw new IllegalArgumentException(s"Do not support Spark $sparkVersion.")
case _ => throw new IllegalArgumentException(s"Do not support Spark ${sparkVersion.value}.")
}
baseDirectory.value / targetFolder / "src" / "main" / "scala"
},
Expand Down

0 comments on commit 03f2ce3

Please sign in to comment.