什么是Hadoop


配上官方介绍


    What Is Apache Hadoop?

    The Apache™ Hadoop® project develops open-source software for reliable, scalable, **distributed**(分布式) computing.

    The Apache Hadoop software library is a framework that allows for the **distributed**(分布式) processing of large data sets across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-availability, the library itself is designed to detect and handle failures at the application layer, so delivering a highly-available service on top of a cluster of computers, each of which may be prone to failures.

    The project includes these modules:

        Hadoop Common: The common utilities that support the other Hadoop modules.公用工具,是其他工具的基础
        Hadoop Distributed File System (HDFS™): A **distributed**(分布式) file system that provides high-throughput(吞吐量) access to application data.
        Hadoop YARN: A framework for job scheduling(安排) and cluster(集群) resource management.
        Hadoop MapReduce: A YARN-based system for parallel(并行) processing(处理) of large data sets.

###common
####公用工具,基础

###MapReduce
####功能:对海量数据的处理
#####分布式思想
#####分而治之
#####每个数据集,进行逻辑业务处理(map)
#####合并统计数据结果(redece)

###HDFS
####功能:存储海量数据
####分布式,安全性(三个副本数据)

###YARN
####分布式资源管理框架
*管理整个集群的资源(内存,cpu核数)
*分配调度集群的资源

Hadoop是一个开源框架,用于解决数据爆炸增长,带来的处理问题。是一个集群式计算机解决方案,主要有以下几个特点

  • 方便--Hadoop一般用于云计算的基础之上
  • 健壮--Hadoop设计的时候假设计算机的硬件常常崩溃,它设计上能容忍这种问题的发生
  • 可拓展--相Hadoop通过增加集群节点,可实现大规模拓展
  • 简单--这个,,。。相对比较简单吧

Hadoop集群示意图

图片2

相对于其他分布式系统:Hadoop的理念是把代码向数据搬移,甚至在集群中,通常让数据和计算在同一计算机上完成。

相对与传统数据库相比,Hadoop更能适应非结构化或者半结构化的数据,毕竟不是所有的数据都是结构化的,关系型数据库使用SQL语句查询数据,而Hadoop的MapReduce使用脚本和代码来进行查询操作,更适应非结构化的数据统计模型。

什么是MapReduce

就像管道模型和队列模型一样,MapReduce是一种数据处理模型。分解一个数据应用为mapper(过滤和转换)和reducer(聚合),具有十分简单的拓展性,能够轻易拓展到集群中的其他机器上运行。 

MapReduce的键值对应表

 

输入

输出

map

<k1,v1>

list<k2,v2>

reduce

<k2,list(v2)>

list<k3,v3>

(用筛选重复单词的例子)我理解的数据流过程:

(1)每个机器分到1篇文章,输入<k1文件名,v1文件内容>

(2)使用mapper的map函数进行处理,一般来说,k1(文件名)会被mapper忽略,输出一个list<apple,10><banane,20>….的列表

(3)输入<apple,list(1,2,3,4,5312,123,1,2….)>这个单词在每个机器上的汇总

(4)使用Reducer的reduce方法输出list<apple,1000><bananer 2000>这样的总的汇总列表

posted @ 2017-04-27 17:41  岑忠满  阅读(300)  评论(0编辑  收藏  举报