Coder Social home page Coder Social logo

hadoop2's Introduction

Hadoop2

Some time ago, I was asked for an introduction course to Hadoop world. Here is the "hands on" part.

The projects in this repo aimed at a few targets:

  • Help at real-life projects setup (pom hierarchy and projects granularity).
  • Avoid dependencies headakes you invariably get when starting with hadoop (hadoop 1 / 2 incompatible APIs can put a mess in this domain).
  • Introduce progressively different libraries, frameworks, practices and language I found usefull when writing hadoop jobs.
  • Provide a small lib to ease jobs unit testing (and initially to work around a bug, now corrected, on Windows).

Feel free to report if it's of any use to you ๐Ÿ˜

Prerequisites

Eclipse setup

If you use Eclipse, you need to "import -> maven -> existing maven project". Further configuration (such as adding specific source folders to build path) will be provided in some labs instructions.

Map / reduce

Hadoop jobs are a solution to process huge collections of records. Each job is executed in three steps:

  • map: for each record you are provided with a key (defaulted to record index) and a value. You may associate this value (or a new one build from it) with any number ok keys (usually one). You do this implementing the Mapper interface.
  • shuffle: all values that where mapped with the same key are collected in a single iterator. This is done automatically by the framework.
  • reduce: you are provided with an iterator on all the values with a given key and may associate any number of key/value pairs to it (usually one single value with same output key as you got as an input). You do this with a Reducer implementation.

So Hadoop dev life is easy: compute keys from values and then compute new values from collections of records with same key. Of course life can get a slightly harder when it comes to compute what your client asks for with those two simple operations :bowtie:

Business domain

All labs are manipulating very basic large distribution concepts:

  • we sell products
  • products are grouped by category
  • each sell is materialized through a bill paid by a client

We will compute statistics about sales and customers.

UML class diagram

Get your hands on

The labs under /labs/todo/ are waiting for you.

Each lab comes with a README with detailed instructions to help you find your way to the solutions provided under /labs/complete.

hadoop2's People

Contributors

ch4mpy avatar

Watchers

 avatar  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.