Configuration Keys Reference

The settings you will actually touch — tuning, reproducing a bug, or reading someone's tez-site.xml — grouped by area, each with its constant name, its key string, its real default, its scope, and what it does. Read the chapter a section points at before you change a key in a patch: a setting is the public face of a subsystem.

Every key below was extracted from two source files. Grep them to confirm the constant, key, and default in your checkout:

# AM / DAG / task keys:
grep -n "TEZ_AM_CONTAINER_REUSE_ENABLED" \
  tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
# Runtime (shuffle/sort/fetch) keys:
grep -n "TEZ_RUNTIME_IO_SORT_MB" \
  tez-runtime-library/src/main/java/org/apache/tez/runtime/library/api/TezRuntimeConfiguration.java

The scope story: @ConfigurationScope

Tez annotates each public config field with @ConfigurationScope(Scope.X) (the annotation is org.apache.tez.dag.api.ConfigurationScope; the enum is org.apache.tez.dag.api.Scope). The scope answers at what level you can override the key, which is the axis that matters most when you are reasoning about Hive or another engine setting values per-query or per-vertex:

ScopeMeaning (from Scope.java)
AMCan only be set at the AM (application) level — one value for the whole app
DAGCan be set at AM or per-DAG level
VERTEXCan be set at AM, DAG, or per-vertex level — the most granular
CLIENTClient-side only; never reaches the AM
TESTOnly meaningful in test harnesses (e.g. MiniTezCluster)

Most fields also carry @ConfigurationProperty(type="…"), which the ConfigStandardDoclet (in tez-tools/tez-javadoc-tools) reads at build time to generate tez-default-template.xml — the project's canonical, generated list of every public key and default. That file is the authority; this appendix is the curated subset a maintainer reaches for.

# The generated source of truth for keys + defaults:
find . -name tez-default-template.xml

Warning: Defaults drift across versions. The values below are current on master at extraction time, not eternal — a release can change one. When the table and the generated template disagree, the template wins. @Private / @Unstable keys (noted where relevant) can change or vanish without notice.

Jump to: AM & sessions · Task & retries · Scheduling & locality · Container reuse · Speculation · Deployment & classpath · Shuffle & sort buffers · Fetch · Local mode · Recovery · Counters limits · History & UI


AM & sessions

The application master's own resources and the session lifecycle. Read ../deep-dives/dag-app-master.md.

Constant · keyDefaultScopeWhat it does
TEZ_AM_SESSION_MODE · tez.am.mode.sessionfalseAMSession mode: one AM serves many DAGs in succession. Hive turns this on
TEZ_AM_RESOURCE_MEMORY_MB · tez.am.resource.memory.mb1024AMAM container memory (MB)
TEZ_AM_RESOURCE_CPU_VCORES · tez.am.resource.cpu.vcores1AMAM container vcores
TEZ_AM_LAUNCH_CMD_OPTS · tez.am.launch.cmd-optsJDK-dependent GC optsAMAM JVM opts; leave out -Xmx so Tez auto-sizes the heap
TEZ_CONTAINER_MAX_JAVA_HEAP_FRACTION · tez.container.max.java.heap.fraction0.8AMFraction of container memory used as -Xmx when Tez auto-sizes
TEZ_AM_MAX_APP_ATTEMPTS · tez.am.max.app.attempts2AMHow many times YARN may relaunch a lost AM (enables recovery)
TEZ_AM_STAGING_DIR · tez.staging-dir/tmp/<user>/tez/stagingAMHDFS scratch dir for DAG plan, configs, resources
TEZ_SESSION_AM_DAG_SUBMIT_TIMEOUT_SECS · tez.session.am.dag.submit.timeout.secs300AMIdle session shuts down after this long with no DAG submitted (negative = never)
TEZ_SESSION_CLIENT_TIMEOUT_SECS · tez.session.client.timeout.secs120AMClient wait for the AM to come up before submitting (session mode)
TEZ_AM_SESSION_MIN_HELD_CONTAINERS · tez.am.session.min.held-containers0AMContainers an idle session holds for the next DAG's warm start
TEZ_AM_CLIENT_THREAD_COUNT · tez.am.client.am.thread-count2AMThreads handling client RPC
TEZ_QUEUE_NAME · tez.queue.name(none)AMYARN queue the application is submitted to
TEZ_AM_ACLS_ENABLED · tez.am.acls.enabledtrueAMEnforce view/modify ACLs on the AM and its DAGs

Task & retries

Task container resources, heartbeats, and the retry limits that decide when a task (and thus the DAG) fails. Read ../deep-dives/task-attempt-lifecycle.md and ../deep-dives/failure-handling.md.

