Code Monkey home page Code Monkey logo

hadoop_yeartemperature's Introduction

hadoop_yearTemperature

1.输入
输入文件内容:
1949-10-01 14:21:02 34C
1949-10-02 14:21:12 36C
1950-02-02 11:21:12 32C
1950-05-02 11:31:12 37C
1951-12-02 11:31:12 23C
1950-12-02 11:31:12 47C
1950-12-02 11:31:12 27C
1951-06-02 11:31:12 48C
1951-07-02 11:31:12 45C
数据是时间和温度的记录
其中时间yyyy-MM-dd HH:mm:ss后面跟的是制表符tab

2. 输出
计算出:
1949-1951 年之间,每年温度最高的前K天(例如k=5)

3. 思路
3.1 按照年份升序排序,同一年中,再按照温度降序排序。
3.2 按照年份分组,每个年份对应一个reduce任务。

map输出: key为封装对象,封装年份和温度为一个对象作为Key值,即keyPair类。

4. 目的
4.1 练习自定义排序
4.2 练习自定义分区
4.3 练习自定义分组

5. 各种软件环境
参考Hadoop2.5.2完全分布式环境搭建
http://blog.csdn.net/liushahe2012/article/details/53364449

hadoop_yeartemperature's People

Contributors

liushahe2012 avatar

Watchers

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