hiped2

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

  • 所有者: alexholmes/hiped2
  • 平台:
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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 git@github.com: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.

主要指標

概覽
名稱與所有者alexholmes/hiped2
主編程語言Java
編程語言Shell (語言數: 5)
平台
許可證Apache License 2.0
所有者活动
創建於2014-01-26 03:24:17
推送於2014-09-10 15:30:24
最后一次提交2014-09-10 08:27:14
發布數9
最新版本名稱v2.0.8 (發布於 )
第一版名稱v2.0.0 (發布於 )
用户参与
星數79
關注者數20
派生數73
提交數35
已啟用問題?
問題數5
打開的問題數4
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?