Constant · keyDefaultScopeWhat it does
TEZ_TASK_RESOURCE_MEMORY_MB · tez.task.resource.memory.mb1024DAGTask container memory (MB); same value across tasks aids reuse
TEZ_TASK_RESOURCE_CPU_VCORES · tez.task.resource.cpu.vcores1DAGTask container vcores
TEZ_AM_TASK_MAX_FAILED_ATTEMPTS · tez.am.task.max.failed.attempts4VERTEXFailed attempts (not killed) before the task — and the DAG — fails
TEZ_AM_TASK_MAX_ATTEMPTS · tez.am.task.max.attempts0 (disabled)VERTEXHard cap on all attempts (failed + killed); 0 disables the cap
TEZ_AM_MAX_TASK_FAILURES_PER_NODE · tez.am.maxtaskfailures.per.node10AMTask failures on a node before it is considered faulty
TASK_HEARTBEAT_TIMEOUT_MS · tez.task.timeout-ms300000 (5 min)AMNo heartbeat for this long → attempt declared lost
TASK_HEARTBEAT_TIMEOUT_CHECK_MS · tez.task.heartbeat.timeout.check-ms30000AMInterval between lost-task sweeps
TEZ_TASK_AM_HEARTBEAT_INTERVAL_MS · tez.task.am.heartbeat.interval-ms.max100AMMax task→AM heartbeat interval
TEZ_TASK_MAX_EVENTS_PER_HEARTBEAT · tez.task.max-events-per-heartbeat500AMEvents pulled from the AM per heartbeat
TEZ_TASK_GET_TASK_SLEEP_INTERVAL_MS_MAX · tez.task.get-task.sleep.interval-ms.max200AMMax backoff a container waits before asking for another task
TEZ_AM_MAX_ALLOWED_TIME_FOR_TASK_READ_ERROR_SEC · tez.am.max.allowed.time-sec.for-read-error300AMWindow in which a consumer's read-errors can trigger producer rerun
TEZ_TASK_MAX_ALLOWED_OUTPUT_FAILURES · tez.task.max.allowed.output.failures10AMUnique downstream fetch failures before the producer attempt is failed
TEZ_VERTEX_FAILURES_MAXPERCENT · tez.vertex.failures.maxpercent0.0VERTEXPercent of a vertex's tasks allowed to fail while the vertex still succeeds

Scheduling & locality

Cross-vertex ordering, the schedulers, and how long the AM waits for local containers. Read ../deep-dives/scheduler.md.

Constant · keyDefaultScopeWhat it does
TEZ_AM_DAG_SCHEDULER_CLASS · tez.am.dag.scheduler.class...dag.impl.DAGSchedulerNaturalOrderDAGCross-vertex scheduling order
TEZ_AM_YARN_SCHEDULER_CLASS · tez.am.yarn.scheduler.class...rm.DagAwareYarnTaskSchedulerAMYARN task-scheduler implementation
TEZ_AM_NODE_BLACKLISTING_ENABLED · tez.am.node-blacklisting.enabledtrueAMStop scheduling on nodes with too many failures
TEZ_AM_NODE_BLACKLISTING_IGNORE_THRESHOLD · tez.am.node-blacklisting.ignore-threshold-node-percent33AMCap on % of cluster that may be blacklisted (guards mass outages)
TEZ_AM_RM_HEARTBEAT_INTERVAL_MS_MAX · tez.am.am-rm.heartbeat.interval-ms.max1000AMMax AM→RM heartbeat interval (raise to scale)
TEZ_AM_CONTAINERLAUNCHER_THREAD_COUNT_LIMIT · tez.am.containerlauncher.thread-count-limit500AMThreads launching containers
TEZ_AM_PREEMPTION_PERCENTAGE · tez.am.preemption.percentage10AM% of preemptable tasks preempted per round (0 = off)
TEZ_AM_PREEMPTION_MAX_WAIT_TIME_MS · tez.am.preemption.max.wait-time-ms60000AMDeadline before an unsatisfied request preempts, to avoid hangs
TEZ_AM_VERTEX_MAX_TASK_CONCURRENCY · tez.am.vertex.max-task-concurrency-1 (unlimited)VERTEXCap concurrent attempts per vertex

Container reuse

Keeping containers hot between tasks — the biggest single perf lever over MapReduce. Read ../deep-dives/container-reuse.md.

