Git Product home page Git Product logo

max-electric-generating's Introduction

概述

用mapreduce的方法在hadoop平台上,在数据文件中筛选出广东省2007年-2017年中,每一年发电量最高的月份的发电量

运行

1.配置JDK,安装hadoop

2.启动并验证hadoop

/usr/local/hadoop/sbin/start-dfs.sh 
/usr/local/hadoop/sbin/start-yarn.sh
jps

3.在hdfs 上创建输入文件夹MaxEleInput,并把数据文件放进去

/usr/local/hadoop/bin/hdfs dfs -mkdir /MaxEleInput
/usr/local/hadoop/bin/hdfs dfs -put GenerateEleData.txt /MaxEleInput(在Generation.txt所在目录下)

4.运行MaxEle程序

/usr/local/hadoop/bin/hadoop jar MaxEle /MaxEleInput /MaxEleOutput(在jar包所在目录下)

5.查看输出文件及其结果

/usr/local/hadoop/bin/hdfs dfs -cat /MaxEleOutput/*

浏览器进入http://192.168.142.128:50070/explorer.html#/output 可以查看文件(50070前的地址为master的ip地址)

参考资料

数据来源

http://data.stats.gov.cn/easyquery.htm?cn=E0101

参考书目

《Hadoop权威指南》

max-electric-generating's People

Contributors

huangyt39 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.