Giter Site home page Giter Site logo

mongodb-spark-demo's Introduction

MongoDB-Spark Demo

Prerequisites

To build the MongoDB-Spark demo application, you'll need to have the following:

MongoDB-Hadoop

Note: you must build the MongoDB-Hadoop connector from source for your version of Hadoop and install the core JAR file to your local Maven repo. For example:

$ git clone http://github.com/mongodb/mongo-hadoop.git
$ cd mongo-hadoop
$ ./gradlew jar -Phadoop_version='2.4'
$ mvn install:install-file \
    -Dfile=core/build/lib/mongo-hadoop-core-1.2.1-SNAPSHOT-hadoop_2.4.jar \
    -DgroupId=com.mongodb \
    -DartifactId=hadoop \
    -Dversion=1.2.1-SNAPSHOT \
    -Dpackaging=jar

Spark

Refer to the Spark overview to get started.

Building

To the build the MongoDB-Hadoop demo applications use Maven:

$ mvn package

This will build the demo application and place all of the dependencies in target/lib. If instead you want to build a single jar with all of the dependencies, execute the assembly:single Maven goal:

$ mvn compile assembly:single

Running

$ cd your-spark-directory
$ SPARK_JAR=assembly/target/scala-2.10/spark-assembly-1.0.0-hadoop2.4.0.jar \
  HADOOP_CONF_DIR=/usr/local/hadoop/etc/hadoop \
  bin/spark-submit --master local --class com.mongodb.spark.demo.Recommender /path/to/demo-1.0-SNAPSHOT.jar \
  --jars /path/to/mongo-java-driver-2.12.2.jar,/path/to/hadoop-1.2.1-SNAPSHOT.jar \
  --executor-memory 4G /movielens/ratings.bson /movielens/users.bson \
  /movielens/movies.bson movielens.predictions

Notes

None at this time.

mongodb-spark-demo's People

Contributors

crcsmnky avatar

Stargazers

 avatar ozw1z5rd avatar Hbn avatar  avatar Tin C. avatar wynn avatar Mingwei avatar  avatar LevelUpUpUp avatar Mohamed Meabed avatar xuyifei avatar  avatar yan.ll avatar Kenyu Irie avatar Vidit Maniyar avatar Adam Wamai Egesa avatar loop avatar Mirolim Mirzakhmedov avatar Moacy Barros avatar Chi-I Huang avatar Philip O'Brien avatar Tree Nguyen avatar Hank Wang avatar  avatar  avatar Sambit Tripathy avatar Gaurhari avatar Murugesh avatar Sunghyouk Bae avatar Surat Teerapittayanon avatar Adam J. Mendoza avatar Xunyu Wang avatar krisjin avatar Arun K. Subramaniyan avatar Reynald Lescarbeau avatar Stanislav Prusac avatar scientificname avatar Yuan JIN avatar Will Sorenson avatar Wells avatar André Ikeda avatar Caleb Jones avatar Glavin Wiechert avatar William Torrealba avatar

Watchers

 avatar James Cloos avatar Moacy Barros avatar Arun K. Subramaniyan avatar krisjin avatar  avatar

mongodb-spark-demo's Issues

Can you give me the input files

In order to learn your program ,I hope you can upload the input files,I am new;Wishing your help /movielens/ratings.bson /movielens/users.bson /movielens/movies.bson

mongos interactive

I got an error "Exception in thread "main" java.io.IOException: com.mongodb.hadoop.splitter.SplitFailedException: Unable to calculate input splits: doing a splitVector across dbs isn't supported via mongos"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.