技术来了解hadoop中的默认调度程序 [英] Technique to know the Default scheduler in hadoop

查看:170
本文介绍了技术来了解hadoop中的默认调度程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在3个Ubuntu系统12.04中安装了多节点安装程序。我在所有三个中都使用Hadoop1.2.1。现在我想要默认运行哪个调度程序?
如何检查在Hadoop1.2.1中运行的默认调度程序?

解决方案

hadoop中的默认调度程序是 JobQueueTaskScheduler ,它是一个FIFO调度程序。作为默认调度程序,您需要在 mapred.jobtracker.taskScheduler mapred-default.htmlrel =nofollow> mapred-default.xml 。如果您愿意,可以根据您的要求将默认调度程序更改为CapacityScheduler或FairScheduler。

mapred-site.xml用于覆盖mapred-default.xml中的默认值,它可以在配置目录中找到。您可能在配置目录中找不到mapred-default文件以及hadoop二进制发行版(rpm,deb等),而是直接在jar文件hadoop-core-1.2.1.jar中找到mapred-default.xml。 / p>

  hackzon:〜/ hadoop-1.2.1 $ jar -tvf hadoop-core-1.2.1.jar | grep mapred-default.xml 
47324星期一7月22日15:12:48 IST 2013 mapred-default.xml

这些文件在下面提到的hadoop源文件中被用作 addDefaultResource()方法的参数作为

  addDefaultResource( mapred-default.xml中); //首先
addDefaultResource(mapred-site.xml); // Second

最初mapred-default.xml将被加载,然后是mapred-site.xml。因此,需要重写的属性可以在mapred-site.xml中指定。

  org.apache.hadoop.conf.Configuration .java 
org.apache.hadoop.mapred.JobConf.java
org.apache.hadoop.mapred.TaskTracker.java
org.apache.hadoop.mapred.JobClient.java
org.apache.hadoop.mapred.JobTracker.java
org.apache.hadoop.mapred.JobHistoryServer.java

查看任何源代码。

I have installed a multi node setup in 3 Ubuntu systems 12.04. I am using Hadoop1.2.1 in all three.Now i want to which scheduler is running by default??? How to check the default scheduler running in Hadoop1.2.1?

解决方案

Default scheduler in hadoop is JobQueueTaskScheduler, which is a FIFO scheduler. As a default scheduler you need to refer the property mapred.jobtracker.taskScheduler in mapred-default.xml. If you want you can change the default scheduler to either CapacityScheduler or FairScheduler based on your requirement.

mapred-site.xml is used to override the default values inside mapred-default.xml, which can be found inside the configuration directory. You may not find mapred-default file in the configuration directory along with hadoop binary distribution(rpm,deb etc.), instead mapred-default.xml can be found directly inside the jar file hadoop-core-1.2.1.jar.

hackzon:~/hadoop-1.2.1$ jar -tvf hadoop-core-1.2.1.jar  | grep mapred-default.xml
 47324 Mon Jul 22 15:12:48 IST 2013 mapred-default.xml

These file is used in the below mentioned hadoop source files as an argument to addDefaultResource() method as

addDefaultResource("mapred-default.xml");   // First
addDefaultResource("mapred-site.xml");   // Second

Initially mapred-default.xml would be loaded, then mapred-site.xml. So that properties which need to be overridden can be specified inside mapred-site.xml

org.apache.hadoop.conf.Configuration.java
org.apache.hadoop.mapred.JobConf.java
org.apache.hadoop.mapred.TaskTracker.java
org.apache.hadoop.mapred.JobClient.java
org.apache.hadoop.mapred.JobTracker.java
org.apache.hadoop.mapred.JobHistoryServer.java

Have a look at any of the source code.

这篇关于技术来了解hadoop中的默认调度程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