Constant · keyDefaultScopeWhat it does
TEZ_AM_CONTAINER_REUSE_ENABLED · tez.am.container.reuse.enabledtrueAMMaster switch for reuse
TEZ_AM_CONTAINER_REUSE_RACK_FALLBACK_ENABLED · tez.am.container.reuse.rack-fallback.enabledtrueAMReuse a container for a rack-local (not node-local) task
TEZ_AM_CONTAINER_REUSE_NON_LOCAL_FALLBACK_ENABLED · tez.am.container.reuse.non-local-fallback.enabledfalseAMReuse for non-local tasks (can hurt locality badly)
TEZ_AM_CONTAINER_REUSE_NEW_CONTAINERS_ENABLED · tez.am.container.reuse.new-containers.enabledfalseAMHold newly-allocated-but-unassigned containers for reuse
TEZ_AM_CONTAINER_REUSE_LOCALITY_DELAY_ALLOCATION_MILLIS · tez.am.container.reuse.locality.delay-allocation-millis250AMDelay before falling to the next locality level (delay scheduling)
TEZ_AM_CONTAINER_IDLE_RELEASE_TIMEOUT_MIN_MILLIS · tez.am.container.idle.release-timeout-min.millis5000AMMin time an idle container is held before it may be released
TEZ_AM_CONTAINER_IDLE_RELEASE_TIMEOUT_MAX_MILLIS · tez.am.container.idle.release-timeout-max.millis10000AMMax idle-hold time; actual expiry is randomized in this band

Speculation

Re-running stragglers. Off by default. Read ../deep-dives/failure-handling.md.

Constant · keyDefaultScopeWhat it does
TEZ_AM_SPECULATION_ENABLED · tez.am.speculation.enabledfalseVERTEXEnable speculative re-execution of slow tasks
TEZ_AM_SPECULATOR_CLASS · tez.am.speculator.class(built-in default)VERTEXSpeculator implementation
TEZ_AM_TASK_ESTIMATOR_CLASS · tez.am.task.estimator.class(built-in default)VERTEXRuntime estimator feeding the speculator
TEZ_AM_PROPORTION_RUNNING_TASKS_SPECULATABLE · tez.am.proportion.running.tasks.speculatable0.1VERTEXMax fraction of running tasks speculatable at once
TEZ_AM_PROPORTION_TOTAL_TASKS_SPECULATABLE · tez.am.proportion.total.tasks.speculatable0.01VERTEXMax fraction of all tasks speculatable at once
TEZ_AM_MINIMUM_ALLOWED_SPECULATIVE_TASKS · tez.am.minimum.allowed.speculative.tasks10VERTEXFloor on speculatable task count
TEZ_AM_LEGACY_SPECULATIVE_SINGLE_TASK_VERTEX_TIMEOUT · tez.am.legacy.speculative.single.task.vertex.timeout-1AMTimeout after which a single-task vertex is speculated (neg = off)

Deployment & classpath

Where the framework and libraries come from — the settings that make or break a deployment. Read ../deep-dives/tez-client.md.

Constant · keyDefaultScopeWhat it does
TEZ_LIB_URIS · tez.lib.uris(none)AMHDFS path(s) to the Tez tarball localized for AM + containers. The key deployment setting
TEZ_LIB_URIS_CLASSPATH · tez.lib.uris.classpath(none)AMRelative classpath inside the tez.lib.uris archives
TEZ_AUX_URIS · tez.aux.uris(none)AMExtra resources localized into AM/container working dirs
TEZ_USE_CLUSTER_HADOOP_LIBS · tez.use.cluster.hadoop-libsfalseAMUse the cluster's Hadoop jars instead of bundling them in tez.lib.uris
TEZ_IGNORE_LIB_URIS · tez.ignore.lib.uris(none)AMIgnore tez.lib.uris (dev/debug when classpath comes via LocalResources)
TEZ_USER_CLASSPATH_FIRST · tez.user.classpath.firsttrueCLIENTPut user classpath before the framework classpath
TEZ_CLUSTER_ADDITIONAL_CLASSPATH_PREFIX · tez.cluster.additional.classpath.prefix(none)AMExtra classpath entries for AM + containers
TEZ_AM_SHUFFLE_AUXILIARY_SERVICE_ID · tez.am.shuffle.auxiliary-service.idtez_shuffleAMName of the NodeManager shuffle aux-service to fetch from

Warning: tez.lib.uris is the single most common source of "AM won't start" and ClassNotFoundException failures. If it points at a tarball whose internal layout doesn't match tez.lib.uris.classpath, containers come up with a broken classpath. Verify the tarball exists in HDFS and its structure before chasing anything subtler.

Shuffle & sort buffers

Producer-side sort and the sorter choice. Runtime keys; scope is effectively per-vertex via the runtime config. Read ../deep-dives/shuffle-sort.md.

