【问题标题】:How to specify uberization of a Hive query in Hadoop2?如何在 Hadoop2 中指定 Hive 查询的 uberization?
【发布时间】:2015-04-23 22:35:37
【问题描述】:

Hadoop 2 中有一个名为 uberization 的新功能。例如,this reference 说:

Uberization 是一种运行 MapReduce 作业的所有任务的可能性 如果作业足够小,则为 ApplicationMaster 的 JVM。这样,你 避免从 ResourceManager 请求容器的开销 并要求 NodeManager 启动(据说很小的)任务。

我无法确定这是否只是在幕后神奇地发生了,还是需要为这件事做些什么?例如,在进行 Hive 查询时,是否有设置(或提示)来实现这一点?你能指定什么是“足够小”的阈值吗?

另外,我很难找到关于这个概念的很多信息 - 它是否有其他名称?

【问题讨论】:

    标签: java hadoop


    【解决方案1】:

    我在 Arun Murthy 的 YARN Book 中找到了有关“优步工作”的详细信息:

    当多个 mapper 和 reducer 组合使用单个时,就会发生 Uber Job 容器。围绕 Uber Jobs 的配置有四个核心设置 表 9.3 中显示的 mapred-site.xml 选项。

    这是表 9.3:

    |-----------------------------------+------------------------------------------------------------|
    | mapreduce.job.ubertask.enable     | Whether to enable the small-jobs "ubertask" optimization,  |
    |                                   | which runs "sufficiently small" jobs sequentially within a |
    |                                   | single JVM. "Small" is defined by the maxmaps, maxreduces, |
    |                                   | and maxbytes settings. Users may override this value.      |
    |                                   | Default = false.                                           |
    |-----------------------------------+------------------------------------------------------------|
    | mapreduce.job.ubertask.maxmaps    | Threshold for the number of maps beyond which the job is   |
    |                                   | considered too big for the ubertasking optimization.       |
    |                                   | Users may override this value, but only downward.          |
    |                                   | Default = 9.                                               |
    |-----------------------------------+------------------------------------------------------------|
    | mapreduce.job.ubertask.maxreduces | Threshold for the number of reduces beyond which           |
    |                                   | the job is considered too big for the ubertasking          |
    |                                   | optimization. Currently the code cannot support more       |
    |                                   | than one reduce and will ignore larger values. (Zero is    |
    |                                   | a valid maximum, however.) Users may override this         |
    |                                   | value, but only downward.                                  |
    |                                   | Default = 1.                                               |
    |-----------------------------------+------------------------------------------------------------|
    | mapreduce.job.ubertask.maxbytes   | Threshold for the number of input bytes beyond             |
    |                                   | which the job is considered too big for the uber-          |
    |                                   | tasking optimization. If no value is specified,            |
    |                                   | `dfs.block.size` is used as a default. Be sure to          |
    |                                   | specify a default value in `mapred-site.xml` if the        |
    |                                   | underlying file system is not HDFS. Users may override     |
    |                                   | this value, but only downward.                             |
    |                                   | Default = HDFS block size.                                 |
    |-----------------------------------+------------------------------------------------------------|
    

    我还不知道是否有特定于 Hive 的方法来设置它,或者您是否只是将上述方法与 Hive 一起使用。

    【讨论】:

      【解决方案2】:

      当多个 mapper 和 reducer 组合在 Application Master 中执行时,就会发生 Uber Job。因此,假设要执行的作业具有 MAX Mappers ,然后资源管理器 (RM) 创建一个 Application Master 并使用它自己的 JVM 在 Application Master 内很好地执行作业。

      SET mapreduce.job.ubertask.enable=TRUE;

      因此,使用 Uberised 作业的优势在于,应用程序主机通过从资源管理器 (RM) 向容器请求作业以及 RM 将容器分配给应用程序主机而执行的往返开销被消除了。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-12-30
        • 1970-01-01
        相关资源
        最近更新 更多