当前位置:网站首页>MapReduce总结
MapReduce总结
2022-08-06 05:21:00 【侯侯侯先生】
MapReducede的架构

MapReduce的工作流程图


切片、数据块、MapTask并行度,ReduceTask数量
数据块:是数据存储在HDFS上得基本单位。和磁盘速率,寻址时间有关
切片:是MapReduce程序计算数据输入单位,是逻辑上进行数据切分,物理上不切分。默认是块大小。
MapTask并行度:一个切片创建一个MapTask实例。
ReduceTask数量:和分区数数量一致,一个分区对应一个ReduceTask数量。
编写MapReduce程序
环境配置,需要下载windows版本的hadoop环境,双击winutils.exe黑屏一闪而过就ok。并在环境变量中进行配置。
path
H:\work\hadoop\WindowsDep\hadoop-3.1.0\bin
HADOOP_HOME
H:\work\hadoop\WindowsDep\hadoop-3.1.0打开idea,配置moven,导入hadoop-client依赖包。添加打包依赖,进行打包(打包分为把依赖包一块打包,或者只打包自己的程序,看自己配置而定)。
<build>
<plugins>
<!--打包插件,不会将依赖得jar包进行打包-->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!--打包插件,打包得时候,会将依赖得jar包进行打包-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
- 编写相关程序就ok
MapReduce的压缩

边栏推荐
猜你喜欢

安科瑞一种基于物联网技术的能源物联网数据服务平台-Susie 周

串口USART和UART

Unity3D 层剔除距离与层球形剔除 layerCullSpherical 和 layerCullDistances

Unity3D 重复的使用 AssetBundle.LoadAsset&lt;T&gt;() 同一资源对象,并不会导致性能问题

队列的应用场景和实现

Design and application of Ankerui prepaid system in a high-tech park-Susie Week

【基础知识】SPI通信协议

Unity优化之GC——合理优化Unity的GC

物联网设备通过MQTT接入华为iot平台

李笑来的新书《定投》
随机推荐
热修复、插件化、组件化的区别
Design and application of Ankerui prepaid system in a high-tech park-Susie Week
安科瑞变电站综合自动化系统在变电站的应用-Susie 周
网络补充协议(八)
GameFramework.DataTable 详解
Ankerui DTSD1352-10(80)A Straight-through Wiring Instructions and Precautions-Susie Zhou
CPU和SOC区别
【STM32F4系列】【自制库】读取并模拟遥控插座的遥控器
EVBoard MM32 】 【 MM32F3270 series of ADC channel acquisition and internal temperature sensor
AssetBundle中加载资源的三种方式
指定变量和函数保存位置
MiniFlow -- 12.SGD Solution
通讯简单测试—Modscan32使用简介-Susie 周
扫雷游戏分析实现(完整代码)
Application of Ankerui Intelligent Lighting Control System in Metro Lighting-Susie Week
Application of Ankerui Substation Integrated Automation System in Substation-Susie Week
【Server related】
【基础知识】PID(比例微分积分)控制
【STM32F4系列】【HAL库】舵机模块驱动
Altium Designer18基本使用