Skip to Content
面向MapReduce的Hadoop优化
book

面向MapReduce的Hadoop优化

by Posts & Telecom Press, Khaled Tannir
May 2024
Intermediate to advanced
110 pages
1h 19m
Chinese
Packt Publishing
Content preview from 面向MapReduce的Hadoop优化

第5章 强化map和reduce任务

Hadoop框架已经包含了几种计数器,包括读写字节数的计数器等。这些计数器对掌握框架活动和资源使用非常有帮助。这些计数器由工作节点定期发送到主节点。

在本章中,我们将学习针对map和reduce如何对每个阶段进行强化,学习观察哪种计数器,采用哪种方法分析性能问题。然后,我们学习如何通过以合理的值正确地配置参数来进行调优。

本章将介绍以下内容:

块大小和输入数据的影响;

如何处置小的和不可拆分的文件;

压缩map 端的溢写记录;

改善Reduce 阶段;

计算map 和reduce 任务的吞吐量;

调优map 和reduce 参数。

5.1 强化map任务

执行MapReduce作业时,Hadoop框架会执行定义良好的处理阶段序列中的作业。除用户定义的函数(map、reduce和combiner)之外,其他MapReduce阶段的执行时间在不同的MapReduce作业间是通用的。处理时间则主要依赖于每个阶段流经的数据量以及底层Hadoop集群的性能。

要强化 MapReduce 性能,首先使用不同数量的数据(每 map/reduce 任务)运行一组不同的作业,从而针对各个阶段进行基准测试。运行这些作业是收集持续时间和每一阶段数据量等测量指标的需要,然后还要分析这些测量值(针对各个阶段)以推算平台规模函数。

为了识别map端的瓶颈,我们勾画出map任务执行流程的5个阶段。图5-1给出了map任务的执行的序列。

figure_0067_0047

图5-1

我们来看看每个阶段做了什么。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar
深度学习实战手册(R语言版)

深度学习实战手册(R语言版)

Posts & Telecom Press, PKS Prakash, Achyutuni Sri Krishna Rao
Lua游戏AI开发指南

Lua游戏AI开发指南

Posts & Telecom Press, David Young
Python应用开发指南

Python应用开发指南

Posts & Telecom Press, Ninad Sathaye

Publisher Resources

ISBN: 9781836204510