GithubHelp home page GithubHelp logo

rsamal / hiped2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexholmes/hiped2

0.0 2.0 0.0 4.82 MB

Source code that accompanies the book "Hadoop in Practice, Second Edition".

License: Apache License 2.0

Shell 0.83% R 0.60% Java 98.05% Thrift 0.04% Python 0.31% Awk 0.16%

hiped2's Introduction

Source code for Hadoop in Practice, Second Edition

This project contains the source code that accompanies the book Hadoop in Practice, Second Edition.

License

Apache version 2.0 (for more details look at the license).

Usage

Tarball

The easiest way to start working with the examples is to download a tarball distribution of this project. Doing so will mean that running your first example is just three steps away:

  1. Go to the releases and download the most recent tarball.

  2. Extract the contents ot the tarball.

     $ tar -xzvf hip-<version>-package.tar.gz
    
  3. The examples in the book all use the hip script located in bin/hip to execute the examples. While it's not required, it's recommended that you add hip-<version>/bin to your path so that you can simply execute hip and execute the examples in the book by directly copy-pasting the commands.

  4. Run the "hello world" example, which is

$ cd hip-<version>

# create two input files in HDFS
$ hadoop fs -mkdir -p hip1/input
$ echo "cat sat mat" | hadoop fs -put - hip1/input/1.txt
$ echo "dog lay mat" | hadoop fs -put - hip1/input/2.txt

# run the inverted index example
$ ./hip hip.ch1.InvertedIndexJob --input hip1/input --output hip1/output

# examine the results in HDFS
$ hadoop fs -cat hip1/output/part*

Done! The tarball also includes the sources and JavaDocs.

Building your own distribution

Here you're going to checkout the trunk and then use Maven to run a build.

  1. Checkout the code.

     $ git clone [email protected]:alexholmes/hiped2.git
    
  2. Build the code and distribution tarball.

$ cd hiped2
$ mvn clean
$ mvn validate
$ mvn package

The JAR's and tarball will be under the target directory. Now you can follow the instructions in the "Tarball" section above to explode the tarball and run an example.

What's next?

At this point check out the book for more examples and how you can execute them. Or if you find any issues then please go to the issues and open a new issue.

hiped2's People

Contributors

alexholmes avatar

Watchers

James Cloos avatar Ramakant 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.