Giter Site home page Giter Site logo

deercoder / hadoop-practice Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 1.23 MB

Hadoop demo, my final project for advanced database

Home Page: http://deercoder.github.io/hadoop-practice/

License: GNU General Public License v2.0

Java 86.20% TeX 13.80%

hadoop-practice's Introduction

README

Hadoop project, MapReduce, Data Analysis, Java

This project is to use Java to manuplate multiple text files with selecting, projection, natural joint and aggregation. All these operations are done with MapReduce process instead of database.

The target of the project is to let us get familar with the MapReduce machnism, how to design reasonable Map and Reduce function, and how to dispatch/deploy the tasks in Hadoop.

For details, check the ProjectDescription.pdf

##GUIDE

This folder stores the necessary data source, code as well as the output for the Advanced Database Project, the structure is as follows:

data: the source data file that stores the manuplated data(city.txt, country.txt, countrylanguage.txt)

output: the output result of each experiments, there is a flag file indicating the status, and the other part-r-00000 is the generated result.

src: the source code of the project written in Java, for each seperate task there is a package named ex1, ex2,ex3, ex4.

INSTALL_GUIDE_2nd.pd: the guide that I referred when configuring the Hadoop environment

##Contact

Email: Chang Liu([email protected])

hadoop-practice's People

Contributors

deercoder avatar

Watchers

 avatar  avatar

Forkers

deercodercourse

hadoop-practice's Issues

How to save in unicode in Hadoop

In ex1, I output the city name, but it seems that the format of hadoop don't support unicode, so my solution will display abnormally, this is a bug.

And I think hadoop should be good at dealing this issue, since many data contains regional code and characters in different languages.

Leave a mark here and will solve it soon.

How to deal with the zero number in ex1

For hadoop's reduce(), here I just use empty(which means number zero) to output one collection. For example, if there is a city that satisfy the requirement, I just output (city, 0), as reduce() or map() both needs to operate as a tuple. But as a solution it's actually not so good.

But I think it's not elegant, there must be method to eliminate the zero so that there is only the city list for ex1.

Problem Set 1: output the cities where the populations are more than 300,000.

Problem: I will output the city name as well as an 0 behind it.

code refactoring for ex1, ex2

These two projects are not elegant, many of codes are poorly written and contains some format error, I need to rewrite them in good way...

bug for ex3

ex3 doesn't actually output all the countries that is English, it outputs ALL the countries. We have to add other judge conditions.

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.