Constant · keyDefaultWhat it does
TEZ_RUNTIME_IO_SORT_MB · tez.runtime.io.sort.mb100Sort buffer size (MB) per output; the primary sort-memory knob
TEZ_RUNTIME_SORT_SPILL_PERCENT · tez.runtime.sort.spill.percent0.8Buffer fullness that triggers a spill to disk
TEZ_RUNTIME_IO_SORT_FACTOR · tez.runtime.io.sort.factor100Streams merged at once during sort/merge
TEZ_RUNTIME_SORTER_CLASS · tez.runtime.sorter.classPIPELINEDSorter: PIPELINED (default) or LEGACY (DefaultSorter)
TEZ_RUNTIME_PIPELINED_SORTER_SORT_THREADS · tez.runtime.pipelined.sorter.sort.threads2Background sort threads for the pipelined sorter
TEZ_RUNTIME_PIPELINED_SORTER_MIN_BLOCK_SIZE_IN_MB · tez.runtime.pipelined.sorter.min-block.size.in.mb2000Chunk size the pipelined sorter allocates io.sort.mb in
TEZ_RUNTIME_PIPELINED_SORTER_LAZY_ALLOCATE_MEMORY · tez.runtime.pipelined.sorter.lazy-allocate.memoryfalseGrow sort memory on demand vs allocate all upfront
TEZ_RUNTIME_COMBINE_MIN_SPILLS · tez.runtime.combine.min.spills3Spills that must exist before the combiner runs on merge
TEZ_RUNTIME_INDEX_CACHE_MEMORY_LIMIT_BYTES · tez.runtime.index.cache.memory.limit.bytes1048576Memory for caching spill index records
TEZ_RUNTIME_UNORDERED_OUTPUT_BUFFER_SIZE_MB · tez.runtime.unordered.output.buffer.size-mb100Buffer for unsorted output before spilling
TEZ_RUNTIME_COMPRESS · tez.runtime.compress(unset)Compress intermediate data
TEZ_RUNTIME_COMPRESS_CODEC · tez.runtime.compress.codec(unset)Codec class for intermediate compression
TEZ_RUNTIME_PIPELINED_SHUFFLE_ENABLED · tez.runtime.pipelined-shuffle.enabledfalseShip each spill as it's written; needs final-merge off + speculation off
TEZ_RUNTIME_ENABLE_FINAL_MERGE_IN_OUTPUT · tez.runtime.enable.final-merge.in.outputtrueMerge all spills into one sorted output; disable for pipelined shuffle

Fetch & transfer

Consumer-side fetch parallelism, buffers, and failure thresholds. Read ../deep-dives/shuffle-sort.md.

Constant · keyDefaultWhat it does
TEZ_RUNTIME_SHUFFLE_PARALLEL_COPIES · tez.runtime.shuffle.parallel.copies20Concurrent fetchers per consumer
TEZ_RUNTIME_SHUFFLE_FETCH_FAILURES_LIMIT · tez.runtime.shuffle.fetch.failures.limit5Fetch failures for one source before reporting it
TEZ_RUNTIME_SHUFFLE_FETCH_MAX_TASK_OUTPUT_AT_ONCE · tez.runtime.shuffle.fetch.max.task.output.at.once20Max outputs fetched from one host per connection
TEZ_RUNTIME_SHUFFLE_FETCH_BUFFER_PERCENT · tez.runtime.shuffle.fetch.buffer.percent0.90Fraction of task memory for the fetch buffer
TEZ_RUNTIME_SHUFFLE_MEMORY_LIMIT_PERCENT · tez.runtime.shuffle.memory.limit.percent0.25Max fraction of shuffle memory a single fetched output may use
TEZ_RUNTIME_SHUFFLE_MERGE_PERCENT · tez.runtime.shuffle.merge.percent0.90Shuffle-memory fullness that triggers a memory-to-disk merge
TEZ_RUNTIME_SHUFFLE_CONNECT_TIMEOUT · tez.runtime.shuffle.connect.timeout180000Fetch connect timeout (ms)
TEZ_RUNTIME_SHUFFLE_READ_TIMEOUT · tez.runtime.shuffle.read.timeout180000Fetch read timeout (ms)
TEZ_RUNTIME_SHUFFLE_KEEP_ALIVE_ENABLED · tez.runtime.shuffle.keep-alive.enabledfalseHTTP keep-alive to the shuffle handler
TEZ_RUNTIME_SHUFFLE_HOST_PENALTY_TIME_LIMIT_MS · tez.runtime.shuffle.host.penalty.time.limit600000Max backoff before retrying a penalized host
TEZ_RUNTIME_OPTIMIZE_LOCAL_FETCH · tez.runtime.optimize.local.fetchtrueRead local outputs directly, bypassing HTTP
TEZ_RUNTIME_EMPTY_PARTITION_INFO_VIA_EVENTS_ENABLED · tez.runtime.empty.partitions.info-via-events.enabledtrueSignal empty partitions via events so no fetch is attempted

