<?xml version="1.0" encoding="UTF-8"?>

<configuration>
    <property>
	<name>mapred.job.tracker</name>
	<value>{{ jobtracker_cluster_id }}</value>
    </property>
    <property>
	<name>mapred.jobtrackers.{{ jobtracker_cluster_id }}</name>
	<value>{{ jobtracker_cluster_id_1 }},{{ jobtracker_cluster_id_2 }}</value>
	<description>Comma-separated list of JobTracker IDs.</description>
    </property>
    <property>
	<name>mapred.jobtracker.rpc-address.{{ jobtracker_cluster_id }}.{{ jobtracker_cluster_id_1 }}</name> 
	<!-- RPC address for {{ jobtracker_cluster_id_1 }} -->
	<value>{{ jobtracker_node_1_hostname }}:{{ jobtracker_cluster_id1_rpc_port }}</value>
    </property>
    <property>
	<name>mapred.jobtracker.rpc-address.{{ jobtracker_cluster_id }}.{{ jobtracker_cluster_id_2 }}</name> 
	<!-- RPC address for {{ jobtracker_cluster_id_2 }} -->
	<value>{{ jobtracker_node_2_hostname }}:{{ jobtracker_cluster_id2_rpc_port }}</value>
    </property>
    <property>
	<name>mapred.job.tracker.http.address.{{ jobtracker_cluster_id }}.{{ jobtracker_cluster_id_1 }}</name> 
	<!-- HTTP bind address for {{ jobtracker_cluster_id_1 }} -->
	<value>0.0.0.0:{{ jobtracker_cluster_id1_http_port }}</value>
    </property>
    <property>
	<name>mapred.job.tracker.http.address.{{ jobtracker_cluster_id }}.{{ jobtracker_cluster_id_2 }}</name> 
	<!-- HTTP bind address for {{ jobtracker_cluster_id_2 }} -->
	<value>0.0.0.0:{{ jobtracker_cluster_id2_http_port }}</value>
    </property>
    <property>
	<name>mapred.ha.jobtracker.rpc-address.{{ jobtracker_cluster_id }}.{{ jobtracker_cluster_id_1 }}</name> 
	<!-- RPC address for {{ jobtracker_cluster_id_1 }} HA daemon -->
	<value>{{ jobtracker_node_1_hostname }}:{{ jobtracker_cluster_id1_ha_rpc_port }}</value>
    </property>
    <property>
	<name>mapred.ha.jobtracker.rpc-address.{{ jobtracker_cluster_id }}.{{ jobtracker_cluster_id_2 }}</name> 
	<!-- RPC address for {{ jobtracker_cluster_id_2 }} HA daemon -->
	<value>{{ jobtracker_node_2_hostname }}:{{ jobtracker_cluster_id2_ha_rpc_port }}</value>
    </property>
    <property>
	<name>mapred.ha.jobtracker.http-redirect-address.{{ jobtracker_cluster_id }}.{{ jobtracker_cluster_id_1 }}</name> 
	<!-- HTTP redirect address for {{ jobtracker_cluster_id_1 }} -->
	<value>{{ jobtracker_node_1_hostname }}:{{ jobtracker_cluster_id1_http_port }}</value>
    </property>
    <property>
	<name>mapred.ha.jobtracker.http-redirect-address.{{ jobtracker_cluster_id }}.{{ jobtracker_cluster_id_2 }}</name> 
	<!-- HTTP redirect address for {{ jobtracker_cluster_id_2 }} -->
	<value>{{ jobtracker_node_2_hostname }}:{{ jobtracker_cluster_id2_http_port }}</value>
    </property>
    <property>
	<name>mapred.jobtracker.restart.recover</name>
	<value>{{ jobtracker_restart_recover }}</value>
    </property>
    <property>
	<name>mapred.client.failover.proxy.provider.{{ jobtracker_cluster_id }}</name>
	<value>org.apache.hadoop.mapred.ConfiguredFailoverProxyProvider</value>
    </property>
    <property>
	<name>mapred.client.failover.max.attempts</name>
	<value>15</value>
    </property>
    <property>
	<name>mapred.client.failover.sleep.base.millis</name>
	<value>500</value>
    </property>
    <property>
	<name>mapred.client.failover.sleep.max.millis</name>
	<value>1500</value>  
    </property>
    <property>
	<name>mapred.client.failover.connection.retries</name>
	<value>{{ jobtracker_failover_connect_retries }}</value>  
    </property>
    <property>
	<name>mapred.client.failover.connection.retries.on.timeouts</name>
	<value>{{ jobtracker_failover_connect_retries }}</value>  
    </property>
    <property>
	<name>mapred.ha.fencing.methods</name>
	<!-- We don't need a real fencing command (?) -->
	<value>shell(/bin/true)</value>
    </property>
    <property>
	<name>mapred.ha.automatic-failover.enabled</name>
	<value>{{ jobtracker_auto_failover_enabled }}</value>
    </property>
    <property>
	<name>mapred.ha.zkfc.port</name>
	<value>{{ jobtracker_zkfc_port }}</value> 
    </property>
    <property>
	<name>mapred.task.tracker.http.address</name>
	<value>0.0.0.0:{{ mapred_tasktracker_http_port }}</value>
    </property>
    <property>
	<name>mapred.system.dir</name>
	<value>/tmp/mapred/system</value>
    </property>
    <property>
	<name>mapreduce.job.counters.max</name>
	<value>{{ mapreduce_job_counters_max }}</value>
    </property>
    <property>
	<name>mapred.healthChecker.script.path</name>
	<value></value>
    </property>
    <property>
	<name>mapred.healthChecker.script.args</name>
	<value></value>
    </property>
    <property>
	<name>mapred.local.dir</name>
	<value>/data/mapred/local</value>
    </property>
    <property>
	<name>mapred.tasktracker.instrumentation</name>
	<value>org.apache.hadoop.mapred.TaskTrackerMetricsInst</value>
    </property>
    <property>
	<name>io.sort.factor</name>
	<value>{{ mapred_io_sort_factor }}</value>
	<final>true</final>
    </property>
{% if mapred_use_fair_scheduler %}
    <property>
	<name>mapred.jobtracker.taskScheduler</name>
	<value>org.apache.hadoop.mapred.FairScheduler</value>
    </property>
    <property>
	<name>mapred.fairscheduler.allocation.file</name>
	<value>{{ mapred_fair_scheduler_allocation_file }}</value>
    </property>
{% endif %}
    <property>
	<name>mapred.reduce.slowstart.completed.maps</name>
	<value>{{ mapred_reduce_slowstart_maps }}</value>
    </property>
    <property>
	<name>mapred.tasktracker.map.tasks.maximum</name>
	<value>{{ mapred_tasktracker_map_tasks_maximum }}</value>
    </property>
    <property>
	<name>mapred.tasktracker.reduce.tasks.maximum</name>
	<value>{{ mapred_tasktracker_reduce_tasks_maximum }}</value>
    </property>
    <property>
	<name>mapred.reduce.parallel.copies</name>
	<value>{{ mapred_reduce_parallel_copies }}</value>
    </property>
    <property>
	<name>tasktracker.http.threads</name>
	<value>{{ mapred_tasktracker_http_threads }}</value>
    </property>
    <property>
	<name>mapred.userlog.retain.hours</name>
	<value>{{ mapred_userlog_retain_hours }}</value>
    </property>
    <property>
	<name>io.sort.mb</name>
	<value>{{ mapred_tasktracker_io_sort_mb }}</value>
	<final>true</final>
    </property>
    <property>
	<name>mapred.child.java.opts</name>
	<value> {{ mapred_child_java_opts }}</value>
	<final>true</final>
    </property>
    <property>
	<name>mapred.map.child.java.opts</name>
	<value> {{ mapred_map_child_java_opts }}</value>
	<final>true</final>
    </property>
    <property>
	<name>mapred.reduce.child.java.opts</name>
	<value> {{ mapred_reduce_child_java_opts }} </value>
	<final>true</final>
    </property>
    <property>
	<name>mapred.job.reuse.jvm.num.tasks</name>
	<value>1</value>
	<final>true</final>
    </property>
</configuration>
