GithubHelp home page GithubHelp logo

sjl421 / vagrant-hadoop-hive-spark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from martinprobson/vagrant-hadoop-hive-spark

0.0 2.0 0.0 56 KB

Vagrant project to spin up a single node VM running current versions of Hadoop, Hive and Spark

License: Apache License 2.0

Shell 74.72% Vim Script 25.28%

vagrant-hadoop-hive-spark's Introduction

Vagrant for Hadoop, Spark and Hive

Introduction

Vagrant project to spin up a single virtual machine running:

  • Hadoop 2.7.3
  • Hive 1.2.2
  • Spark 2.1.1
  • mysql 5.7 (for hive metastore)
  • Tez 0.8.5
  • Sqoop 1.4.6
  • Pig 0.17.0
  • flume 1.7.0
  • Zeppelin 0.7.2 (with Spark/scala, md, file and JDBC interpreters)

The virtual machine will be running the following services:

  • HDFS NameNode + DataNode
  • YARN ResourceManager/NodeManager + JobHistoryServer + ProxyServer
  • Hive metastore and server2
  • Spark history server
  • mysql
  • zeppelin notebook server (not started by default - see below)

Getting Started

  1. Download and install VirtualBox
  2. Download and install Vagrant.
  3. Go to releases and download and extract the latest source of this project.
  4. In your terminal change your directory into the project directory (i.e. cd vagrant-hadoop-spark-hive-<version>).
  5. Run vagrant up to create the VM (NOTE This will take a while the first time as many dependancies are downloaded - subsequent deployments will be quicker as dependancies are cached in the resources directory).
  6. Execute vagrant ssh to login to the VM.

Map Reduce - Tez

By default map reduce jobs will be executed via Tez to change this to standard MR, change the following parameter in $HADOOP_CONF/mapred-site.xml from: -

    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn-tez</value>
    </property>

to

    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>

Web user interfaces

Here are some useful links to navigate to various UI's:

Apache Zeppelin notebook server

Apache Zeppelin together with spark, md, file and JDBC interpreters is installed by default but not started. To manually start the zeppelin daemon run: -

vagrant ssh
zeppelin-daemon.sh start

as ubuntu user from the command line.

Notebook server can then be accessed via http://10.211.55.101:8080.

Mysql

mysql database connection

Shared Folder

Vagrant automatically mounts the folder containing the Vagrant file from the host machine into the guest machine as /vagrant inside the guest.

Validating your virtual machine setup

To test out the virtual machine setup, and for examples of how to run MapReduce, Hive and Spark, head on over to VALIDATING.md.

Managment of Vagrant VM

To stop the VM and preserve all setup/data within the VM: -

vagrant halt

or

vagrant suspend

Issue a vagrant up command again to restart the VM from where you left off.

To completely wipe the VM so that vagrant up command gives you a fresh machine: -

vagrant destroy

Then issue vagrant up command as usual.

To shutdown services cleanly

$ vagrant ssh
$ sudo -sE
$ /vagrant/scripts/stop-spark.sh
$ /vagrant/scripts/stop-hadoop.sh
$ systemctl stop mysql.service

Swapspace - Memory

Spark in particular needs quite a bit of memory to run - to work around this a swapspace daemon is also configured and started that uses normal disk to dynamically allocate swapspace when memory is low.

More advanced setup

If you'd like to learn more about working and optimizing Vagrant then take a look at ADVANCED.md.

For developers

The file DEVELOP.md contains some tips for developers.

Credits

Thanks to Alex Holmes for the great work at (https://github.com/alexholmes/vagrant-hadoop-spark-hive)

Matheus Cunha

vagrant-hadoop-hive-spark's People

Contributors

macunha1 avatar maroom1 avatar martinprobson avatar

Watchers

 avatar  avatar

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.