Local mode

Running everything in one JVM for debugging. Read ../deep-dives/local-mode.md.

Constant · keyDefaultScopeWhat it does
TEZ_LOCAL_MODE · tez.local.modefalseAMRun AM and tasks in a single process, no YARN
TEZ_LOCAL_MODE_WITHOUT_NETWORK · tez.local.mode.without.networkfalseAMSkip RPC; LocalClient calls the AM directly (only with local mode on)
TEZ_AM_INLINE_TASK_EXECUTION_ENABLED · tez.am.inline.task.execution.enabledfalseAMRun tasks inside the AM process (uber-style; @Private)
TEZ_AM_INLINE_TASK_EXECUTION_MAX_TASKS · tez.am.inline.task.execution.max-tasks1AMParallel tasks in the AM process when inline execution is on

Recovery

Surviving an AM restart. Read ../deep-dives/failure-handling.md.

Constant · keyDefaultScopeWhat it does
DAG_RECOVERY_ENABLED · tez.dag.recovery.enabledtrueAMRecover in-flight DAGs on a new AM attempt
TEZ_AM_FAILURE_ON_MISSING_RECOVERY_DATA · tez.am.failure.on.missing.recovery.datafalseAMFail if recovery is on but nothing was found to recover
DAG_RECOVERY_MAX_UNFLUSHED_EVENTS · tez.dag.recovery.max.unflushed.events100AMRecovery events buffered before a forced flush
DAG_RECOVERY_FLUSH_INTERVAL_SECS · tez.dag.recovery.flush.interval.secs30AMInterval between recovery-log flushes
DAG_RECOVERY_FILE_IO_BUFFER_SIZE · tez.dag.recovery.io.buffer.size8192AMIO buffer (bytes) for the recovery file

Counters limits

Bounds that stop a runaway counter set from OOMing the AM. All @Unstable, AM-scope. Read ../deep-dives/counters-diagnostics.md.

Constant · keyDefaultWhat it does
TEZ_COUNTERS_MAX · tez.counters.max1200Max counters per DAG
TEZ_COUNTERS_MAX_GROUPS · tez.counters.max.groups500Max counter groups per DAG
TEZ_COUNTERS_COUNTER_NAME_MAX_LENGTH · tez.counters.counter-name.max-length64Max counter-name length
TEZ_COUNTERS_GROUP_NAME_MAX_LENGTH · tez.counters.group-name.max-length256Max group-name length

Note: The older tez.am.counters.* keys are deprecated aliases of these, registered via Configuration.addDeprecation in TezConfiguration's static initializer. Grep: grep -n "addDeprecation" TezConfiguration.java.

History & UI

Where lifecycle history is logged and how the UI finds it. Read ../deep-dives/counters-diagnostics.md.

Constant · keyDefaultScopeWhat it does
TEZ_HISTORY_LOGGING_SERVICE_CLASS · tez.history.logging.service.class...impl.SimpleHistoryLoggingServiceAMWhich history backend to use (Simple / ATS / Proto / DevNull)
TEZ_HISTORY_LOGGING_LOGLEVEL · tez.history.logging.log.level(HistoryLogLevel default)DAGLimit which event types are logged (AM / DAG / VERTEX / TASK / ALL)
TEZ_SIMPLE_HISTORY_LOGGING_DIR · tez.simple.history.logging.dircontainer log dirAMOutput dir for SimpleHistoryLoggingService
TEZ_HISTORY_LOGGING_PROTO_BASE_DIR · tez.history.logging.proto-base-dir(none)AMBase dir for ProtoHistoryLoggingService; unset disables it
TEZ_HISTORY_LOGGING_PROTO_QUEUE_SIZE · tez.history.logging.queue.size100000AMMax queue for the proto history logger
YARN_ATS_EVENT_FLUSH_TIMEOUT_MILLIS · tez.yarn.ats.event.flush.timeout.millis-1AMFlush timeout for ATS on shutdown (-1 = compute)
TEZ_GENERATE_DEBUG_ARTIFACTS · tez.generate.debug.artifactsfalseDAGEmit the DAG plan in text for debugging

Note: Hive typically configures ProtoHistoryLoggingService and reads it back with tez-history-parser, rather than relying on ATS. See the key classes map for the plugin classes.