1、Reduce Task Number

通常来说一个block就对应一个map任务进行处理,reduce任务如果人工不去设置干预的话就一个reduce。reduce任务的个数可以通过在程序中设置  job.setNumReduceTasks(个数); ,也可在配置文件上设置reduce任务个数,默认为1, 或者在代码config中配置

Configuration configuration = new Configuration();
configuration.set("mapreduce.job.reduces","");//这个数字根据实际测试和调试来决定

2、Map Task 输出压缩

默认一个块对应一个map任务进行,没办法干预,那么就可以从输出的结果去优化,将结果压缩,如设置Map Task 输出压缩的格式:

Configuration configuration = new Configuration();
configuration.set("mapreduce.map.output.codec","org.apache.hadoop.io.compress.SnappyCodec")

3、shuffle phase 参数

mapreduce.task.io.sort.factor 10 The number of streams to merge at once while sorting files. This determines the number of open file handles.
mapreduce.task.io.sort.mb 100 The total amount of buffer memory to use while sorting files, in megabytes. By default, gives each merge stream 1MB, which should minimize seeks.
mapreduce.map.sort.spill.percent 0.80 The soft limit in the serialization buffer. Once reached, a thread will begin to spill the contents to disk in the background. Note that collection will not block if this threshold is exceeded while a spill is already in progress, so spills may be larger than this threshold when it is set to less than .5
mapreduce.map.cpu.vcores 1 The number of virtual cores to request from the scheduler for each map task.
mapreduce.reduce.memory.mb 1024 The amount of memory to request from the scheduler for each reduce task.
mapreduce.reduce.cpu.vcores 1 The number of virtual cores to request from the scheduler for each reduce task.

Hadoop- MapReduce在实际应用中常见的调优的更多相关文章

  1. (转)WebSphere 中池资源调优 - 线程池、连接池和 ORB

    WebSphere 中池资源调优 - 线程池.连接池和 ORB 来自:https://www.ibm.com/developerworks/cn/websphere/library/techartic ...

  2. MapReduce编程实战之“调试”和"调优"

    本篇内容 在上一篇的"初识"环节,我们已经在本地和Hadoop集群中,成功的执行了几个MapReduce程序,对MapReduce编程,已经有了最初的理解. 在本篇文章中,我们对M ...

  3. HBase 中读 HDFS 调优

    HDFS Read调优 在基于 HDFS 存储的 HBase 中,主要有两种调优方式: 绕过RPC的选项,称为short circuit reads 开启让HDFS推测性地从多个datanode读数据 ...

  4. Hadoop企业开发场景案例,虚拟机服务器调优

    Hadoop企业开发场景案例 1 案例需求 ​ (1)需求:从1G数据中,统计每个单词出现次数.服务器3台,每台配置4G内存,4核CPU,4线程. ​ (2)需求分析: ​ 1G/128m = 8个M ...

  5. 数据迁移过程中hive sql调优

    本文记录的是,在数据处理过程中,遇到了一个sql执行很慢,对一些大型的hive表还会出现OOM,一步一步通过参数的设置和sql优化,将其调优的过程. 先上sql ) t where t.num =1) ...

  6. 013 Spark中的资源调优

    1.平常的资源使用情况 2.官网 3.资源参数调优 cores memory JVM 4.具体参数 可以在--conf参数中给定资源配置相关信息(配置的一般是JVM的一些垃圾回收机制) --drive ...

  7. 2.28 MapReduce在实际应用中常见的优化

    一.优化的点 Reduce Task Number Map Task输出压缩 Shuffle Phase 参数 map.reduce分配的虚拟CPU 二.Reduce Task Number Redu ...

  8. Linux网络数据包的揭秘以及常见的调优方式总结

    https://mp.weixin.qq.com/s/boRWlx1R7TX0NLuI2sZBfQ 作为业务 SRE,我们所运维的业务,常常以 Linux+TCP/UDP daemon 的形式对外提供 ...

  9. Hadoop MapReduce 一文详解MapReduce及工作机制

    @ 目录 前言-MR概述 1.Hadoop MapReduce设计思想及优缺点 设计思想 优点: 缺点: 2. Hadoop MapReduce核心思想 3.MapReduce工作机制 剖析MapRe ...

随机推荐

  1. Android解析聚合数据之天气预报

    免费天气预报API:https://www.juhe.cn/docs/api/id/73 ,申请APPKEY MainActivity.java <span style="font-s ...

  2. url 传中文

    if (null == keyword || keyword.equals("关键字")) keyword = ""; if(keyword.length()& ...

  3. hibernate 过滤

    1.可以使用@Where的过滤,不过这种过滤式全局的,支持延迟加载. 2.可以使用@Filters,这种过滤不支持延迟加载. @Entity@Table(name = "qc315_tous ...

  4. window.location.href重定向 不会触发webview

    通过window.location.href来重定向的,安卓不会触发shouldOverrideUrlLoading.

  5. (一)关于jQuery的网上资源

    jQuery官网: http://jquery.com/ jQuery API: http://jquery.cuishifeng.cn/ w3school学习网站:http://www.w3scho ...

  6. python sax解析xml

    #books.xml<catalog> <book isbn="0-596-00128-2"> <title>Python & XML& ...

  7. java 表示当前时间的第二天的几点

    Calendar cal = Calendar.getInstance();  cal.setTime(new Date());  cal.add(Calendar.DAY_OF_YEAR, 1);  ...

  8. ubuntu系统安装好后一些基本软件的安装

    preface: 由于某些原因重装了系统,原来在ubuntu下安装的一些软件又要又一次安装.稍微麻烦,整理下须要安装的步骤. #==================================== ...

  9. 【JavaSE】Java问题总结

    使用BufferedInputStream时OutOfMemoryError异常 eclipse Luna安装subversion(SVN) 使用BufferedInputStream时OutOfMe ...

  10. C++钩子程序浅析

    在网上搜索“键盘记录C++”实现可以找到很多相关文章,我也是照着上面的介绍去研究去试着做的,从懂到不懂.那么为什么有那么多材料我还要去写这样一篇 文章,我想这个是我个人需要关心的问题,我不是那种ctr ...