当前位置: 动力学知识库 > 问答 > 编程问答 >

hadoop - Job Configuration Object

问题描述:

I am implementing a new algorithm for scheduling in hadoop called TaskTrackerAware Scheduler. I have to configure some properties such as mapred.tascheduler.task.max ( maximum number of tasks that can run on a tasktracker for a single job) and mapred.tascheduler.hosts (host names of the task tracker in which jobs need to be run). How to configure these properties in Job configuration object?

网友答案:

Find below the snippet that may help you,

Configurarion conf = new Configuration();
conf.set("mapred.tascheduler.task.max" , <value>);
conf.set("mapred.tascheduler.hosts " ,   <value>);

Job job = Job.getInstance(conf, "app name");

Let me know if you need any further help..

分享给朋友:
您可能感兴趣的文章:
随机阅读: