Code Monkey home page Code Monkey logo

hadoop-statistics's Introduction

Basic statistical measures of massive datasets with APACHE HADOOP

Calculate MIN, MAX, AVG and STDDEV of one column on big data datasets with these Hadoop Applications.

These applications are the resolution of the exercises for the practices of the course of BigData within the Master in Science of Data of the University of Granada (March 2016).

The practical master class has been done by Francisco J. Baldán and Manuel J. Parra.

Index of measures:

MIN of a column

Code: HADOOP MIN

How to compile and execute:

# Compile
javac -cp /usr/lib/hadoop/*:/usr/lib/hadoop-0.20-mapreduce/* -d min_classes Min.java MinMapper.java MinReducer.

# Create JAR

jar -cvf min.jar -C min_classes / .

# Execute 
hadoop jar min.jar oldapi.Min ./sample1.txt ./min/output_2/

MAX of a column

Code: HADOOP MAX

How to compile and execute:

# Compile
javac -cp /usr/lib/hadoop/*:/usr/lib/hadoop-0.20-mapreduce/* -d max_classes Max.java MaxMapper.java MaxReducer.

# Create JAR

jar -cvf max.jar -C max_classes / .

# Execute
hadoop jar max.jar oldapi.Max ./sample1.txt ./min/output_2/

AVG of a column:

Code: HADOOP AVG

How to compile and execute:

# Compile
javac -cp /usr/lib/hadoop/*:/usr/lib/hadoop-0.20-mapreduce/* -d avg_classes Avg.java AvgMapper.java AvgReducer.

# Create JAR

jar -cvf avg.jar -C avg_classes / .

# Execute
hadoop jar avg.jar oldapi.Avg ./sample1.txt ./avg/output_2/

STD DEV of a column:

Code: HADOOP STD DEV

How to compile and execute:

# Compile
javac -cp /usr/lib/hadoop/*:/usr/lib/hadoop-0.20-mapreduce/* -d desv_classes Desv.java DesvMapper.java DesvReducer.

# Create JAR

jar -cvf desv.jar -C desv_classes / .

# Execute
hadoop jar desv.jar oldapi.Desv ./sample1.txt ./desv/output_2/

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.