Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAHOUT-1894] Add Support for Spark 2.x #271

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -15,26 +15,20 @@
* limitations under the License.
*/

package org.apache.mahout.sparkbindings.shell

import org.apache.log4j.PropertyConfigurator
import org.apache.spark.repl.SparkILoop
import org.apache.mahout.math._
import org.apache.mahout.math.scalabindings._
import org.apache.mahout.math.drm._
import org.apache.mahout.math.scalabindings.RLikeOps._
import org.apache.mahout.math.drm.RLikeDrmOps._
import org.apache.mahout.sparkbindings._

implicit val sdc: org.apache.mahout.sparkbindings.SparkDistributedContext = sc2sdc(sc)

object Main {
private var _interp: SparkILoop = _

def main(args: Array[String]) {
PropertyConfigurator.configure(getMahoutHome() + "/conf/log4j.properties")

System.setProperty("scala.usejavacp", "true")
_interp = new MahoutSparkILoop()

// It looks like we need to initialize this too, since some Spark shell initilaization code
// expects it
org.apache.spark.repl.Main.interp = _interp
_interp.process(args)
println("""
_ _
_ __ ___ __ _| |__ ___ _ _| |_
'_ ` _ \ / _` | '_ \ / _ \| | | | __|
| | | | | (_| | | | | (_) | |_| | |_
_| |_| |_|\__,_|_| |_|\___/ \__,_|\__| version 0.13.0

}
}
""")
2 changes: 1 addition & 1 deletion bin/mahout
Expand Up @@ -291,7 +291,7 @@ unset IFS
case "$1" in
(spark-shell)
save_stty=$(stty -g 2>/dev/null);
"$JAVA" $JAVA_HEAP_MAX $MAHOUT_OPTS -classpath "$CLASSPATH" "org.apache.mahout.sparkbindings.shell.Main" $@
$SPARK_HOME/bin/spark-shell -classpath "$CLASSPATH" -i $MAHOUT_HOME/bin/load-shell.scala --conf spark.kryo.referenceTracking=false --conf spark.kryo.registrator=org.apache.mahout.sparkbindings.io.MahoutKryoRegistrator --conf spark.kryoserializer.buffer=32k --conf spark.kryoserializer.buffer.max=600m --conf spark.serializer=org.apache.spark.serializer.KryoSerializer $@
stty sane; stty $save_stty
;;
# Spark CLI drivers go here
Expand Down
12 changes: 0 additions & 12 deletions distribution/pom.xml
Expand Up @@ -109,10 +109,6 @@
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-flink_${scala.compat.version}</artifactId>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-spark-shell_${scala.compat.version}</artifactId>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-math-scala_${scala.compat.version}</artifactId>
Expand Down Expand Up @@ -159,10 +155,6 @@
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-flink_${scala.compat.version}</artifactId>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-spark-shell_${scala.compat.version}</artifactId>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-math-scala_${scala.compat.version}</artifactId>
Expand Down Expand Up @@ -209,10 +201,6 @@
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-flink_${scala.compat.version}</artifactId>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is an other shell dependency @ line 158 that needs to come out.

<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-spark-shell_${scala.compat.version}</artifactId>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-math-scala_${scala.compat.version}</artifactId>
Expand Down
17 changes: 0 additions & 17 deletions distribution/src/main/assembly/bin.xml
Expand Up @@ -155,19 +155,6 @@
</excludes>
<outputDirectory/>
</fileSet>
<fileSet>
<directory>${project.basedir}/../spark-shell/target</directory>
<includes>
<include>mahout-*.jar</include>
<include>mahout-*.job</include>
</includes>
<excludes>
<exclude>*sources.jar</exclude>
<exclude>*javadoc.jar</exclude>
<exclude>*tests.jar</exclude>
</excludes>
<outputDirectory/>
</fileSet>
<fileSet>
<directory>${project.basedir}/../collections/target/apidocs</directory>
<outputDirectory>docs/mahout-collections</outputDirectory>
Expand Down Expand Up @@ -204,10 +191,6 @@
<directory>${project.basedir}/../flink/target/site/scaladocs</directory>
<outputDirectory>docs/mahout-flink</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/../spark-shell/target/site/scaladocs</directory>
<outputDirectory>docs/mahout-spark-shell</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/..</directory>
<outputDirectory/>
Expand Down
9 changes: 1 addition & 8 deletions pom.xml
Expand Up @@ -121,7 +121,7 @@
<slf4j.version>1.7.22</slf4j.version>
<scala.compat.version>2.10</scala.compat.version>
<scala.version>2.10.4</scala.version>
<spark.version>1.6.2</spark.version>
<spark.version>1.6.3</spark.version> <!-- 1.6.3, 2.0.2, 2.1.0 all tested -->
<flink.version>1.1.4</flink.version>
<h2o.version>0.1.25</h2o.version>
<jackson.version>2.7.4</jackson.version>
Expand Down Expand Up @@ -232,12 +232,6 @@
<version>${project.version}</version>
</dependency>

<dependency>
<artifactId>mahout-spark-shell_${scala.compat.version}</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
</dependency>

<dependency>
<artifactId>mahout-flink_${scala.compat.version}</artifactId>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -849,7 +843,6 @@
<module>distribution</module>
<module>math-scala</module>
<module>spark</module>
<module>spark-shell</module>
<module>flink</module>
<module>h2o</module>
<!--<module>viennacl</module>-->
Expand Down
202 changes: 0 additions & 202 deletions spark-shell/pom.xml

This file was deleted.