From c6631ad2ed69e7b70a7bf1452bb962c528d14404 Mon Sep 17 00:00:00 2001 From: Nan Zhu Date: Tue, 24 May 2016 18:19:32 -0400 Subject: [PATCH] specify spark version (#1224) --- doc/jvm/index.md | 4 ++-- jvm-packages/pom.xml | 12 ++++++++++++ jvm-packages/xgboost4j-spark/pom.xml | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/jvm/index.md b/doc/jvm/index.md index f64617b96..e3ff666c0 100644 --- a/doc/jvm/index.md +++ b/doc/jvm/index.md @@ -11,9 +11,9 @@ Currently, XGBoost4J only support installation from source. Building XGBoost4J u Before you install XGBoost4J, you need to define environment variable `JAVA_HOME` as your JDK directory to ensure that your compiler can find `jni.h` correctly, since XGBoost4J relies on JNI to implement the interaction between the JVM and native libraries. -After your `JAVA_HOME` is defined correctly, it is as simple as run `mvn package` under jvm-packages directory to install XGBoost4J. +After your `JAVA_HOME` is defined correctly, it is as simple as run `mvn package` under jvm-packages directory to install XGBoost4J. You can also skip the tests by running `mvn -DskipTests=true package`, if you are sure about the correctness of your local setup. -NOTE: XGBoost4J requires to run with Spark 1.6 or newer +XGBoost4J-Spark which integrates XGBoost with Spark requires to run with Spark 1.6 or newer (the default version is 1.6.1). You can build XGBoost4J-Spark as a component of XGBoost4J by running `mvn package` or specifying the spark version by `mvn -Dspark.version=1.6.0 package`. Contents -------- diff --git a/jvm-packages/pom.xml b/jvm-packages/pom.xml index 5d0cbd00b..c9566016b 100644 --- a/jvm-packages/pom.xml +++ b/jvm-packages/pom.xml @@ -23,6 +23,18 @@ xgboost4j-spark xgboost4j-flink + + + spark-1.x + + true + + + 1.6.1 + 2.10 + + + diff --git a/jvm-packages/xgboost4j-spark/pom.xml b/jvm-packages/xgboost4j-spark/pom.xml index ac37e78ac..120616c58 100644 --- a/jvm-packages/xgboost4j-spark/pom.xml +++ b/jvm-packages/xgboost4j-spark/pom.xml @@ -28,8 +28,8 @@ org.apache.spark - spark-mllib_2.10 - 1.6.1 + spark-mllib_${scala.binary.version} + ${spark.version} \ No newline at end of file