配置参数
This documentation is for an out-of-date version of Apache Flink. We recommend you use the latest stable version.

配置参数 #

All configuration is done in conf/flink-conf.yaml, which is expected to be a flat collection of YAML key value pairs with format key: value.

The configuration is parsed and evaluated when the Flink processes are started. Changes to the configuration file require restarting the relevant processes.

The out of the box configuration will use your default Java installation. You can manually set the environment variable JAVA_HOME or the configuration key env.java.home in conf/flink-conf.yaml if you want to manually override the Java runtime to use.

You can specify a different configuration directory location by defining the FLINK_CONF_DIR environment variable. For resource providers which provide non-session deployments, you can specify per-job configurations this way. Make a copy of the conf directory from the Flink distribution and modify the settings on a per-job basis. Note that this is not supported in Docker or standalone Kubernetes deployments. On Docker-based deployments, you can use the FLINK_PROPERTIES environment variable for passing configuration values.

On session clusters, the provided configuration will only be used for configuring execution parameters, e.g. configuration parameters affecting the job, not the underlying cluster.

Basic Setup #

The default configuration supports starting a single-node Flink session cluster without any changes. The options in this section are the ones most commonly needed for a basic distributed Flink setup.

Hostnames / Ports

These options are only necessary for standalone application- or session deployments (simple standalone or Kubernetes).

If you use Flink with Yarn or the active Kubernetes integration, the hostnames and ports are automatically discovered.

  • rest.address, rest.port: These are used by the client to connect to Flink. Set this to the hostname where the JobManager runs, or to the hostname of the (Kubernetes) service in front of the JobManager’s REST interface.

  • The jobmanager.rpc.address (defaults to “localhost”) and jobmanager.rpc.port (defaults to 6123) config entries are used by the TaskManager to connect to the JobManager/ResourceManager. Set this to the hostname where the JobManager runs, or to the hostname of the (Kubernetes internal) service for the JobManager. This option is ignored on setups with high-availability where the leader election mechanism is used to discover this automatically.

Memory Sizes

The default memory sizes support simple streaming/batch applications, but are too low to yield good performance for more complex applications.

  • jobmanager.memory.process.size: Total size of the JobManager (JobMaster / ResourceManager / Dispatcher) process.
  • taskmanager.memory.process.size: Total size of the TaskManager process.

The total sizes include everything. Flink will subtract some memory for the JVM’s own memory requirements (metaspace and others), and divide and configure the rest automatically between its components (JVM Heap, Off-Heap, for Task Managers also network, managed memory etc.).

These value are configured as memory sizes, for example 1536m or 2g.

Parallelism

  • taskmanager.numberOfTaskSlots: The number of slots that a TaskManager offers (default: 1). Each slot can take one task or pipeline. Having multiple slots in a TaskManager can help amortize certain constant overheads (of the JVM, application libraries, or network connections) across parallel tasks or pipelines. See the Task Slots and Resources concepts section for details.

    Running more smaller TaskManagers with one slot each is a good starting point and leads to the best isolation between tasks. Dedicating the same resources to fewer larger TaskManagers with more slots can help to increase resource utilization, at the cost of weaker isolation between the tasks (more tasks share the same JVM).

  • parallelism.default: The default parallelism used when no parallelism is specified anywhere (default: 1).

Checkpointing

You can configure checkpointing directly in code within your Flink job or application. Putting these values here in the configuration defines them as defaults in case the application does not configure anything.

  • state.backend: The state backend to use. This defines the data structure mechanism for taking snapshots. Common values are filesystem or rocksdb.
  • state.checkpoints.dir: The directory to write checkpoints to. This takes a path URI like s3://mybucket/flink-app/checkpoints or hdfs://namenode:port/flink/checkpoints.
  • state.savepoints.dir: The default directory for savepoints. Takes a path URI, similar to state.checkpoints.dir.
  • execution.checkpointing.interval: The base interval setting. To enable checkpointing, you need to set this value larger than 0.

Web UI

  • web.submit.enable: Enables uploading and starting jobs through the Flink UI (true by default). Please note that even when this is disabled, session clusters still accept jobs through REST requests (HTTP calls). This flag only guards the feature to upload jobs in the UI.
  • web.cancel.enable: Enables canceling jobs through the Flink UI (true by default). Please note that even when this is disabled, session clusters still cancel jobs through REST requests (HTTP calls). This flag only guards the feature to cancel jobs in the UI.
  • web.upload.dir: The directory where to store uploaded jobs. Only used when web.submit.enable is true.

Other

  • io.tmp.dirs: The directories where Flink puts local data, defaults to the system temp directory (java.io.tmpdir property). If a list of directories is configured, Flink will rotate files across the directories.

    The data put in these directories include by default the files created by RocksDB, spilled intermediate results (batch algorithms), and cached jar files.

    This data is NOT relied upon for persistence/recovery, but if this data gets deleted, it typically causes a heavyweight recovery operation. It is hence recommended to set this to a directory that is not automatically periodically purged.

    Yarn and Kubernetes setups automatically configure this value to the local working directories by default.



Common Setup Options #

Common options to configure your Flink application or cluster.

Hosts and Ports #

Options to configure hostnames and ports for the different Flink components.

The JobManager hostname and port are only relevant for standalone setups without high-availability. In that setup, the config values are used by the TaskManagers to find (and connect to) the JobManager. In all highly-available setups, the TaskManagers discover the JobManager via the High-Availability-Service (for example ZooKeeper).

Setups using resource orchestration frameworks (K8s, Yarn) typically use the framework’s service discovery facilities.

You do not need to configure any TaskManager hosts and ports, unless the setup requires the use of specific port ranges or specific network interfaces to bind to.

Key Default Type Description
jobmanager.rpc.address
(none) String The config parameter defining the network address to connect to for communication with the job manager. This value is only interpreted in setups where a single JobManager with static name or address exists (simple standalone setups, or container setups with dynamic service name resolution). It is not used in many high-availability setups, when a leader-election service (like ZooKeeper) is used to elect and discover the JobManager leader from potentially multiple standby JobManagers.
jobmanager.rpc.port
6123 Integer The config parameter defining the network port to connect to for communication with the job manager. Like jobmanager.rpc.address, this value is only interpreted in setups where a single JobManager with static name/address and port exists (simple standalone setups, or container setups with dynamic service name resolution). This config option is not used in many high-availability setups, when a leader-election service (like ZooKeeper) is used to elect and discover the JobManager leader from potentially multiple standby JobManagers.
metrics.internal.query-service.port
"0" String The port range used for Flink's internal metric query service. Accepts a list of ports (“50100,50101”), ranges(“50100-50200”) or a combination of both. It is recommended to set a range of ports to avoid collisions when multiple Flink components are running on the same machine. Per default Flink will pick a random port.
rest.address
(none) String The address that should be used by clients to connect to the server. Attention: This option is respected only if the high-availability configuration is NONE.
rest.bind-address
(none) String The address that the server binds itself.
rest.bind-port
"8081" String The port that the server binds itself. Accepts a list of ports (“50100,50101”), ranges (“50100-50200”) or a combination of both. It is recommended to set a range of ports to avoid collisions when multiple Rest servers are running on the same machine.
rest.port
8081 Integer The port that the client connects to. If rest.bind-port has not been specified, then the REST server will bind to this port. Attention: This option is respected only if the high-availability configuration is NONE.
taskmanager.data.port
0 Integer The task manager’s external port used for data exchange operations.
taskmanager.host
(none) String The external address of the network interface where the TaskManager is exposed. Because different TaskManagers need different values for this option, usually it is specified in an additional non-shared TaskManager-specific config file.
taskmanager.rpc.port
"0" String The external RPC port where the TaskManager is exposed. Accepts a list of ports (“50100,50101”), ranges (“50100-50200”) or a combination of both. It is recommended to set a range of ports to avoid collisions when multiple TaskManagers are running on the same machine.

Fault Tolerance #

These configuration options control Flink’s restart behaviour in case of failures during the execution. By configuring these options in your flink-conf.yaml, you define the cluster’s default restart strategy.

The default restart strategy will only take effect if no job specific restart strategy has been configured via the ExecutionConfig.

Key Default Type Description
restart-strategy
(none) String Defines the restart strategy to use in case of job failures.
Accepted values are:
  • none, off, disable: No restart strategy.
  • fixeddelay, fixed-delay: Fixed delay restart strategy. More details can be found here.
  • failurerate, failure-rate: Failure rate restart strategy. More details can be found here.
  • exponentialdelay, exponential-delay: Exponential delay restart strategy. More details can be found here.
If checkpointing is disabled, the default value is none. If checkpointing is enabled, the default value is fixed-delay with Integer.MAX_VALUE restart attempts and '1 s' delay.

Fixed Delay Restart Strategy

Key Default Type Description
restart-strategy.fixed-delay.attempts
1 Integer The number of times that Flink retries the execution before the job is declared as failed if restart-strategy has been set to fixed-delay.
restart-strategy.fixed-delay.delay
1 s Duration Delay between two consecutive restart attempts if restart-strategy has been set to fixed-delay. Delaying the retries can be helpful when the program interacts with external systems where for example connections or pending transactions should reach a timeout before re-execution is attempted. It can be specified using notation: "1 min", "20 s"

Failure Rate Restart Strategy

Key Default Type Description
restart-strategy.failure-rate.delay
1 s Duration Delay between two consecutive restart attempts if restart-strategy has been set to failure-rate. It can be specified using notation: "1 min", "20 s"
restart-strategy.failure-rate.failure-rate-interval
1 min Duration Time interval for measuring failure rate if restart-strategy has been set to failure-rate. It can be specified using notation: "1 min", "20 s"
restart-strategy.failure-rate.max-failures-per-interval
1 Integer Maximum number of restarts in given time interval before failing a job if restart-strategy has been set to failure-rate.

Retryable Cleanup #

After jobs reach a globally-terminal state, a cleanup of all related resources is performed. This cleanup can be retried in case of failure. Different retry strategies can be configured to change this behavior:

Key Default Type Description
cleanup-strategy
"exponential-delay" String Defines the cleanup strategy to use in case of cleanup failures.
Accepted values are:
  • none, disable, off: Cleanup is only performed once. No retry will be initiated in case of failure. The job artifacts (and the job's JobResultStore entry) have to be cleaned up manually in case of a failure.
  • fixed-delay, fixeddelay: Cleanup attempts will be separated by a fixed interval up to the point where the cleanup is considered successful or a set amount of retries is reached. Reaching the configured limit means that the job artifacts (and the job's JobResultStore entry) might need to be cleaned up manually.
  • exponential-delay, exponentialdelay: Exponential delay restart strategy triggers the cleanup with an exponentially increasing delay up to the point where the cleanup succeeded or a set amount of retries is reached. Reaching the configured limit means that the job artifacts (and the job's JobResultStore entry) might need to be cleaned up manually.
The default configuration relies on an exponentially delayed retry strategy with the given default values.

Fixed-Delay Cleanup Retry Strategy

Key Default Type Description
cleanup-strategy.fixed-delay.attempts
infinite Integer The number of times that Flink retries the cleanup before giving up if cleanup-strategy has been set to fixed-delay. Reaching the configured limit means that the job artifacts (and the job's JobResultStore entry) might need to be cleaned up manually.
cleanup-strategy.fixed-delay.delay
1 min Duration Amount of time that Flink waits before re-triggering the cleanup after a failed attempt if the cleanup-strategy is set to fixed-delay. It can be specified using the following notation: "1 min", "20 s"

Exponential-Delay Cleanup Retry Strategy

Key Default Type Description
cleanup-strategy.exponential-delay.attempts
infinite Integer The number of times a failed cleanup is retried if cleanup-strategy has been set to exponential-delay. Reaching the configured limit means that the job artifacts (and the job's JobResultStore entry) might need to be cleaned up manually.
cleanup-strategy.exponential-delay.initial-backoff
1 s Duration Starting duration between cleanup retries if cleanup-strategy has been set to exponential-delay. It can be specified using the following notation: "1 min", "20 s"
cleanup-strategy.exponential-delay.max-backoff
1 h Duration The highest possible duration between cleanup retries if cleanup-strategy has been set to exponential-delay. It can be specified using the following notation: "1 min", "20 s"

Checkpoints and State Backends #

These options control the basic setup of state backends and checkpointing behavior.

The options are only relevant for jobs/applications executing in a continuous streaming fashion. Jobs/applications executing in a batch fashion do not use state backends and checkpoints, but different internal data structures that are optimized for batch processing.

Key Default Type Description
state.backend
(none) String The state backend to be used to store state.
The implementation can be specified either via their shortcut name, or via the class name of a StateBackendFactory. If a factory is specified it is instantiated via its zero argument constructor and its StateBackendFactory#createFromConfig(ReadableConfig, ClassLoader) method is called.
Recognized shortcut names are 'hashmap' and 'rocksdb'.
state.checkpoint-storage
(none) String The checkpoint storage implementation to be used to checkpoint state.
The implementation can be specified either via their shortcut name, or via the class name of a CheckpointStorageFactory. If a factory is specified it is instantiated via its zero argument constructor and its CheckpointStorageFactory#createFromConfig(ReadableConfig, ClassLoader) method is called.
Recognized shortcut names are 'jobmanager' and 'filesystem'.
state.checkpoints.dir
(none) String The default directory used for storing the data files and meta data of checkpoints in a Flink supported filesystem. The storage path must be accessible from all participating processes/nodes(i.e. all TaskManagers and JobManagers).
state.savepoints.dir
(none) String The default directory for savepoints. Used by the state backends that write savepoints to file systems (HashMapStateBackend, EmbeddedRocksDBStateBackend).
state.backend.incremental
false Boolean Option whether the state backend should create incremental checkpoints, if possible. For an incremental checkpoint, only a diff from the previous checkpoint is stored, rather than the complete checkpoint state. Once enabled, the state size shown in web UI or fetched from rest API only represents the delta checkpoint size instead of full checkpoint size. Some state backends may not support incremental checkpoints and ignore this option.
state.backend.local-recovery
false Boolean This option configures local recovery for this state backend. By default, local recovery is deactivated. Local recovery currently only covers keyed state backends (including both the EmbeddedRocksDBStateBackend and the HashMapStateBackend).
state.checkpoints.num-retained
1 Integer The maximum number of completed checkpoints to retain.
taskmanager.state.local.root-dirs
(none) String The config parameter defining the root directories for storing file-based state for local recovery. Local recovery currently only covers keyed state backends. If not configured it will default to <WORKING_DIR>/localState. The <WORKING_DIR> can be configured via process.taskmanager.working-dir

High Availability #

High-availability here refers to the ability of the JobManager process to recover from failures.

The JobManager ensures consistency during recovery across TaskManagers. For the JobManager itself to recover consistently, an external service must store a minimal amount of recovery metadata (like “ID of last committed checkpoint”), as well as help to elect and lock which JobManager is the leader (to avoid split-brain situations).

Key Default Type Description
high-availability
"NONE" String Defines high-availability mode used for the cluster execution. To enable high-availability, set this mode to "ZOOKEEPER" or specify FQN of factory class.
high-availability.cluster-id
"/default" String The ID of the Flink cluster, used to separate multiple Flink clusters from each other. Needs to be set for standalone clusters but is automatically inferred in YARN.
high-availability.storageDir
(none) String File system path (URI) where Flink persists metadata in high-availability setups.

Options for the JobResultStore in high-availability setups

Key Default Type Description
job-result-store.delete-on-commit
true Boolean Determines whether job results should be automatically removed from the underlying job result store when the corresponding entity transitions into a clean state. If false, the cleaned job results are, instead, marked as clean to indicate their state. In this case, Flink no longer has ownership and the resources need to be cleaned up by the user.
job-result-store.storage-path
(none) String Defines where job results should be stored. This should be an underlying file-system that provides read-after-write consistency. By default, this is {high-availability.storageDir}/job-result-store/{high-availability.cluster-id}.

Options for high-availability setups with ZooKeeper

Key Default Type Description
high-availability.zookeeper.path.root
"/flink" String The root path under which Flink stores its entries in ZooKeeper.
high-availability.zookeeper.quorum
(none) String The ZooKeeper quorum to use, when running Flink in a high-availability mode with ZooKeeper.

Memory Configuration #

These configuration values control the way that TaskManagers and JobManagers use memory.

Flink tries to shield users as much as possible from the complexity of configuring the JVM for data-intensive processing. In most cases, users should only need to set the values taskmanager.memory.process.size or taskmanager.memory.flink.size (depending on how the setup), and possibly adjusting the ratio of JVM heap and Managed Memory via taskmanager.memory.managed.fraction. The other options below can be used for performance tuning and fixing memory related errors.

For a detailed explanation of how these options interact, see the documentation on TaskManager and JobManager memory configurations.

Key Default Type Description
jobmanager.memory.enable-jvm-direct-memory-limit
false Boolean Whether to enable the JVM direct memory limit of the JobManager process (-XX:MaxDirectMemorySize). The limit will be set to the value of 'jobmanager.memory.off-heap.size' option.
jobmanager.memory.flink.size
(none) MemorySize Total Flink Memory size for the JobManager. This includes all the memory that a JobManager consumes, except for JVM Metaspace and JVM Overhead. It consists of JVM Heap Memory and Off-heap Memory. See also 'jobmanager.memory.process.size' for total process memory size configuration.
jobmanager.memory.heap.size
(none) MemorySize JVM Heap Memory size for JobManager. The minimum recommended JVM Heap size is 128.000mb (134217728 bytes).
jobmanager.memory.jvm-metaspace.size
256 mb MemorySize JVM Metaspace Size for the JobManager.
jobmanager.memory.jvm-overhead.fraction
0.1 Float Fraction of Total Process Memory to be reserved for JVM Overhead. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less or greater than the configured min or max size, the min or max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min and max size to the same value.
jobmanager.memory.jvm-overhead.max
1 gb MemorySize Max JVM Overhead size for the JobManager. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less or greater than the configured min or max size, the min or max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min and max size to the same value.
jobmanager.memory.jvm-overhead.min
192 mb MemorySize Min JVM Overhead size for the JobManager. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less or greater than the configured min or max size, the min or max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min and max size to the same value.
jobmanager.memory.off-heap.size
128 mb MemorySize Off-heap Memory size for JobManager. This option covers all off-heap memory usage including direct and native memory allocation. The JVM direct memory limit of the JobManager process (-XX:MaxDirectMemorySize) will be set to this value if the limit is enabled by 'jobmanager.memory.enable-jvm-direct-memory-limit'.
jobmanager.memory.process.size
(none) MemorySize Total Process Memory size for the JobManager. This includes all the memory that a JobManager JVM process consumes, consisting of Total Flink Memory, JVM Metaspace, and JVM Overhead. In containerized setups, this should be set to the container memory. See also 'jobmanager.memory.flink.size' for Total Flink Memory size configuration.
taskmanager.memory.flink.size
(none) MemorySize Total Flink Memory size for the TaskExecutors. This includes all the memory that a TaskExecutor consumes, except for JVM Metaspace and JVM Overhead. It consists of Framework Heap Memory, Task Heap Memory, Task Off-Heap Memory, Managed Memory, and Network Memory. See also 'taskmanager.memory.process.size' for total process memory size configuration.
taskmanager.memory.framework.heap.size
128 mb MemorySize Framework Heap Memory size for TaskExecutors. This is the size of JVM heap memory reserved for TaskExecutor framework, which will not be allocated to task slots.
taskmanager.memory.framework.off-heap.batch-shuffle.size
64 mb MemorySize Size of memory used by blocking shuffle for shuffle data read (currently only used by sort-shuffle). Notes: 1) The memory is cut from 'taskmanager.memory.framework.off-heap.size' so must be smaller than that, which means you may also need to increase 'taskmanager.memory.framework.off-heap.size' after you increase this config value; 2) This memory size can influence the shuffle performance and you can increase this config value for large-scale batch jobs (for example, to 128M or 256M).
taskmanager.memory.framework.off-heap.size
128 mb MemorySize Framework Off-Heap Memory size for TaskExecutors. This is the size of off-heap memory (JVM direct memory and native memory) reserved for TaskExecutor framework, which will not be allocated to task slots. The configured value will be fully counted when Flink calculates the JVM max direct memory size parameter.
taskmanager.memory.jvm-metaspace.size
256 mb MemorySize JVM Metaspace Size for the TaskExecutors.
taskmanager.memory.jvm-overhead.fraction
0.1 Float Fraction of Total Process Memory to be reserved for JVM Overhead. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less/greater than the configured min/max size, the min/max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min/max size to the same value.
taskmanager.memory.jvm-overhead.max
1 gb MemorySize Max JVM Overhead size for the TaskExecutors. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less/greater than the configured min/max size, the min/max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min/max size to the same value.
taskmanager.memory.jvm-overhead.min
192 mb MemorySize Min JVM Overhead size for the TaskExecutors. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less/greater than the configured min/max size, the min/max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min/max size to the same value.
taskmanager.memory.managed.consumer-weights
OPERATOR:70,STATE_BACKEND:70,PYTHON:30 Map Managed memory weights for different kinds of consumers. A slot’s managed memory is shared by all kinds of consumers it contains, proportionally to the kinds’ weights and regardless of the number of consumers from each kind. Currently supported kinds of consumers are OPERATOR (for built-in algorithms), STATE_BACKEND (for RocksDB state backend) and PYTHON (for Python processes).
taskmanager.memory.managed.fraction
0.4 Float Fraction of Total Flink Memory to be used as Managed Memory, if Managed Memory size is not explicitly specified.
taskmanager.memory.managed.size
(none) MemorySize Managed Memory size for TaskExecutors. This is the size of off-heap memory managed by the memory manager, reserved for sorting, hash tables, caching of intermediate results and RocksDB state backend. Memory consumers can either allocate memory from the memory manager in the form of MemorySegments, or reserve bytes from the memory manager and keep their memory usage within that boundary. If unspecified, it will be derived to make up the configured fraction of the Total Flink Memory.
taskmanager.memory.network.fraction
0.1 Float Fraction of Total Flink Memory to be used as Network Memory. Network Memory is off-heap memory reserved for ShuffleEnvironment (e.g., network buffers). Network Memory size is derived to make up the configured fraction of the Total Flink Memory. If the derived size is less/greater than the configured min/max size, the min/max size will be used. The exact size of Network Memory can be explicitly specified by setting the min/max size to the same value.
taskmanager.memory.network.max
1 gb MemorySize Max Network Memory size for TaskExecutors. Network Memory is off-heap memory reserved for ShuffleEnvironment (e.g., network buffers). Network Memory size is derived to make up the configured fraction of the Total Flink Memory. If the derived size is less/greater than the configured min/max size, the min/max size will be used. The exact size of Network Memory can be explicitly specified by setting the min/max to the same value.
taskmanager.memory.network.min
64 mb MemorySize Min Network Memory size for TaskExecutors. Network Memory is off-heap memory reserved for ShuffleEnvironment (e.g., network buffers). Network Memory size is derived to make up the configured fraction of the Total Flink Memory. If the derived size is less/greater than the configured min/max size, the min/max size will be used. The exact size of Network Memory can be explicitly specified by setting the min/max to the same value.
taskmanager.memory.process.size
(none) MemorySize Total Process Memory size for the TaskExecutors. This includes all the memory that a TaskExecutor consumes, consisting of Total Flink Memory, JVM Metaspace, and JVM Overhead. On containerized setups, this should be set to the container memory. See also 'taskmanager.memory.flink.size' for total Flink memory size configuration.
taskmanager.memory.task.heap.size
(none) MemorySize Task Heap Memory size for TaskExecutors. This is the size of JVM heap memory reserved for tasks. If not specified, it will be derived as Total Flink Memory minus Framework Heap Memory, Framework Off-Heap Memory, Task Off-Heap Memory, Managed Memory and Network Memory.
taskmanager.memory.task.off-heap.size
0 bytes MemorySize Task Off-Heap Memory size for TaskExecutors. This is the size of off heap memory (JVM direct memory and native memory) reserved for tasks. The configured value will be fully counted when Flink calculates the JVM max direct memory size parameter.

Miscellaneous Options #

Key Default Type Description
fs.allowed-fallback-filesystems
(none) String A (semicolon-separated) list of file schemes, for which Hadoop can be used instead of an appropriate Flink plugin. (example: s3;wasb)
fs.default-scheme
(none) String The default filesystem scheme, used for paths that do not declare a scheme explicitly. May contain an authority, e.g. host:port in case of an HDFS NameNode.
io.tmp.dirs
'LOCAL_DIRS' on Yarn. System.getProperty("java.io.tmpdir") in standalone. String Directories for temporary files, separated by",", "|", or the system's java.io.File.pathSeparator.


Security #

Options for configuring Flink’s security and secure interaction with external systems.

SSL #

Flink’s network connections can be secured via SSL. Please refer to the SSL Setup Docs for detailed setup guide and background.

Key Default Type Description
security.ssl.algorithms
"TLS_RSA_WITH_AES_128_CBC_SHA" String The comma separated list of standard SSL algorithms to be supported. Read more here
security.ssl.internal.cert.fingerprint
(none) String The sha1 fingerprint of the internal certificate. This further protects the internal communication to present the exact certificate used by Flink.This is necessary where one cannot use private CA(self signed) or there is internal firm wide CA is required
security.ssl.internal.enabled
false Boolean Turns on SSL for internal network communication. Optionally, specific components may override this through their own settings (rpc, data transport, REST, etc).
security.ssl.internal.key-password
(none) String The secret to decrypt the key in the keystore for Flink's internal endpoints (rpc, data transport, blob server).
security.ssl.internal.keystore
(none) String The Java keystore file with SSL Key and Certificate, to be used Flink's internal endpoints (rpc, data transport, blob server).
security.ssl.internal.keystore-password
(none) String The secret to decrypt the keystore file for Flink's for Flink's internal endpoints (rpc, data transport, blob server).
security.ssl.internal.truststore
(none) String The truststore file containing the public CA certificates to verify the peer for Flink's internal endpoints (rpc, data transport, blob server).
security.ssl.internal.truststore-password
(none) String The password to decrypt the truststore for Flink's internal endpoints (rpc, data transport, blob server).
security.ssl.protocol
"TLSv1.2" String The SSL protocol version to be supported for the ssl transport. Note that it doesn’t support comma separated list.
security.ssl.rest.authentication-enabled
false Boolean Turns on mutual SSL authentication for external communication via the REST endpoints.
security.ssl.rest.cert.fingerprint
(none) String The sha1 fingerprint of the rest certificate. This further protects the rest REST endpoints to present certificate which is only used by proxy serverThis is necessary where once uses public CA or internal firm wide CA
security.ssl.rest.enabled
false Boolean Turns on SSL for external communication via the REST endpoints.
security.ssl.rest.key-password
(none) String The secret to decrypt the key in the keystore for Flink's external REST endpoints.
security.ssl.rest.keystore
(none) String The Java keystore file with SSL Key and Certificate, to be used Flink's external REST endpoints.
security.ssl.rest.keystore-password
(none) String The secret to decrypt the keystore file for Flink's for Flink's external REST endpoints.
security.ssl.rest.truststore
(none) String The truststore file containing the public CA certificates to verify the peer for Flink's external REST endpoints.
security.ssl.rest.truststore-password
(none) String The password to decrypt the truststore for Flink's external REST endpoints.
security.ssl.verify-hostname
true Boolean Flag to enable peer’s hostname verification during ssl handshake.

Auth with External Systems #

ZooKeeper Authentication / Authorization

These options are necessary when connecting to a secured ZooKeeper quorum.

Key Default Type Description
zookeeper.sasl.disable
false Boolean
zookeeper.sasl.login-context-name
"Client" String
zookeeper.sasl.service-name
"zookeeper" String

Kerberos-based Authentication / Authorization

Please refer to the Flink and Kerberos Docs for a setup guide and a list of external system to which Flink can authenticate itself via Kerberos.

Key Default Type Description
security.kerberos.fetch.delegation-token
true Boolean Indicates whether to fetch the delegation tokens for external services the Flink job needs to contact. Only HDFS and HBase are supported. It is used in Yarn deployments. If true, Flink will fetch HDFS and HBase delegation tokens and inject them into Yarn AM containers. If false, Flink will assume that the delegation tokens are managed outside of Flink. As a consequence, it will not fetch delegation tokens for HDFS and HBase. You may need to disable this option, if you rely on submission mechanisms, e.g. Apache Oozie, to handle delegation tokens.
security.kerberos.login.contexts
(none) String A comma-separated list of login contexts to provide the Kerberos credentials to (for example, `Client,KafkaClient` to use the credentials for ZooKeeper authentication and for Kafka authentication)
security.kerberos.login.keytab
(none) String Absolute path to a Kerberos keytab file that contains the user credentials.
security.kerberos.login.principal
(none) String Kerberos principal name associated with the keytab.
security.kerberos.login.use-ticket-cache
true Boolean Indicates whether to read from your Kerberos ticket cache.


Resource Orchestration Frameworks #

This section contains options related to integrating Flink with resource orchestration frameworks, like Kubernetes, Yarn, etc.

Note that is not always necessary to integrate Flink with the resource orchestration framework. For example, you can easily deploy Flink applications on Kubernetes without Flink knowing that it runs on Kubernetes (and without specifying any of the Kubernetes config options here.) See this setup guide for an example.

The options in this section are necessary for setups where Flink itself actively requests and releases resources from the orchestrators.

YARN #

Key Default Type Description
external-resource.<resource_name>.yarn.config-key
(none) String If configured, Flink will add this key to the resource profile of container request to Yarn. The value will be set to the value of external-resource.<resource_name>.amount.
flink.hadoop.<key>
(none) String A general option to probe Hadoop configuration through prefix 'flink.hadoop.'. Flink will remove the prefix to get <key> (from core-default.xml and hdfs-default.xml) then set the <key> and value to Hadoop configuration. For example, flink.hadoop.dfs.replication=5 in Flink configuration and convert to dfs.replication=5 in Hadoop configuration.
flink.yarn.<key>
(none) String A general option to probe Yarn configuration through prefix 'flink.yarn.'. Flink will remove the prefix 'flink.' to get yarn.<key> (from yarn-default.xml) then set the yarn.<key> and value to Yarn configuration. For example, flink.yarn.resourcemanager.container.liveness-monitor.interval-ms=300000 in Flink configuration and convert to yarn.resourcemanager.container.liveness-monitor.interval-ms=300000 in Yarn configuration.
yarn.application-attempt-failures-validity-interval
10000 Long Time window in milliseconds which defines the number of application attempt failures when restarting the AM. Failures which fall outside of this window are not being considered. Set this value to -1 in order to count globally. See here for more information.
yarn.application-attempts
(none) String Number of ApplicationMaster restarts. By default, the value will be set to 1. If high availability is enabled, then the default value will be 2. The restart number is also limited by YARN (configured via yarn.resourcemanager.am.max-attempts). Note that that the entire Flink cluster will restart and the YARN Client will lose the connection.
yarn.application-master.port
"0" String With this configuration option, users can specify a port, a range of ports or a list of ports for the Application Master (and JobManager) RPC port. By default we recommend using the default value (0) to let the operating system choose an appropriate port. In particular when multiple AMs are running on the same physical host, fixed port assignments prevent the AM from starting. For example when running Flink on YARN on an environment with a restrictive firewall, this option allows specifying a range of allowed ports.
yarn.application.id
(none) String The YARN application id of the running yarn cluster. This is the YARN cluster where the pipeline is going to be executed.
yarn.application.name
(none) String A custom name for your YARN application.
yarn.application.node-label
(none) String Specify YARN node label for the YARN application.
yarn.application.priority
-1 Integer A non-negative integer indicating the priority for submitting a Flink YARN application. It will only take effect if YARN priority scheduling setting is enabled. Larger integer corresponds with higher priority. If priority is negative or set to '-1'(default), Flink will unset yarn priority setting and use cluster default priority. Please refer to YARN's official documentation for specific settings required to enable priority scheduling for the targeted YARN version.
yarn.application.queue
(none) String The YARN queue on which to put the current pipeline.
yarn.application.type
(none) String A custom type for your YARN application..
yarn.appmaster.vcores
1 Integer The number of virtual cores (vcores) used by YARN application master.
yarn.classpath.include-user-jar
ORDER

Enum

Defines whether user-jars are included in the system class path as well as their positioning in the path.

Possible values:
  • "DISABLED": Exclude user jars from the system class path
  • "FIRST": Position at the beginning
  • "LAST": Position at the end
  • "ORDER": Position based on the name of the jar
yarn.containers.vcores
-1 Integer The number of virtual cores (vcores) per YARN container. By default, the number of vcores is set to the number of slots per TaskManager, if set, or to 1, otherwise. In order for this parameter to be used your cluster must have CPU scheduling enabled. You can do this by setting the org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.
yarn.file-replication
-1 Integer Number of file replication of each local resource file. If it is not configured, Flink will use the default replication value in hadoop configuration.
yarn.flink-dist-jar
(none) String The location of the Flink dist jar.
yarn.heartbeat.container-request-interval
500 Integer Time between heartbeats with the ResourceManager in milliseconds if Flink requests containers:
  • The lower this value is, the faster Flink will get notified about container allocations since requests and allocations are transmitted via heartbeats.
  • The lower this value is, the more excessive containers might get allocated which will eventually be released but put pressure on Yarn.
If you observe too many container allocations on the ResourceManager, then it is recommended to increase this value. See this link for more information.
yarn.heartbeat.interval
5 Integer Time between heartbeats with the ResourceManager in seconds.
yarn.properties-file.location
(none) String When a Flink job is submitted to YARN, the JobManager’s host and the number of available processing slots is written into a properties file, so that the Flink client is able to pick those details up. This configuration parameter allows changing the default location of that file (for example for environments sharing a Flink installation between users).
yarn.provided.lib.dirs
(none) List<String> A semicolon-separated list of provided lib directories. They should be pre-uploaded and world-readable. Flink will use them to exclude the local Flink jars(e.g. flink-dist, lib/, plugins/)uploading to accelerate the job submission process. Also YARN will cache them on the nodes so that they doesn't need to be downloaded every time for each application. An example could be hdfs://$namenode_address/path/of/flink/lib
yarn.security.kerberos.additionalFileSystems
(none) List<String> A comma-separated list of additional Kerberos-secured Hadoop filesystems Flink is going to access. For example, yarn.security.kerberos.additionalFileSystems=hdfs://namenode2:9002,hdfs://namenode3:9003. The client submitting to YARN needs to have access to these file systems to retrieve the security tokens.
yarn.security.kerberos.localized-keytab-path
"krb5.keytab" String Local (on NodeManager) path where kerberos keytab file will be localized to. If yarn.security.kerberos.ship-local-keytab set to true, Flink willl ship the keytab file as a YARN local resource. In this case, the path is relative to the local resource directory. If set to false, Flink will try to directly locate the keytab from the path itself.
yarn.security.kerberos.ship-local-keytab
true Boolean When this is true Flink will ship the keytab file configured via security.kerberos.login.keytab as a localized YARN resource.
yarn.ship-archives
(none) List<String> A semicolon-separated list of archives to be shipped to the YARN cluster. These archives will be un-packed when localizing and they can be any of the following types: ".tar.gz", ".tar", ".tgz", ".dst", ".jar", ".zip".
yarn.ship-files
(none) List<String> A semicolon-separated list of files and/or directories to be shipped to the YARN cluster.
yarn.staging-directory
(none) String Staging directory used to store YARN files while submitting applications. Per default, it uses the home directory of the configured file system.
yarn.tags
(none) String A comma-separated list of tags to apply to the Flink YARN application.
yarn.taskmanager.node-label
(none) String Specify YARN node label for the Flink TaskManagers, it will override the yarn.application.node-label for TaskManagers if both are set.

Kubernetes #

Key Default Type Description
external-resource.<resource_name>.kubernetes.config-key
(none) String If configured, Flink will add "resources.limits.<config-key>" and "resources.requests.<config-key>" to the main container of TaskExecutor and set the value to the value of external-resource.<resource_name>.amount.
kubernetes.client.io-pool.size
4 Integer The size of the IO executor pool used by the Kubernetes client to execute blocking IO operations (e.g. start/stop TaskManager pods, update leader related ConfigMaps, etc.). Increasing the pool size allows to run more IO operations concurrently.
kubernetes.cluster-id
(none) String The cluster-id, which should be no more than 45 characters, is used for identifying a unique Flink cluster. The id must only contain lowercase alphanumeric characters and "-". The required format is [a-z]([-a-z0-9]*[a-z0-9]). If not set, the client will automatically generate it with a random ID.
kubernetes.config.file
(none) String The kubernetes config file will be used to create the client. The default is located at ~/.kube/config
kubernetes.container.image
The default value depends on the actually running version. In general it looks like "flink:<FLINK_VERSION>-scala_<SCALA_VERSION>" String Image to use for Flink containers. The specified image must be based upon the same Apache Flink and Scala versions as used by the application. Visit here for the official docker images provided by the Flink project. The Flink project also publishes docker images to apache/flink DockerHub repository.
kubernetes.container.image.pull-policy
IfNotPresent

Enum

The Kubernetes container image pull policy. The default policy is IfNotPresent to avoid putting pressure to image repository.

Possible values:
  • "IfNotPresent"
  • "Always"
  • "Never"
kubernetes.container.image.pull-secrets
(none) List<String> A semicolon-separated list of the Kubernetes secrets used to access private image registries.
kubernetes.context
(none) String The desired context from your Kubernetes config file used to configure the Kubernetes client for interacting with the cluster. This could be helpful if one has multiple contexts configured and wants to administrate different Flink clusters on different Kubernetes clusters/contexts.
kubernetes.entry.path
"/docker-entrypoint.sh" String The entrypoint script of kubernetes in the image. It will be used as command for jobmanager and taskmanager container.
kubernetes.env.secretKeyRef
(none) List<Map> The user-specified secrets to set env variables in Flink container. The value should be in the form of env:FOO_ENV,secret:foo_secret,key:foo_key;env:BAR_ENV,secret:bar_secret,key:bar_key.
kubernetes.flink.conf.dir
"/opt/flink/conf" String The flink conf directory that will be mounted in pod. The flink-conf.yaml, log4j.properties, logback.xml in this path will be overwritten from config map.
kubernetes.flink.log.dir
(none) String The directory that logs of jobmanager and taskmanager be saved in the pod. The default value is $FLINK_HOME/log.
kubernetes.hadoop.conf.config-map.name
(none) String Specify the name of an existing ConfigMap that contains custom Hadoop configuration to be mounted on the JobManager(s) and TaskManagers.
kubernetes.hostnetwork.enabled
false Boolean Whether to enable HostNetwork mode. The HostNetwork allows the pod could use the node network namespace instead of the individual pod network namespace. Please note that the JobManager service account should have the permission to update Kubernetes service.
kubernetes.jobmanager.annotations
(none) Map The user-specified annotations that are set to the JobManager pod. The value could be in the form of a1:v1,a2:v2
kubernetes.jobmanager.cpu
1.0 Double The number of cpu used by job manager
kubernetes.jobmanager.cpu.limit-factor
1.0 Double The limit factor of cpu used by job manager. The resources limit cpu will be set to cpu * limit-factor.
kubernetes.jobmanager.labels
(none) Map The labels to be set for JobManager pod. Specified as key:value pairs separated by commas. For example, version:alphav1,deploy:test.
kubernetes.jobmanager.memory.limit-factor
1.0 Double The limit factor of memory used by job manager. The resources limit memory will be set to memory * limit-factor.
kubernetes.jobmanager.node-selector
(none) Map The node selector to be set for JobManager pod. Specified as key:value pairs separated by commas. For example, environment:production,disk:ssd.
kubernetes.jobmanager.owner.reference
(none) List<Map> The user-specified Owner References to be set to the JobManager Deployment. When all the owner resources are deleted, the JobManager Deployment will be deleted automatically, which also deletes all the resources created by this Flink cluster. The value should be formatted as a semicolon-separated list of owner references, where each owner reference is a comma-separated list of `key:value` pairs. E.g., apiVersion:v1,blockOwnerDeletion:true,controller:true,kind:FlinkApplication,name:flink-app-name,uid:flink-app-uid;apiVersion:v1,kind:Deployment,name:deploy-name,uid:deploy-uid
kubernetes.jobmanager.replicas
1 Integer Specify how many JobManager pods will be started simultaneously. Configure the value to greater than 1 to start standby JobManagers. It will help to achieve faster recovery. Notice that high availability should be enabled when starting standby JobManagers.
kubernetes.jobmanager.service-account
"default" String Service account that is used by jobmanager within kubernetes cluster. The job manager uses this service account when requesting taskmanager pods from the API server. If not explicitly configured, config option 'kubernetes.service-account' will be used.
kubernetes.jobmanager.tolerations
(none) List<Map> The user-specified tolerations to be set to the JobManager pod. The value should be in the form of key:key1,operator:Equal,value:value1,effect:NoSchedule;key:key2,operator:Exists,effect:NoExecute,tolerationSeconds:6000
kubernetes.namespace
"default" String The namespace that will be used for running the jobmanager and taskmanager pods.
kubernetes.pod-template-file
(none) String Specify a local file that contains the pod template definition. It will be used to initialize the jobmanager and taskmanager pod. The main container should be defined with name 'flink-main-container'. Notice that this can be overwritten by config options 'kubernetes.pod-template-file.jobmanager' and 'kubernetes.pod-template-file.taskmanager' for jobmanager and taskmanager respectively.
kubernetes.pod-template-file.jobmanager
(none) String Specify a local file that contains the jobmanager pod template definition. It will be used to initialize the jobmanager pod. The main container should be defined with name 'flink-main-container'. If not explicitly configured, config option 'kubernetes.pod-template-file' will be used.
kubernetes.pod-template-file.taskmanager
(none) String Specify a local file that contains the taskmanager pod template definition. It will be used to initialize the taskmanager pod. The main container should be defined with name 'flink-main-container'. If not explicitly configured, config option 'kubernetes.pod-template-file' will be used.
kubernetes.rest-service.annotations
(none) Map The user-specified annotations that are set to the rest Service. The value should be in the form of a1:v1,a2:v2
kubernetes.rest-service.exposed.node-port-address-type
InternalIP

Enum

The user-specified address type that is used for filtering node IPs when constructing a node port connection string. This option is only considered when 'kubernetes.rest-service.exposed.type' is set to 'NodePort'.

Possible values:
  • "InternalIP"
  • "ExternalIP"
kubernetes.rest-service.exposed.type
ClusterIP

Enum

The exposed type of the rest service. The exposed rest service could be used to access the Flink’s Web UI and REST endpoint.

Possible values:
  • "ClusterIP"
  • "NodePort"
  • "LoadBalancer"
  • "Headless_ClusterIP"
kubernetes.secrets
(none) Map The user-specified secrets that will be mounted into Flink container. The value should be in the form of foo:/opt/secrets-foo,bar:/opt/secrets-bar.
kubernetes.service-account
"default" String Service account that is used by jobmanager and taskmanager within kubernetes cluster. Notice that this can be overwritten by config options 'kubernetes.jobmanager.service-account' and 'kubernetes.taskmanager.service-account' for jobmanager and taskmanager respectively.
kubernetes.taskmanager.annotations
(none) Map The user-specified annotations that are set to the TaskManager pod. The value could be in the form of a1:v1,a2:v2
kubernetes.taskmanager.cpu
-1.0 Double The number of cpu used by task manager. By default, the cpu is set to the number of slots per TaskManager
kubernetes.taskmanager.cpu.limit-factor
1.0 Double The limit factor of cpu used by task manager. The resources limit cpu will be set to cpu * limit-factor.
kubernetes.taskmanager.labels
(none) Map The labels to be set for TaskManager pods. Specified as key:value pairs separated by commas. For example, version:alphav1,deploy:test.
kubernetes.taskmanager.memory.limit-factor
1.0 Double The limit factor of memory used by task manager. The resources limit memory will be set to memory * limit-factor.
kubernetes.taskmanager.node-selector
(none) Map The node selector to be set for TaskManager pods. Specified as key:value pairs separated by commas. For example, environment:production,disk:ssd.
kubernetes.taskmanager.service-account
"default" String Service account that is used by taskmanager within kubernetes cluster. The task manager uses this service account when watching config maps on the API server to retrieve leader address of jobmanager and resourcemanager. If not explicitly configured, config option 'kubernetes.service-account' will be used.
kubernetes.taskmanager.tolerations
(none) List<Map> The user-specified tolerations to be set to the TaskManager pod. The value should be in the form of key:key1,operator:Equal,value:value1,effect:NoSchedule;key:key2,operator:Exists,effect:NoExecute,tolerationSeconds:6000
kubernetes.transactional-operation.max-retries
5 Integer Defines the number of Kubernetes transactional operation retries before the client gives up. For example, FlinkKubeClient#checkAndUpdateConfigMap.


State Backends #

Please refer to the State Backend Documentation for background on State Backends.

RocksDB State Backend #

These are the options commonly needed to configure the RocksDB state backend. See the Advanced RocksDB Backend Section for options necessary for advanced low level configurations and trouble-shooting.

Key Default Type Description
state.backend.rocksdb.memory.fixed-per-slot
(none) MemorySize The fixed total amount of memory, shared among all RocksDB instances per slot. This option overrides the 'state.backend.rocksdb.memory.managed' option when configured. If neither this option, nor the 'state.backend.rocksdb.memory.managed' optionare set, then each RocksDB column family state has its own memory caches (as controlled by the column family options).
state.backend.rocksdb.memory.high-prio-pool-ratio
0.1 Double The fraction of cache memory that is reserved for high-priority data like index, filter, and compression dictionary blocks. This option only has an effect when 'state.backend.rocksdb.memory.managed' or 'state.backend.rocksdb.memory.fixed-per-slot' are configured.
state.backend.rocksdb.memory.managed
true Boolean If set, the RocksDB state backend will automatically configure itself to use the managed memory budget of the task slot, and divide the memory over write buffers, indexes, block caches, etc. That way, the three major uses of memory of RocksDB will be capped.
state.backend.rocksdb.memory.partitioned-index-filters
false Boolean With partitioning, the index/filter block of an SST file is partitioned into smaller blocks with an additional top-level index on them. When reading an index/filter, only top-level index is loaded into memory. The partitioned index/filter then uses the top-level index to load on demand into the block cache the partitions that are required to perform the index/filter query. This option only has an effect when 'state.backend.rocksdb.memory.managed' or 'state.backend.rocksdb.memory.fixed-per-slot' are configured.
state.backend.rocksdb.memory.write-buffer-ratio
0.5 Double The maximum amount of memory that write buffers may take, as a fraction of the total shared memory. This option only has an effect when 'state.backend.rocksdb.memory.managed' or 'state.backend.rocksdb.memory.fixed-per-slot' are configured.
state.backend.rocksdb.timer-service.factory
ROCKSDB

Enum

This determines the factory for timer service state implementation.

Possible values:
  • "HEAP": Heap-based
  • "ROCKSDB": Implementation based on RocksDB


Metrics #

Please refer to the metrics system documentation for background on Flink’s metrics infrastructure.

Key Default Type Description
metrics.fetcher.update-interval
10000 Long Update interval for the metric fetcher used by the web UI in milliseconds. Decrease this value for faster updating metrics. Increase this value if the metric fetcher causes too much load. Setting this value to 0 disables the metric fetching completely.
metrics.internal.query-service.port
"0" String The port range used for Flink's internal metric query service. Accepts a list of ports (“50100,50101”), ranges(“50100-50200”) or a combination of both. It is recommended to set a range of ports to avoid collisions when multiple Flink components are running on the same machine. Per default Flink will pick a random port.
metrics.internal.query-service.thread-priority
1 Integer The thread priority used for Flink's internal metric query service. The thread is created by Akka's thread pool executor. The range of the priority is from 1 (MIN_PRIORITY) to 10 (MAX_PRIORITY). Warning, increasing this value may bring the main Flink components down.
metrics.job.status.enable
CURRENT_TIME

List<Enum>

The selection of job status metrics that should be reported.

Possible values:
  • "STATE": For a given state, return 1 if the job is currently in that state, otherwise return 0.
  • "CURRENT_TIME": For a given state, if the job is currently in that state, return the time since the job transitioned into that state, otherwise return 0.
  • "TOTAL_TIME": For a given state, return how much time the job has spent in that state in total.
metrics.latency.granularity
"operator" String Defines the granularity of latency metrics. Accepted values are:
  • single - Track latency without differentiating between sources and subtasks.
  • operator - Track latency while differentiating between sources, but not subtasks.
  • subtask - Track latency while differentiating between sources and subtasks.
metrics.latency.history-size
128 Integer Defines the number of measured latencies to maintain at each operator.
metrics.latency.interval
0 Long Defines the interval at which latency tracking marks are emitted from the sources. Disables latency tracking if set to 0 or a negative value. Enabling this feature can significantly impact the performance of the cluster.
metrics.reporter.<name>.<parameter>
(none) String Configures the parameter <parameter> for the reporter named <name>.
metrics.reporter.<name>.class
(none) String The reporter class to use for the reporter named <name>.
metrics.reporter.<name>.interval
10 s Duration The reporter interval to use for the reporter named <name>.
metrics.reporters
(none) String An optional list of reporter names. If configured, only reporters whose name matches any of the names in the list will be started. Otherwise, all reporters that could be found in the configuration will be started.
metrics.scope.delimiter
"." String Delimiter used to assemble the metric identifier.
metrics.scope.jm
"<host>.jobmanager" String Defines the scope format string that is applied to all metrics scoped to a JobManager.
metrics.scope.jm.job
"<host>.jobmanager.<job_name>" String Defines the scope format string that is applied to all metrics scoped to a job on a JobManager.
metrics.scope.operator
"<host>.taskmanager.<tm_id>.<job_name>.<operator_name>.<subtask_index>" String Defines the scope format string that is applied to all metrics scoped to an operator.
metrics.scope.task
"<host>.taskmanager.<tm_id>.<job_name>.<task_name>.<subtask_index>" String Defines the scope format string that is applied to all metrics scoped to a task.
metrics.scope.tm
"<host>.taskmanager.<tm_id>" String Defines the scope format string that is applied to all metrics scoped to a TaskManager.
metrics.scope.tm.job
"<host>.taskmanager.<tm_id>.<job_name>" String Defines the scope format string that is applied to all metrics scoped to a job on a TaskManager.
metrics.system-resource
false Boolean Flag indicating whether Flink should report system resource metrics such as machine's CPU, memory or network usage.
metrics.system-resource-probing-interval
5000 Long Interval between probing of system resource metrics specified in milliseconds. Has an effect only when 'metrics.system-resource' is enabled.

RocksDB Native Metrics #

Flink can report metrics from RocksDB’s native code, for applications using the RocksDB state backend. The metrics here are scoped to the operators and then further broken down by column family; values are reported as unsigned longs.

Enabling RocksDB’s native metrics may cause degraded performance and should be set carefully.
Key Default Type Description
state.backend.rocksdb.metrics.actual-delayed-write-rate
false Boolean Monitor the current actual delayed write rate. 0 means no delay.
state.backend.rocksdb.metrics.background-errors
false Boolean Monitor the number of background errors in RocksDB.
state.backend.rocksdb.metrics.block-cache-capacity
false Boolean Monitor block cache capacity.
state.backend.rocksdb.metrics.block-cache-pinned-usage
false Boolean Monitor the memory size for the entries being pinned in block cache.
state.backend.rocksdb.metrics.block-cache-usage
false Boolean Monitor the memory size for the entries residing in block cache.
state.backend.rocksdb.metrics.column-family-as-variable
false Boolean Whether to expose the column family as a variable.
state.backend.rocksdb.metrics.compaction-pending
false Boolean Track pending compactions in RocksDB. Returns 1 if a compaction is pending, 0 otherwise.
state.backend.rocksdb.metrics.cur-size-active-mem-table
false Boolean Monitor the approximate size of the active memtable in bytes.
state.backend.rocksdb.metrics.cur-size-all-mem-tables
false Boolean Monitor the approximate size of the active and unflushed immutable memtables in bytes.
state.backend.rocksdb.metrics.estimate-live-data-size
false Boolean Estimate of the amount of live data in bytes (usually smaller than sst files size due to space amplification).
state.backend.rocksdb.metrics.estimate-num-keys
false Boolean Estimate the number of keys in RocksDB.
state.backend.rocksdb.metrics.estimate-pending-compaction-bytes
false Boolean Estimated total number of bytes compaction needs to rewrite to get all levels down to under target size. Not valid for other compactions than level-based.
state.backend.rocksdb.metrics.estimate-table-readers-mem
false Boolean Estimate the memory used for reading SST tables, excluding memory used in block cache (e.g.,filter and index blocks) in bytes.
state.backend.rocksdb.metrics.is-write-stopped
false Boolean Track whether write has been stopped in RocksDB. Returns 1 if write has been stopped, 0 otherwise.
state.backend.rocksdb.metrics.live-sst-files-size
false Boolean Monitor the total size (bytes) of all SST files belonging to the latest version.WARNING: may slow down online queries if there are too many files.
state.backend.rocksdb.metrics.mem-table-flush-pending
false Boolean Monitor the number of pending memtable flushes in RocksDB.
state.backend.rocksdb.metrics.num-deletes-active-mem-table
false Boolean Monitor the total number of delete entries in the active memtable.
state.backend.rocksdb.metrics.num-deletes-imm-mem-tables
false Boolean Monitor the total number of delete entries in the unflushed immutable memtables.
state.backend.rocksdb.metrics.num-entries-active-mem-table
false Boolean Monitor the total number of entries in the active memtable.
state.backend.rocksdb.metrics.num-entries-imm-mem-tables
false Boolean Monitor the total number of entries in the unflushed immutable memtables.
state.backend.rocksdb.metrics.num-immutable-mem-table
false Boolean Monitor the number of immutable memtables in RocksDB.
state.backend.rocksdb.metrics.num-live-versions
false Boolean Monitor number of live versions. Version is an internal data structure. See RocksDB file version_set.h for details. More live versions often mean more SST files are held from being deleted, by iterators or unfinished compactions.
state.backend.rocksdb.metrics.num-running-compactions
false Boolean Monitor the number of currently running compactions.
state.backend.rocksdb.metrics.num-running-flushes
false Boolean Monitor the number of currently running flushes.
state.backend.rocksdb.metrics.num-snapshots
false Boolean Monitor the number of unreleased snapshots of the database.
state.backend.rocksdb.metrics.size-all-mem-tables
false Boolean Monitor the approximate size of the active, unflushed immutable, and pinned immutable memtables in bytes.
state.backend.rocksdb.metrics.total-sst-files-size
false Boolean Monitor the total size (bytes) of all SST files of all versions.WARNING: may slow down online queries if there are too many files.


History Server #

The history server keeps the information of completed jobs (graphs, runtimes, statistics). To enable it, you have to enable “job archiving” in the JobManager (jobmanager.archive.fs.dir).

See the History Server Docs for details.

Key Default Type Description
historyserver.archive.clean-expired-jobs
false Boolean Whether HistoryServer should cleanup jobs that are no longer present `historyserver.archive.fs.dir`.
historyserver.archive.fs.dir
(none) String Comma separated list of directories to fetch archived jobs from. The history server will monitor these directories for archived jobs. You can configure the JobManager to archive jobs to a directory via `jobmanager.archive.fs.dir`.
historyserver.archive.fs.refresh-interval
10000 Long Interval in milliseconds for refreshing the archived job directories.
historyserver.archive.retained-jobs
-1 Integer The maximum number of jobs to retain in each archive directory defined by `historyserver.archive.fs.dir`. If set to `-1`(default), there is no limit to the number of archives. If set to `0` or less than `-1` HistoryServer will throw an IllegalConfigurationException.
historyserver.web.address
(none) String Address of the HistoryServer's web interface.
historyserver.web.port
8082 Integer Port of the HistoryServers's web interface.
historyserver.web.refresh-interval
10000 Long The refresh interval for the HistoryServer web-frontend in milliseconds.
historyserver.web.ssl.enabled
false Boolean Enable HTTPs access to the HistoryServer web frontend. This is applicable only when the global SSL flag security.ssl.enabled is set to true.
historyserver.web.tmpdir
(none) String Local directory that is used by the history server REST API for temporary files.


Experimental #

Options for experimental features in Flink.

Queryable State #

Queryable State is an experimental features that gives lets you access Flink’s internal state like a key/value store. See the Queryable State Docs for details.

Key Default Type Description
queryable-state.client.network-threads
0 Integer Number of network (Netty's event loop) Threads for queryable state client.
queryable-state.enable
false Boolean Option whether the queryable state proxy and server should be enabled where possible and configurable.
queryable-state.proxy.network-threads
0 Integer Number of network (Netty's event loop) Threads for queryable state proxy.
queryable-state.proxy.ports
"9069" String The port range of the queryable state proxy. The specified range can be a single port: "9123", a range of ports: "50100-50200", or a list of ranges and ports: "50100-50200,50300-50400,51234".
queryable-state.proxy.query-threads
0 Integer Number of query Threads for queryable state proxy. Uses the number of slots if set to 0.
queryable-state.server.network-threads
0 Integer Number of network (Netty's event loop) Threads for queryable state server.
queryable-state.server.ports
"9067" String The port range of the queryable state server. The specified range can be a single port: "9123", a range of ports: "50100-50200", or a list of ranges and ports: "50100-50200,50300-50400,51234".
queryable-state.server.query-threads
0 Integer Number of query Threads for queryable state server. Uses the number of slots if set to 0.


Client #

Key Default Type Description
client.retry-period
2 s Duration The interval (in ms) between consecutive retries of failed attempts to execute commands through the CLI or Flink's clients, wherever retry is supported (default 2sec).
client.timeout
1 min Duration Timeout on the client side.


Execution #

Key Default Type Description
execution.allow-client-job-configurations
true Boolean Determines whether configurations in the user program are allowed. Depending on your deployment mode failing the job might have different affects. Either your client that is trying to submit the job to an external cluster (session cluster deployment) throws the exception or the Job manager (application mode deployment).
execution.attached
false Boolean Specifies if the pipeline is submitted in attached or detached mode.
execution.job-listeners
(none) List<String> Custom JobListeners to be registered with the execution environment. The registered listeners cannot have constructors with arguments.
execution.shutdown-on-application-finish
true Boolean Whether a Flink Application cluster should shut down automatically after its application finishes (either successfully or as result of a failure). Has no effect for other deployment modes.
execution.shutdown-on-attached-exit
false Boolean If the job is submitted in attached mode, perform a best-effort cluster shutdown when the CLI is terminated abruptly, e.g., in response to a user interrupt, such as typing Ctrl + C.
execution.submit-failed-job-on-application-error
false Boolean If a failed job should be submitted (in the application mode) when there is an error in the application driver before an actual job submission. This is intended for providing a clean way of reporting failures back to the user and is especially useful in combination with 'execution.shutdown-on-application-finish'. This option only works when the single job submission is enforced ('high-availability' is enabled). Please note that this is an experimental option and may be changed in the future.
execution.target
(none) String The deployment target for the execution. This can take one of the following values when calling bin/flink run:
  • remote
  • local
  • yarn-per-job (deprecated)
  • yarn-session
  • kubernetes-session
And one of the following values when calling bin/flink run-application:
  • yarn-application
  • kubernetes-application
Key Default Type Description
execution.savepoint-restore-mode
NO_CLAIM

Enum

Describes the mode how Flink should restore from the given savepoint or retained checkpoint.

Possible values:
  • "CLAIM": Flink will take ownership of the given snapshot. It will clean the snapshot once it is subsumed by newer ones.
  • "NO_CLAIM": Flink will not claim ownership of the snapshot files. However it will make sure it does not depend on any artefacts from the restored snapshot. In order to do that, Flink will take the first checkpoint as a full one, which means it might reupload/duplicate files that are part of the restored checkpoint.
  • "LEGACY": This is the mode in which Flink worked so far. It will not claim ownership of the snapshot and will not delete the files. However, it can directly depend on the existence of the files of the restored checkpoint. It might not be safe to delete checkpoints that were restored in legacy mode
execution.savepoint.ignore-unclaimed-state
false Boolean Allow to skip savepoint state that cannot be restored. Allow this if you removed an operator from your pipeline after the savepoint was triggered.
execution.savepoint.path
(none) String Path to a savepoint to restore the job from (for example hdfs:///flink/savepoint-1537).
Key Default Type Description
execution.batch-shuffle-mode
ALL_EXCHANGES_BLOCKING

Enum

Defines how data is exchanged between tasks in batch 'execution.runtime-mode' if the shuffling behavior has not been set explicitly for an individual exchange.
With pipelined exchanges, upstream and downstream tasks run simultaneously. In order to achieve lower latency, a result record is immediately sent to and processed by the downstream task. Thus, the receiver back-pressures the sender. The streaming mode always uses this exchange.
With blocking exchanges, upstream and downstream tasks run in stages. Records are persisted to some storage between stages. Downstream tasks then fetch these records after the upstream tasks finished. Such an exchange reduces the resources required to execute the job as it does not need to run upstream and downstream tasks simultaneously.

Possible values:
  • "ALL_EXCHANGES_PIPELINED": Upstream and downstream tasks run simultaneously. This leads to lower latency and more evenly distributed (but higher) resource usage across tasks.
  • "ALL_EXCHANGES_BLOCKING": Upstream and downstream tasks run subsequently. This reduces the resource usage as downstream tasks are started after upstream tasks finished.
execution.buffer-timeout
100 ms Duration The maximum time frequency (milliseconds) for the flushing of the output buffers. By default the output buffers flush frequently to provide low latency and to aid smooth developer experience. Setting the parameter can result in three logical modes:
  • A positive value triggers flushing periodically by that interval
  • 0 triggers flushing after every record thus minimizing latency
  • -1 ms triggers flushing only when the output buffer is full thus maximizing throughput
execution.checkpointing.snapshot-compression
false Boolean Tells if we should use compression for the state snapshot data or not
execution.runtime-mode
STREAMING

Enum

Runtime execution mode of DataStream programs. Among other things, this controls task scheduling, network shuffle behavior, and time semantics.

Possible values:
  • "STREAMING"
  • "BATCH"
  • "AUTOMATIC"

Pipeline #

Key Default Type Description
pipeline.auto-generate-uids
true Boolean When auto-generated UIDs are disabled, users are forced to manually specify UIDs on DataStream applications.

It is highly recommended that users specify UIDs before deploying to production since they are used to match state in savepoints to operators in a job. Because auto-generated ID's are likely to change when modifying a job, specifying custom IDs allow an application to evolve over time without discarding state.
pipeline.auto-type-registration
true Boolean Controls whether Flink is automatically registering all types in the user programs with Kryo.
pipeline.auto-watermark-interval
0 ms Duration The interval of the automatic watermark emission. Watermarks are used throughout the streaming system to keep track of the progress of time. They are used, for example, for time based windowing.
pipeline.cached-files
(none) List<String> Files to be registered at the distributed cache under the given name. The files will be accessible from any user-defined function in the (distributed) runtime under a local path. Files may be local files (which will be distributed via BlobServer), or files in a distributed file system. The runtime will copy the files temporarily to a local cache, if needed.

Example:
name:file1,path:`file:///tmp/file1`;name:file2,path:`hdfs:///tmp/file2`
pipeline.classpaths
(none) List<String> A semicolon-separated list of the classpaths to package with the job jars to be sent to the cluster. These have to be valid URLs.
pipeline.closure-cleaner-level
RECURSIVE

Enum

Configures the mode in which the closure cleaner works.

Possible values:
  • "NONE": Disables the closure cleaner completely.
  • "TOP_LEVEL": Cleans only the top-level class without recursing into fields.
  • "RECURSIVE": Cleans all fields recursively.
pipeline.default-kryo-serializers
(none) List<String> Semicolon separated list of pairs of class names and Kryo serializers class names to be used as Kryo default serializers

Example:
class:org.example.ExampleClass,serializer:org.example.ExampleSerializer1; class:org.example.ExampleClass2,serializer:org.example.ExampleSerializer2
pipeline.force-avro
false Boolean Forces Flink to use the Apache Avro serializer for POJOs.

Important: Make sure to include the flink-avro module.
pipeline.force-kryo
false Boolean If enabled, forces TypeExtractor to use Kryo serializer for POJOS even though we could analyze as POJO. In some cases this might be preferable. For example, when using interfaces with subclasses that cannot be analyzed as POJO.
pipeline.generic-types
true Boolean If the use of generic types is disabled, Flink will throw an UnsupportedOperationException whenever it encounters a data type that would go through Kryo for serialization.

Disabling generic types can be helpful to eagerly find and eliminate the use of types that would go through Kryo serialization during runtime. Rather than checking types individually, using this option will throw exceptions eagerly in the places where generic types are used.

We recommend to use this option only during development and pre-production phases, not during actual production use. The application program and/or the input data may be such that new, previously unseen, types occur at some point. In that case, setting this option would cause the program to fail.
pipeline.global-job-parameters
(none) Map Register a custom, serializable user configuration object. The configuration can be accessed in operators
pipeline.jars
(none) List<String> A semicolon-separated list of the jars to package with the job jars to be sent to the cluster. These have to be valid paths.
pipeline.max-parallelism
-1 Integer The program-wide maximum parallelism used for operators which haven't specified a maximum parallelism. The maximum parallelism specifies the upper limit for dynamic scaling and the number of key groups used for partitioned state. Changing the value explicitly when recovery from original job will lead to state incompatibility.
pipeline.name
(none) String The job name used for printing and logging.
pipeline.object-reuse
false Boolean When enabled objects that Flink internally uses for deserialization and passing data to user-code functions will be reused. Keep in mind that this can lead to bugs when the user-code function of an operation is not aware of this behaviour.
pipeline.operator-chaining
true Boolean Operator chaining allows non-shuffle operations to be co-located in the same thread fully avoiding serialization and de-serialization.
pipeline.registered-kryo-types
(none) List<String> Semicolon separated list of types to be registered with the serialization stack. If the type is eventually serialized as a POJO, then the type is registered with the POJO serializer. If the type ends up being serialized with Kryo, then it will be registered at Kryo to make sure that only tags are written.
pipeline.registered-pojo-types
(none) List<String> Semicolon separated list of types to be registered with the serialization stack. If the type is eventually serialized as a POJO, then the type is registered with the POJO serializer. If the type ends up being serialized with Kryo, then it will be registered at Kryo to make sure that only tags are written.
pipeline.vertex-description-mode
TREE

Enum

The mode how we organize description of a job vertex.

Possible values:
  • "TREE"
  • "CASCADING"
pipeline.vertex-name-include-index-prefix
false Boolean Whether name of vertex includes topological index or not. When it is true, the name will have a prefix of index of the vertex, like '[vertex-0]Source: source'. It is false by default
Key Default Type Description
pipeline.time-characteristic
ProcessingTime

Enum

The time characteristic for all created streams, e.g., processingtime, event time, or ingestion time.

If you set the characteristic to IngestionTime or EventTime this will set a default watermark update interval of 200 ms. If this is not applicable for your application you should change it using pipeline.auto-watermark-interval.

Possible values:
  • "ProcessingTime"
  • "IngestionTime"
  • "EventTime"

Checkpointing #

Key Default Type Description
execution.checkpointing.aligned-checkpoint-timeout
0 ms Duration Only relevant if execution.checkpointing.unaligned is enabled.

If timeout is 0, checkpoints will always start unaligned.

If timeout has a positive value, checkpoints will start aligned. If during checkpointing, checkpoint start delay exceeds this timeout, alignment will timeout and checkpoint barrier will start working as unaligned checkpoint.
execution.checkpointing.checkpoints-after-tasks-finish.enabled
true Boolean Feature toggle for enabling checkpointing even if some of tasks have finished. Before you enable it, please take a look at the important considerations
execution.checkpointing.externalized-checkpoint-retention
NO_EXTERNALIZED_CHECKPOINTS

Enum

Externalized checkpoints write their meta data out to persistent storage and are not automatically cleaned up when the owning job fails or is suspended (terminating with job status JobStatus#FAILED or JobStatus#SUSPENDED). In this case, you have to manually clean up the checkpoint state, both the meta data and actual program state.

The mode defines how an externalized checkpoint should be cleaned up on job cancellation. If you choose to retain externalized checkpoints on cancellation you have to handle checkpoint clean up manually when you cancel the job as well (terminating with job status JobStatus#CANCELED).

The target directory for externalized checkpoints is configured via state.checkpoints.dir.

Possible values:
  • "DELETE_ON_CANCELLATION": Checkpoint state is only kept when the owning job fails. It is deleted if the job is cancelled.
  • "RETAIN_ON_CANCELLATION": Checkpoint state is kept when the owning job is cancelled or fails.
  • "NO_EXTERNALIZED_CHECKPOINTS": Externalized checkpoints are disabled.
execution.checkpointing.interval
(none) Duration Gets the interval in which checkpoints are periodically scheduled.

This setting defines the base interval. Checkpoint triggering may be delayed by the settings execution.checkpointing.max-concurrent-checkpoints and execution.checkpointing.min-pause
execution.checkpointing.max-concurrent-checkpoints
1 Integer The maximum number of checkpoint attempts that may be in progress at the same time. If this value is n, then no checkpoints will be triggered while n checkpoint attempts are currently in flight. For the next checkpoint to be triggered, one checkpoint attempt would need to finish or expire.
execution.checkpointing.min-pause
0 ms Duration The minimal pause between checkpointing attempts. This setting defines how soon thecheckpoint coordinator may trigger another checkpoint after it becomes possible to triggeranother checkpoint with respect to the maximum number of concurrent checkpoints(see execution.checkpointing.max-concurrent-checkpoints).

If the maximum number of concurrent checkpoints is set to one, this setting makes effectively sure that a minimum amount of time passes where no checkpoint is in progress at all.
execution.checkpointing.mode
EXACTLY_ONCE

Enum

The checkpointing mode (exactly-once vs. at-least-once).

Possible values:
  • "EXACTLY_ONCE"
  • "AT_LEAST_ONCE"
execution.checkpointing.recover-without-channel-state.checkpoint-id
-1 Long Checkpoint id for which in-flight data should be ignored in case of the recovery from this checkpoint.

It is better to keep this value empty until there is explicit needs to restore from the specific checkpoint without in-flight data.
execution.checkpointing.timeout
10 min Duration The maximum time that a checkpoint may take before being discarded.
execution.checkpointing.tolerable-failed-checkpoints
(none) Integer The tolerable checkpoint consecutive failure number. If set to 0, that means we do not tolerance any checkpoint failure.
execution.checkpointing.unaligned
false Boolean Enables unaligned checkpoints, which greatly reduce checkpointing times under backpressure.

Unaligned checkpoints contain data stored in buffers as part of the checkpoint state, which allows checkpoint barriers to overtake these buffers. Thus, the checkpoint duration becomes independent of the current throughput as checkpoint barriers are effectively not embedded into the stream of data anymore.

Unaligned checkpoints can only be enabled if execution.checkpointing.mode is EXACTLY_ONCE and if execution.checkpointing.max-concurrent-checkpoints is 1
execution.checkpointing.unaligned.forced
false Boolean Forces unaligned checkpoints, particularly allowing them for iterative jobs.


Debugging & Expert Tuning #

The options below here are meant for expert users and for fixing/debugging problems. Most setups should not need to configure these options.

Class Loading #

Flink dynamically loads the code for jobs submitted to a session cluster. In addition, Flink tries to hide many dependencies in the classpath from the application. This helps to reduce dependency conflicts between the application code and the dependencies in the classpath.

Please refer to the Debugging Classloading Docs for details.

Key Default Type Description
classloader.check-leaked-classloader
true Boolean Fails attempts at loading classes if the user classloader of a job is used after it has terminated. This is usually caused by the classloader being leaked by lingering threads or misbehaving libraries, which may also result in the classloader being used by other jobs. This check should only be disabled if such a leak prevents further jobs from running.
classloader.fail-on-metaspace-oom-error
true Boolean Fail Flink JVM processes if 'OutOfMemoryError: Metaspace' is thrown while trying to load a user code class.
classloader.parent-first-patterns.additional
List<String> A (semicolon-separated) list of patterns that specifies which classes should always be resolved through the parent ClassLoader first. A pattern is a simple prefix that is checked against the fully qualified class name. These patterns are appended to "classloader.parent-first-patterns.default".
classloader.parent-first-patterns.default
"java.";"scala.";"org.apache.flink.";"com.esotericsoftware.kryo";"org.apache.hadoop.";"javax.annotation.";"org.xml";"javax.xml";"org.apache.xerces";"org.w3c";"org.rocksdb.";"org.slf4j";"org.apache.log4j";"org.apache.logging";"org.apache.commons.logging";"ch.qos.logback" List<String> A (semicolon-separated) list of patterns that specifies which classes should always be resolved through the parent ClassLoader first. A pattern is a simple prefix that is checked against the fully qualified class name. This setting should generally not be modified. To add another pattern we recommend to use "classloader.parent-first-patterns.additional" instead.
classloader.resolve-order
"child-first" String Defines the class resolution strategy when loading classes from user code, meaning whether to first check the user code jar ("child-first") or the application classpath ("parent-first"). The default settings indicate to load classes first from the user code jar, which means that user code jars can include and load different dependencies than Flink uses (transitively).

Advanced Options for the debugging #

Key Default Type Description
jmx.server.port
(none) String The port range for the JMX server to start the registry. The port config can be a single port: "9123", a range of ports: "50100-50200", or a list of ranges and ports: "50100-50200,50300-50400,51234".
This option overrides metrics.reporter.*.port option.

Advanced State Backends Options #

Key Default Type Description
state.storage.fs.memory-threshold
20 kb MemorySize The minimum size of state data files. All state chunks smaller than that are stored inline in the root checkpoint metadata file. The max memory threshold for this configuration is 1MB.
state.storage.fs.write-buffer-size
4096 Integer The default size of the write buffer for the checkpoint streams that write to file systems. The actual write buffer size is determined to be the maximum of the value of this option and option 'state.storage.fs.memory-threshold'.

State Backends Latency Tracking Options #

Key Default Type Description
state.backend.latency-track.history-size
128 Integer Defines the number of measured latencies to maintain at each state access operation.
state.backend.latency-track.keyed-state-enabled
false Boolean Whether to track latency of keyed state operations, e.g value state put/get/clear.
state.backend.latency-track.sample-interval
100 Integer The sample interval of latency track once 'state.backend.latency-track.keyed-state-enabled' is enabled. The default value is 100, which means we would track the latency every 100 access requests.
state.backend.latency-track.state-name-as-variable
true Boolean Whether to expose state name as a variable if tracking latency.

Advanced RocksDB State Backends Options #

Advanced options to tune RocksDB and RocksDB checkpoints.

Key Default Type Description
state.backend.rocksdb.checkpoint.transfer.thread.num
4 Integer The number of threads (per stateful operator) used to transfer (download and upload) files in RocksDBStateBackend.
state.backend.rocksdb.localdir
(none) String The local directory (on the TaskManager) where RocksDB puts its files. Per default, it will be <WORKING_DIR>/tmp. See process.taskmanager.working-dir for more details.
state.backend.rocksdb.options-factory
(none) String The options factory class for users to add customized options in DBOptions and ColumnFamilyOptions for RocksDB. If set, the RocksDB state backend will load the class and apply configs to DBOptions and ColumnFamilyOptions after loading ones from 'RocksDBConfigurableOptions' and pre-defined options.
state.backend.rocksdb.predefined-options
"DEFAULT" String The predefined settings for RocksDB DBOptions and ColumnFamilyOptions by Flink community. Current supported candidate predefined-options are DEFAULT, SPINNING_DISK_OPTIMIZED, SPINNING_DISK_OPTIMIZED_HIGH_MEM or FLASH_SSD_OPTIMIZED. Note that user customized options and options from the RocksDBOptionsFactory are applied on top of these predefined ones.

State Changelog Options #

Please refer to State Backends for information on using State Changelog.

The feature is in experimental status.
Key Default Type Description
state.backend.changelog.enabled
false Boolean Whether to enable state backend to write state changes to StateChangelog. If this config is not set explicitly, it means no preference for enabling the change log, and the value in lower config level will take effect. The default value 'false' here means if no value set (job or cluster), the change log will not be enabled.
state.backend.changelog.max-failures-allowed
3 Integer Max number of consecutive materialization failures allowed.
state.backend.changelog.periodic-materialize.interval
10 min Duration Defines the interval in milliseconds to perform periodic materialization for state backend. The periodic materialization will be disabled when the value is negative
state.backend.changelog.storage
"memory" String The storage to be used to store state changelog.
The implementation can be specified via their shortcut name.
The list of recognized shortcut names currently includes 'memory' and 'filesystem'.

FileSystem-based Changelog options #

These settings take effect when the state.backend.changelog.storage is set to filesystem (see above).

Key Default Type Description
dstl.dfs.base-path
(none) String Base path to store changelog files.
dstl.dfs.batch.persist-delay
10 ms Duration Delay before persisting changelog after receiving persist request (on checkpoint). Minimizes the number of files and requests if multiple operators (backends) or sub-tasks are using the same store. Correspondingly increases checkpoint time (async phase).
dstl.dfs.batch.persist-size-threshold
10 mb MemorySize Size threshold for state changes that were requested to be persisted but are waiting for dstl.dfs.batch.persist-delay (from all operators). . Once reached, accumulated changes are persisted immediately. This is different from dstl.dfs.preemptive-persist-threshold as it happens AFTER the checkpoint and potentially for state changes of multiple operators. Must not exceed in-flight data limit (see below)
dstl.dfs.compression.enabled
false Boolean Whether to enable compression when serializing changelog.
dstl.dfs.preemptive-persist-threshold
5 mb MemorySize Size threshold for state changes of a single operator beyond which they are persisted pre-emptively without waiting for a checkpoint. Improves checkpointing time by allowing quasi-continuous uploading of state changes (as opposed to uploading all accumulated changes on checkpoint).
dstl.dfs.upload.buffer-size
1 mb MemorySize Buffer size used when uploading change sets
dstl.dfs.upload.max-attempts
3 Integer Maximum number of attempts (including the initial one) to perform a particular upload. Only takes effect if dstl.dfs.upload.retry-policy is fixed.
dstl.dfs.upload.max-in-flight
100 mb MemorySize Max amount of data allowed to be in-flight. Upon reaching this limit the task will be back-pressured. I.e., snapshotting will block; normal processing will block if dstl.dfs.preemptive-persist-threshold is set and reached. The limit is applied to the total size of in-flight changes if multiple operators/backends are using the same changelog storage. Must be greater than or equal to dstl.dfs.batch.persist-size-threshold
dstl.dfs.upload.next-attempt-delay
500 ms Duration Delay before the next attempt (if the failure was not caused by a timeout).
dstl.dfs.upload.num-threads
5 Integer Number of threads to use for upload.
dstl.dfs.upload.retry-policy
"fixed" String Retry policy for the failed uploads (in particular, timed out). Valid values: none, fixed.
dstl.dfs.upload.timeout
1 s Duration Time threshold beyond which an upload is considered timed out. If a new attempt is made but this upload succeeds earlier then this upload result will be used. May improve upload times if tail latencies of upload requests are significantly high. Only takes effect if dstl.dfs.upload.retry-policy is fixed. Please note that timeout * max_attempts should be less than execution.checkpointing.timeout

RocksDB Configurable Options

These options give fine-grained control over the behavior and resources of ColumnFamilies. With the introduction of state.backend.rocksdb.memory.managed and state.backend.rocksdb.memory.fixed-per-slot (Apache Flink 1.10), it should be only necessary to use the options here for advanced performance tuning. These options here can also be specified in the application program via RocksDBStateBackend.setRocksDBOptions(RocksDBOptionsFactory).

Key Default Type Description
state.backend.rocksdb.block.blocksize
4 kb MemorySize The approximate size (in bytes) of user data packed per block. The default blocksize is '4KB'.
state.backend.rocksdb.block.cache-size
8 mb MemorySize The amount of the cache for data blocks in RocksDB. The default block-cache size is '8MB'.
state.backend.rocksdb.block.metadata-blocksize
4 kb MemorySize Approximate size of partitioned metadata packed per block. Currently applied to indexes block when partitioned index/filters option is enabled. The default blocksize is '4KB'.
state.backend.rocksdb.bloom-filter.bits-per-key
10.0 Double Bits per key that bloom filter will use, this only take effect when bloom filter is used. The default value is 10.0.
state.backend.rocksdb.bloom-filter.block-based-mode
false Boolean If true, RocksDB will use block-based filter instead of full filter, this only take effect when bloom filter is used. The default value is 'false'.
state.backend.rocksdb.compaction.level.max-size-level-base
256 mb MemorySize The upper-bound of the total size of level base files in bytes. The default value is '256MB'.
state.backend.rocksdb.compaction.level.target-file-size-base
64 mb MemorySize The target file size for compaction, which determines a level-1 file size. The default value is '64MB'.
state.backend.rocksdb.compaction.level.use-dynamic-size
false Boolean If true, RocksDB will pick target size of each level dynamically. From an empty DB, RocksDB would make last level the base level, which means merging L0 data into the last level, until it exceeds max_bytes_for_level_base. And then repeat this process for second last level and so on. The default value is 'false'. For more information, please refer to RocksDB's doc.
state.backend.rocksdb.compaction.style
LEVEL

Enum

The specified compaction style for DB. Candidate compaction style is LEVEL, FIFO, UNIVERSAL or NONE, and Flink chooses 'LEVEL' as default style.

Possible values:
  • "LEVEL"
  • "UNIVERSAL"
  • "FIFO"
  • "NONE"
state.backend.rocksdb.files.open
-1 Integer The maximum number of open files (per stateful operator) that can be used by the DB, '-1' means no limit. The default value is '-1'.
state.backend.rocksdb.log.dir
(none) String The directory for RocksDB's information logging files. If empty (Flink default setting), log files will be in the same directory as the Flink log. If non-empty, this directory will be used and the data directory's absolute path will be used as the prefix of the log file name.
state.backend.rocksdb.log.file-num
4 Integer The maximum number of files RocksDB should keep for information logging (Default setting: 4).
state.backend.rocksdb.log.level
INFO_LEVEL

Enum

The specified information logging level for RocksDB. If unset, Flink will use INFO_LEVEL.
Note: RocksDB info logs will not be written to the TaskManager logs and there is no rolling strategy, unless you configure state.backend.rocksdb.log.dir, state.backend.rocksdb.log.max-file-size, and state.backend.rocksdb.log.file-num accordingly. Without a rolling strategy, long-running tasks may lead to uncontrolled disk space usage if configured with increased log levels!
There is no need to modify the RocksDB log level, unless for troubleshooting RocksDB.

Possible values:
  • "DEBUG_LEVEL"
  • "INFO_LEVEL"
  • "WARN_LEVEL"
  • "ERROR_LEVEL"
  • "FATAL_LEVEL"
  • "HEADER_LEVEL"
  • "NUM_INFO_LOG_LEVELS"
state.backend.rocksdb.log.max-file-size
25 mb MemorySize The maximum size of RocksDB's file used for information logging. If the log files becomes larger than this, a new file will be created. If 0, all logs will be written to one log file. The default maximum file size is '25MB'.
state.backend.rocksdb.thread.num
2 Integer The maximum number of concurrent background flush and compaction jobs (per stateful operator). The default value is '2'.
state.backend.rocksdb.use-bloom-filter
false Boolean If true, every newly created SST file will contain a Bloom filter. It is disabled by default.
state.backend.rocksdb.write-batch-size
2 mb MemorySize The max size of the consumed memory for RocksDB batch write, will flush just based on item count if this config set to 0.
state.backend.rocksdb.writebuffer.count
2 Integer The maximum number of write buffers that are built up in memory. The default value is '2'.
state.backend.rocksdb.writebuffer.number-to-merge
1 Integer The minimum number of write buffers that will be merged together before writing to storage. The default value is '1'.
state.backend.rocksdb.writebuffer.size
64 mb MemorySize The amount of data built up in memory (backed by an unsorted log on disk) before converting to a sorted on-disk files. The default writebuffer size is '64MB'.

Advanced Fault Tolerance Options #

These parameters can help with problems related to failover and to components erroneously considering each other as failed.

Key Default Type Description
cluster.io-pool.size
(none) Integer The size of the IO executor pool used by the cluster to execute blocking IO operations (Master as well as TaskManager processes). By default it will use 4 * the number of CPU cores (hardware contexts) that the cluster process has access to. Increasing the pool size allows to run more IO operations concurrently.
cluster.registration.error-delay
10000 Long The pause made after an registration attempt caused an exception (other than timeout) in milliseconds.
cluster.registration.initial-timeout
100 Long Initial registration timeout between cluster components in milliseconds.
cluster.registration.max-timeout
30000 Long Maximum registration timeout between cluster components in milliseconds.
cluster.registration.refused-registration-delay
30000 Long The pause made after the registration attempt was refused in milliseconds.
cluster.services.shutdown-timeout
30000 Long The shutdown timeout for cluster services like executors in milliseconds.
heartbeat.interval
10000 Long Time interval between heartbeat RPC requests from the sender to the receiver side.
heartbeat.rpc-failure-threshold
2 Integer The number of consecutive failed heartbeat RPCs until a heartbeat target is marked as unreachable. Failed heartbeat RPCs can be used to detect dead targets faster because they no longer receive the RPCs. The detection time is heartbeat.interval * heartbeat.rpc-failure-threshold. In environments with a flaky network, setting this value too low can produce false positives. In this case, we recommend to increase this value, but not higher than heartbeat.timeout / heartbeat.interval. The mechanism can be disabled by setting this option to -1
heartbeat.timeout
50000 Long Timeout for requesting and receiving heartbeats for both sender and receiver sides.
jobmanager.execution.failover-strategy
"region" String This option specifies how the job computation recovers from task failures. Accepted values are:
  • 'full': Restarts all tasks to recover the job.
  • 'region': Restarts all tasks that could be affected by the task failure. More details can be found here.

Advanced Cluster Options #

Key Default Type Description
cluster.intercept-user-system-exit
DISABLED

Enum

Flag to check user code exiting system by terminating JVM (e.g., System.exit()). Note that this configuration option can interfere with cluster.processes.halt-on-fatal-error: In intercepted user-code, a call to System.exit() will not cause the JVM to halt, when THROW is configured.

Possible values:
  • "DISABLED": Flink is not monitoring or intercepting calls to System.exit()
  • "LOG": Log exit attempt with stack trace but still allowing exit to be performed
  • "THROW": Throw exception when exit is attempted disallowing JVM termination
cluster.processes.halt-on-fatal-error
false Boolean Whether processes should halt on fatal errors instead of performing a graceful shutdown. In some environments (e.g. Java 8 with the G1 garbage collector), a regular graceful shutdown can lead to a JVM deadlock. See FLINK-16510 for details.
cluster.thread-dump.stacktrace-max-depth
8 Integer The maximum stacktrace depth of TaskManager and JobManager's thread dump web-frontend displayed.
cluster.uncaught-exception-handling
LOG

Enum

Defines whether cluster will handle any uncaught exceptions by just logging them (LOG mode), or by failing job (FAIL mode)

Possible values:
  • "LOG"
  • "FAIL"
process.jobmanager.working-dir
(none) String Working directory for Flink JobManager processes. The working directory can be used to store information that can be used upon process recovery. If not configured, then it will default to process.working-dir.
process.taskmanager.working-dir
(none) String Working directory for Flink TaskManager processes. The working directory can be used to store information that can be used upon process recovery. If not configured, then it will default to process.working-dir.
process.working-dir
io.tmp.dirs String Local working directory for Flink processes. The working directory can be used to store information that can be used upon process recovery. If not configured, then it will default to a randomly picked temporary directory defined via io.tmp.dirs.

Advanced JobManager Options #

Key Default Type Description
jobmanager.future-pool.size
(none) Integer The size of the future thread pool to execute future callbacks for all spawned JobMasters. If no value is specified, then Flink defaults to the number of available CPU cores.
jobmanager.io-pool.size
(none) Integer The size of the IO thread pool to run blocking operations for all spawned JobMasters. This includes recovery and completion of checkpoints. Increase this value if you experience slow checkpoint operations when running many jobs. If no value is specified, then Flink defaults to the number of available CPU cores.

Advanced Scheduling Options #

These parameters can help with fine-tuning scheduling for specific situations.

Key Default Type Description
cluster.evenly-spread-out-slots
false Boolean Enable the slot spread out allocation strategy. This strategy tries to spread out the slots evenly across all available TaskExecutors.
cluster.fine-grained-resource-management.enabled
false Boolean Defines whether the cluster uses fine-grained resource management.
fine-grained.shuffle-mode.all-blocking
false Boolean Whether to convert all PIPELINE edges to BLOCKING when apply fine-grained resource management in batch jobs.
jobmanager.adaptive-batch-scheduler.avg-data-volume-per-task
1 gb MemorySize The average size of data volume to expect each task instance to process if jobmanager.scheduler has been set to AdaptiveBatch. Note that since the parallelism of the vertices is adjusted to a power of 2, the actual average size will be 0.75~1.5 times this value. It is also important to note that when data skew occurs or the decided parallelism reaches the jobmanager.adaptive-batch-scheduler.max-parallelism (due to too much data), the data actually processed by some tasks may far exceed this value.
jobmanager.adaptive-batch-scheduler.default-source-parallelism
1 Integer The default parallelism of source vertices if jobmanager.scheduler has been set to AdaptiveBatch
jobmanager.adaptive-batch-scheduler.max-parallelism
128 Integer The upper bound of allowed parallelism to set adaptively if jobmanager.scheduler has been set to AdaptiveBatch. Currently, this option should be configured as a power of 2, otherwise it will also be rounded down to a power of 2 automatically.
jobmanager.adaptive-batch-scheduler.min-parallelism
1 Integer The lower bound of allowed parallelism to set adaptively if jobmanager.scheduler has been set to AdaptiveBatch. Currently, this option should be configured as a power of 2, otherwise it will also be rounded up to a power of 2 automatically.
jobmanager.adaptive-scheduler.min-parallelism-increase
1 Integer Configure the minimum increase in parallelism for a job to scale up.
jobmanager.adaptive-scheduler.resource-stabilization-timeout
10 s Duration The resource stabilization timeout defines the time the JobManager will wait if fewer than the desired but sufficient resources are available. The timeout starts once sufficient resources for running the job are available. Once this timeout has passed, the job will start executing with the available resources.
If scheduler-mode is configured to REACTIVE, this configuration value will default to 0, so that jobs are starting immediately with the available resources.
jobmanager.adaptive-scheduler.resource-wait-timeout
5 min Duration The maximum time the JobManager will wait to acquire all required resources after a job submission or restart. Once elapsed it will try to run the job with a lower parallelism, or fail if the minimum amount of resources could not be acquired.
Increasing this value will make the cluster more resilient against temporary resources shortages (e.g., there is more time for a failed TaskManager to be restarted).
Setting a negative duration will disable the resource timeout: The JobManager will wait indefinitely for resources to appear.
If scheduler-mode is configured to REACTIVE, this configuration value will default to a negative value to disable the resource timeout.
scheduler-mode
(none)

Enum

Determines the mode of the scheduler. Note that scheduler-mode=REACTIVE is only supported by standalone application deployments, not by active resource managers (YARN, Kubernetes) or session clusters.

Possible values:
  • "REACTIVE"
slot.idle.timeout
50000 Long The timeout in milliseconds for a idle slot in Slot Pool.
slot.request.timeout
300000 Long The timeout in milliseconds for requesting a slot from Slot Pool.
slotmanager.max-total-resource.cpu
(none) Double Maximum cpu cores the Flink cluster allocates for slots. Resources for JobManager and TaskManager framework are excluded. If not configured, it will be derived from 'slotmanager.number-of-slots.max'.
slotmanager.max-total-resource.memory
(none) MemorySize Maximum memory size the Flink cluster allocates for slots. Resources for JobManager and TaskManager framework are excluded. If not configured, it will be derived from 'slotmanager.number-of-slots.max'.
slotmanager.number-of-slots.max
2147483647 Integer Defines the maximum number of slots that the Flink cluster allocates. This configuration option is meant for limiting the resource consumption for batch workloads. It is not recommended to configure this option for streaming workloads, which may fail if there are not enough slots. Note that this configuration option does not take effect for standalone clusters, where how many slots are allocated is not controlled by Flink.

Advanced High-availability Options #

Key Default Type Description
high-availability.jobmanager.port
"0" String The port (range) used by the Flink Master for its RPC connections in highly-available setups. In highly-available setups, this value is used instead of 'jobmanager.rpc.port'.A value of '0' means that a random free port is chosen. TaskManagers discover this port through the high-availability services (leader election), so a random port or a port range works without requiring any additional means of service discovery.
high-availability.use-old-ha-services
false Boolean Use this option to disable the new HA service implementations for ZooKeeper and K8s. This is a safety hatch in case that the new ha services are buggy.

Advanced High-availability ZooKeeper Options #

Key Default Type Description
high-availability.zookeeper.client.acl
"open" String Defines the ACL (open|creator) to be configured on ZK node. The configuration value can be set to “creator” if the ZooKeeper server configuration has the “authProvider” property mapped to use SASLAuthenticationProvider and the cluster is configured to run in secure mode (Kerberos).
high-availability.zookeeper.client.connection-timeout
15000 Integer Defines the connection timeout for ZooKeeper in ms.
high-availability.zookeeper.client.max-retry-attempts
3 Integer Defines the number of connection retries before the client gives up.
high-availability.zookeeper.client.retry-wait
5000 Integer Defines the pause between consecutive retries in ms.
high-availability.zookeeper.client.session-timeout
60000 Integer Defines the session timeout for the ZooKeeper session in ms.
high-availability.zookeeper.client.tolerate-suspended-connections
false Boolean Defines whether a suspended ZooKeeper connection will be treated as an error that causes the leader information to be invalidated or not. In case you set this option to true, Flink will wait until a ZooKeeper connection is marked as lost before it revokes the leadership of components. This has the effect that Flink is more resilient against temporary connection instabilities at the cost of running more likely into timing issues with ZooKeeper.
high-availability.zookeeper.path.jobgraphs
"/jobgraphs" String ZooKeeper root path (ZNode) for job graphs
high-availability.zookeeper.path.running-registry
"/running_job_registry/" String

Advanced High-availability Kubernetes Options #

Key Default Type Description
high-availability.kubernetes.leader-election.lease-duration
15 s Duration Define the lease duration for the Kubernetes leader election. The leader will continuously renew its lease time to indicate its existence. And the followers will do a lease checking against the current time. "renewTime + leaseDuration > now" means the leader is alive.
high-availability.kubernetes.leader-election.renew-deadline
15 s Duration Defines the deadline duration when the leader tries to renew the lease. The leader will give up its leadership if it cannot successfully renew the lease in the given time.
high-availability.kubernetes.leader-election.retry-period
5 s Duration Defines the pause duration between consecutive retries. All the contenders, including the current leader and all other followers, periodically try to acquire/renew the leadership if possible at this interval.

Advanced SSL Security Options #

Key Default Type Description
security.ssl.internal.close-notify-flush-timeout
-1 Integer The timeout (in ms) for flushing the `close_notify` that was triggered by closing a channel. If the `close_notify` was not flushed in the given timeout the channel will be closed forcibly. (-1 = use system default)
security.ssl.internal.handshake-timeout
-1 Integer The timeout (in ms) during SSL handshake. (-1 = use system default)
security.ssl.internal.session-cache-size
-1 Integer The size of the cache used for storing SSL session objects. According to here, you should always set this to an appropriate number to not run into a bug with stalling IO threads during garbage collection. (-1 = use system default).
security.ssl.internal.session-timeout
-1 Integer The timeout (in ms) for the cached SSL session objects. (-1 = use system default)
security.ssl.provider
"JDK" String The SSL engine provider to use for the ssl transport:
  • JDK: default Java-based SSL engine
  • OPENSSL: openSSL-based SSL engine using system libraries
OPENSSL is based on netty-tcnative and comes in two flavours:
  • dynamically linked: This will use your system's openSSL libraries (if compatible) and requires opt/flink-shaded-netty-tcnative-dynamic-*.jar to be copied to lib/
  • statically linked: Due to potential licensing issues with openSSL (see LEGAL-393), we cannot ship pre-built libraries. However, you can build the required library yourself and put it into lib/:
    git clone https://github.com/apache/flink-shaded.git && cd flink-shaded && mvn clean package -Pinclude-netty-tcnative-static -pl flink-shaded-netty-tcnative-static

Advanced Options for the REST endpoint and Client #

Key Default Type Description
rest.async.store-duration
5 min Duration Maximum duration that the result of an async operation is stored. Once elapsed the result of the operation can no longer be retrieved.
rest.await-leader-timeout
30000 Long The time in ms that the client waits for the leader address, e.g., Dispatcher or WebMonitorEndpoint
rest.client.max-content-length
104857600 Integer The maximum content length in bytes that the client will handle.
rest.connection-timeout
15000 Long The maximum time in ms for the client to establish a TCP connection.
rest.flamegraph.cleanup-interval
10 min Duration Time after which cached stats are cleaned up if not accessed. It can be specified using notation: "100 s", "10 m".
rest.flamegraph.delay-between-samples
50 ms Duration Delay between individual stack trace samples taken for building a FlameGraph. It can be specified using notation: "100 ms", "1 s".
rest.flamegraph.enabled
false Boolean Enables the experimental flame graph feature.
rest.flamegraph.num-samples
100 Integer Number of samples to take to build a FlameGraph.
rest.flamegraph.refresh-interval
1 min Duration Time after which available stats are deprecated and need to be refreshed (by resampling). It can be specified using notation: "30 s", "1 m".
rest.flamegraph.stack-depth
100 Integer Maximum depth of stack traces used to create FlameGraphs.
rest.idleness-timeout
300000 Long The maximum time in ms for a connection to stay idle before failing.
rest.retry.delay
3000 Long The time in ms that the client waits between retries (See also `rest.retry.max-attempts`).
rest.retry.max-attempts
20 Integer The number of retries the client will attempt if a retryable operations fails.
rest.server.max-content-length
104857600 Integer The maximum content length in bytes that the server will handle.
rest.server.numThreads
4 Integer The number of threads for the asynchronous processing of requests.
rest.server.thread-priority
5 Integer Thread priority of the REST server's executor for processing asynchronous requests. Lowering the thread priority will give Flink's main components more CPU time whereas increasing will allocate more time for the REST server's processing.
Key Default Type Description
web.access-control-allow-origin
"*" String Access-Control-Allow-Origin header for all responses from the web-frontend.
web.cancel.enable
true Boolean Flag indicating whether jobs can be canceled from the web-frontend.
web.checkpoints.history
10 Integer Number of checkpoints to remember for recent history.
web.exception-history-size
16 Integer The maximum number of failures collected by the exception history per job.
web.history
5 Integer Number of archived jobs for the JobManager.
web.log.path
(none) String Path to the log file (may be in /log for standalone but under log directory when using YARN).
web.refresh-interval
3000 Long Refresh interval for the web-frontend in milliseconds.
web.submit.enable
true Boolean Flag indicating whether jobs can be uploaded and run from the web-frontend.
web.timeout
600000 Long Timeout for asynchronous operations by the web monitor in milliseconds.
web.tmpdir
System.getProperty("java.io.tmpdir") String Local directory that is used by the REST API for temporary files.
web.upload.dir
(none) String Local directory that is used by the REST API for storing uploaded jars. If not specified a dynamic directory will be created under web.tmpdir.

Full JobManager Options #

JobManager

Key Default Type Description
jobmanager.adaptive-batch-scheduler.avg-data-volume-per-task
1 gb MemorySize The average size of data volume to expect each task instance to process if jobmanager.scheduler has been set to AdaptiveBatch. Note that since the parallelism of the vertices is adjusted to a power of 2, the actual average size will be 0.75~1.5 times this value. It is also important to note that when data skew occurs or the decided parallelism reaches the jobmanager.adaptive-batch-scheduler.max-parallelism (due to too much data), the data actually processed by some tasks may far exceed this value.
jobmanager.adaptive-batch-scheduler.default-source-parallelism
1 Integer The default parallelism of source vertices if jobmanager.scheduler has been set to AdaptiveBatch
jobmanager.adaptive-batch-scheduler.max-parallelism
128 Integer The upper bound of allowed parallelism to set adaptively if jobmanager.scheduler has been set to AdaptiveBatch. Currently, this option should be configured as a power of 2, otherwise it will also be rounded down to a power of 2 automatically.
jobmanager.adaptive-batch-scheduler.min-parallelism
1 Integer The lower bound of allowed parallelism to set adaptively if jobmanager.scheduler has been set to AdaptiveBatch. Currently, this option should be configured as a power of 2, otherwise it will also be rounded up to a power of 2 automatically.
jobmanager.adaptive-scheduler.min-parallelism-increase
1 Integer Configure the minimum increase in parallelism for a job to scale up.
jobmanager.adaptive-scheduler.resource-stabilization-timeout
10 s Duration The resource stabilization timeout defines the time the JobManager will wait if fewer than the desired but sufficient resources are available. The timeout starts once sufficient resources for running the job are available. Once this timeout has passed, the job will start executing with the available resources.
If scheduler-mode is configured to REACTIVE, this configuration value will default to 0, so that jobs are starting immediately with the available resources.
jobmanager.adaptive-scheduler.resource-wait-timeout
5 min Duration The maximum time the JobManager will wait to acquire all required resources after a job submission or restart. Once elapsed it will try to run the job with a lower parallelism, or fail if the minimum amount of resources could not be acquired.
Increasing this value will make the cluster more resilient against temporary resources shortages (e.g., there is more time for a failed TaskManager to be restarted).
Setting a negative duration will disable the resource timeout: The JobManager will wait indefinitely for resources to appear.
If scheduler-mode is configured to REACTIVE, this configuration value will default to a negative value to disable the resource timeout.
jobmanager.archive.fs.dir
(none) String Dictionary for JobManager to store the archives of completed jobs.
jobmanager.execution.attempts-history-size
16 Integer The maximum number of prior execution attempts kept in history.
jobmanager.execution.failover-strategy
"region" String This option specifies how the job computation recovers from task failures. Accepted values are:
  • 'full': Restarts all tasks to recover the job.
  • 'region': Restarts all tasks that could be affected by the task failure. More details can be found here.
jobmanager.future-pool.size
(none) Integer The size of the future thread pool to execute future callbacks for all spawned JobMasters. If no value is specified, then Flink defaults to the number of available CPU cores.
jobmanager.io-pool.size
(none) Integer The size of the IO thread pool to run blocking operations for all spawned JobMasters. This includes recovery and completion of checkpoints. Increase this value if you experience slow checkpoint operations when running many jobs. If no value is specified, then Flink defaults to the number of available CPU cores.
jobmanager.resource-id
(none) String The JobManager's ResourceID. If not configured, the ResourceID will be generated randomly.
jobmanager.retrieve-taskmanager-hostname
true Boolean Flag indicating whether JobManager would retrieve canonical host name of TaskManager during registration. If the option is set to "false", TaskManager registration with JobManager could be faster, since no reverse DNS lookup is performed. However, local input split assignment (such as for HDFS files) may be impacted.
jobmanager.rpc.address
(none) String The config parameter defining the network address to connect to for communication with the job manager. This value is only interpreted in setups where a single JobManager with static name or address exists (simple standalone setups, or container setups with dynamic service name resolution). It is not used in many high-availability setups, when a leader-election service (like ZooKeeper) is used to elect and discover the JobManager leader from potentially multiple standby JobManagers.
jobmanager.rpc.port
6123 Integer The config parameter defining the network port to connect to for communication with the job manager. Like jobmanager.rpc.address, this value is only interpreted in setups where a single JobManager with static name/address and port exists (simple standalone setups, or container setups with dynamic service name resolution). This config option is not used in many high-availability setups, when a leader-election service (like ZooKeeper) is used to elect and discover the JobManager leader from potentially multiple standby JobManagers.
jobstore.cache-size
52428800 Long The job store cache size in bytes which is used to keep completed jobs in memory.
jobstore.expiration-time
3600 Long The time in seconds after which a completed job expires and is purged from the job store.
jobstore.max-capacity
2147483647 Integer The max number of completed jobs that can be kept in the job store. NOTICE: if memory store keeps too many jobs in session cluster, it may cause FullGC or OOM in jm.
jobstore.type
File

Enum

Determines which job store implementation is used in session cluster. Accepted values are:
  • 'File': the file job store keeps the archived execution graphs in files
  • 'Memory': the memory job store keeps the archived execution graphs in memory. You may need to limit the jobstore.max-capacity to mitigate FullGC or OOM when there are too many graphs


Possible values:
  • "File"
  • "Memory"
web.exception-history-size
16 Integer The maximum number of failures collected by the exception history per job.

Blob Server

The Blob Server is a component in the JobManager. It is used for distribution of objects that are too large to be attached to a RPC message and that benefit from caching (like Jar files or large serialized code objects).

Key Default Type Description
blob.client.connect.timeout
0 Integer The connection timeout in milliseconds for the blob client.
blob.client.socket.timeout
300000 Integer The socket timeout in milliseconds for the blob client.
blob.fetch.backlog
1000 Integer The config parameter defining the desired backlog of BLOB fetches on the JobManager.Note that the operating system usually enforces an upper limit on the backlog size based on the SOMAXCONN setting.
blob.fetch.num-concurrent
50 Integer The config parameter defining the maximum number of concurrent BLOB fetches that the JobManager serves.
blob.fetch.retries
5 Integer The config parameter defining number of retires for failed BLOB fetches.
blob.offload.minsize
1048576 Integer The minimum size for messages to be offloaded to the BlobServer.
blob.server.port
"0" String The config parameter defining the server port of the blob service.
blob.service.cleanup.interval
3600 Long Cleanup interval of the blob caches at the task managers (in seconds).
blob.service.ssl.enabled
true Boolean Flag to override ssl support for the blob service transport.
blob.storage.directory
(none) String The config parameter defining the local storage directory to be used by the blob server. If not configured, then it will default to <WORKING_DIR>/blobStorage.

ResourceManager

These configuration keys control basic Resource Manager behavior, independent of the used resource orchestration management framework (YARN, etc.)

Key Default Type Description
resourcemanager.job.timeout
"5 minutes" String Timeout for jobs which don't have a job manager as leader assigned.
resourcemanager.rpc.port
0 Integer Defines the network port to connect to for communication with the resource manager. By default, the port of the JobManager, because the same ActorSystem is used. Its not possible to use this configuration key to define port ranges.
resourcemanager.standalone.start-up-time
-1 Long Time in milliseconds of the start-up period of a standalone cluster. During this time, resource manager of the standalone cluster expects new task executors to be registered, and will not fail slot requests that can not be satisfied by any current registered slots. After this time, it will fail pending and new coming requests immediately that can not be satisfied by registered slots. If not set, slot.request.timeout will be used by default.
resourcemanager.start-worker.max-failure-rate
10.0 Double The maximum number of start worker failures (Native Kubernetes / Yarn) per minute before pausing requesting new workers. Once the threshold is reached, subsequent worker requests will be postponed to after a configured retry interval ('resourcemanager.start-worker.retry-interval').
resourcemanager.start-worker.retry-interval
3 s Duration The time to wait before requesting new workers (Native Kubernetes / Yarn) once the max failure rate of starting workers ('resourcemanager.start-worker.max-failure-rate') is reached.
resourcemanager.taskmanager-registration.timeout
5 min Duration Timeout for TaskManagers to register at the active resource managers. If exceeded, active resource manager will release and try to re-request the resource for the worker. If not configured, fallback to 'taskmanager.registration.timeout'.
resourcemanager.taskmanager-timeout
30000 Long The timeout for an idle task manager to be released.
slotmanager.max-total-resource.cpu
(none) Double Maximum cpu cores the Flink cluster allocates for slots. Resources for JobManager and TaskManager framework are excluded. If not configured, it will be derived from 'slotmanager.number-of-slots.max'.
slotmanager.max-total-resource.memory
(none) MemorySize Maximum memory size the Flink cluster allocates for slots. Resources for JobManager and TaskManager framework are excluded. If not configured, it will be derived from 'slotmanager.number-of-slots.max'.
slotmanager.number-of-slots.max
2147483647 Integer Defines the maximum number of slots that the Flink cluster allocates. This configuration option is meant for limiting the resource consumption for batch workloads. It is not recommended to configure this option for streaming workloads, which may fail if there are not enough slots. Note that this configuration option does not take effect for standalone clusters, where how many slots are allocated is not controlled by Flink.
slotmanager.redundant-taskmanager-num
0 Integer The number of redundant task managers. Redundant task managers are extra task managers started by Flink, in order to speed up job recovery in case of failures due to task manager lost. Note that this feature is available only to the active deployments (native K8s, Yarn).

Full TaskManagerOptions #

Please refer to the network memory tuning guide for details on how to use the taskmanager.network.memory.buffer-debloat.* configuration.

Key Default Type Description
task.cancellation.interval
30000 Long Time interval between two successive task cancellation attempts in milliseconds.
task.cancellation.timeout
180000 Long Timeout in milliseconds after which a task cancellation times out and leads to a fatal TaskManager error. A value of 0 deactivates the watch dog. Notice that a task cancellation is different from both a task failure and a clean shutdown. Task cancellation timeout only applies to task cancellation and does not apply to task closing/clean-up caused by a task failure or a clean shutdown.
task.cancellation.timers.timeout
7500 Long Time we wait for the timers in milliseconds to finish all pending timer threads when the stream task is cancelled.
taskmanager.data.port
0 Integer The task manager’s external port used for data exchange operations.
taskmanager.data.ssl.enabled
true Boolean Enable SSL support for the taskmanager data transport. This is applicable only when the global flag for internal SSL (security.ssl.internal.enabled) is set to true
taskmanager.debug.memory.log
false Boolean Flag indicating whether to start a thread, which repeatedly logs the memory usage of the JVM.
taskmanager.debug.memory.log-interval
5000 Long The interval (in ms) for the log thread to log the current memory usage.
taskmanager.host
(none) String The external address of the network interface where the TaskManager is exposed. Because different TaskManagers need different values for this option, usually it is specified in an additional non-shared TaskManager-specific config file.
taskmanager.jvm-exit-on-oom
false Boolean Whether to kill the TaskManager when the task thread throws an OutOfMemoryError.
taskmanager.memory.min-segment-size
256 bytes MemorySize Minimum possible size of memory buffers used by the network stack and the memory manager. ex. can be used for automatic buffer size adjustment.
taskmanager.memory.segment-size
32 kb MemorySize Size of memory buffers used by the network stack and the memory manager.
taskmanager.network.bind-policy
"ip" String The automatic address binding policy used by the TaskManager if "taskmanager.host" is not set. The value should be one of the following:
  • "name" - uses hostname as binding address
  • "ip" - uses host's ip address as binding address
taskmanager.numberOfTaskSlots
1 Integer The number of parallel operator or user function instances that a single TaskManager can run. If this value is larger than 1, a single TaskManager takes multiple instances of a function or operator. That way, the TaskManager can utilize multiple CPU cores, but at the same time, the available memory is divided between the different operator or function instances. This value is typically proportional to the number of physical CPU cores that the TaskManager's machine has (e.g., equal to the number of cores, or half the number of cores).
taskmanager.registration.timeout
5 min Duration Defines the timeout for the TaskManager registration. If the duration is exceeded without a successful registration, then the TaskManager terminates.
taskmanager.resource-id
(none) String The TaskManager's ResourceID. If not configured, the ResourceID will be generated with the "RpcAddress:RpcPort" and a 6-character random string. Notice that this option is not valid in Yarn and Native Kubernetes mode.
taskmanager.rpc.port
"0" String The external RPC port where the TaskManager is exposed. Accepts a list of ports (“50100,50101”), ranges (“50100-50200”) or a combination of both. It is recommended to set a range of ports to avoid collisions when multiple TaskManagers are running on the same machine.
taskmanager.slot.timeout
10 s Duration Timeout used for identifying inactive slots. The TaskManager will free the slot if it does not become active within the given amount of time. Inactive slots can be caused by an out-dated slot request. If no value is configured, then it will fall back to akka.ask.timeout.

Data Transport Network Stack

These options are for the network stack that handles the streaming and batch data exchanges between TaskManagers.

Key Default Type Description
taskmanager.network.blocking-shuffle.compression.enabled
true Boolean Boolean flag indicating whether the shuffle data will be compressed for blocking shuffle mode. Note that data is compressed per buffer and compression can incur extra CPU overhead, so it is more effective for IO bounded scenario when compression ratio is high.
taskmanager.network.blocking-shuffle.type
"file" String The blocking shuffle type, either "mmap" or "file". The "auto" means selecting the property type automatically based on system memory architecture (64 bit for mmap and 32 bit for file). Note that the memory usage of mmap is not accounted by configured memory limits, but some resource frameworks like yarn would track this memory usage and kill the container once memory exceeding some threshold. Also note that this option is experimental and might be changed future.
taskmanager.network.detailed-metrics
false Boolean Boolean flag to enable/disable more detailed metrics about inbound/outbound network queue lengths.
taskmanager.network.max-num-tcp-connections
1 Integer The maximum number of tpc connections between taskmanagers for data communication.
taskmanager.network.memory.buffer-debloat.enabled
false Boolean The switch of the automatic buffered debloating feature. If enabled the amount of in-flight data will be adjusted automatically accordingly to the measured throughput.
taskmanager.network.memory.buffer-debloat.period
200 ms Duration The minimum period of time after which the buffer size will be debloated if required. The low value provides a fast reaction to the load fluctuation but can influence the performance.
taskmanager.network.memory.buffer-debloat.samples
20 Integer The number of the last buffer size values that will be taken for the correct calculation of the new one.
taskmanager.network.memory.buffer-debloat.target
1 s Duration The target total time after which buffered in-flight data should be fully consumed. This configuration option will be used, in combination with the measured throughput, to adjust the amount of in-flight data.
taskmanager.network.memory.buffer-debloat.threshold-percentages
25 Integer The minimum difference in percentage between the newly calculated buffer size and the old one to announce the new value. Can be used to avoid constant back and forth small adjustments.
taskmanager.network.memory.buffers-per-channel
2 Integer Number of exclusive network buffers to use for each outgoing/incoming channel (subpartition/input channel) in the credit-based flow control model. It should be configured at least 2 for good performance. 1 buffer is for receiving in-flight data in the subpartition and 1 buffer is for parallel serialization. The minimum valid value that can be configured is 0. When 0 buffers-per-channel is configured, the exclusive network buffers used per downstream incoming channel will be 0, but for each upstream outgoing channel, max(1, configured value) will be used. In other words we ensure that, for performance reasons, there is at least one buffer per outgoing channel regardless of the configuration.
taskmanager.network.memory.floating-buffers-per-gate
8 Integer Number of extra network buffers to use for each outgoing/incoming gate (result partition/input gate). In credit-based flow control mode, this indicates how many floating credits are shared among all the input channels. The floating buffers are distributed based on backlog (real-time output buffers in the subpartition) feedback, and can help relieve back-pressure caused by unbalanced data distribution among the subpartitions. This value should be increased in case of higher round trip times between nodes and/or larger number of machines in the cluster.
taskmanager.network.memory.max-buffers-per-channel
10 Integer Number of max buffers that can be used for each channel. If a channel exceeds the number of max buffers, it will make the task become unavailable, cause the back pressure and block the data processing. This might speed up checkpoint alignment by preventing excessive growth of the buffered in-flight data in case of data skew and high number of configured floating buffers. This limit is not strictly guaranteed, and can be ignored by things like flatMap operators, records spanning multiple buffers or single timer producing large amount of data.
taskmanager.network.netty.client.connectTimeoutSec
120 Integer The Netty client connection timeout.
taskmanager.network.netty.client.numThreads
-1 Integer The number of Netty client threads.
taskmanager.network.netty.num-arenas
-1 Integer The number of Netty arenas.
taskmanager.network.netty.sendReceiveBufferSize
0 Integer The Netty send and receive buffer size. This defaults to the system buffer size (cat /proc/sys/net/ipv4/tcp_[rw]mem) and is 4 MiB in modern Linux.
taskmanager.network.netty.server.backlog
0 Integer The netty server connection backlog.
taskmanager.network.netty.server.numThreads
-1 Integer The number of Netty server threads.
taskmanager.network.netty.transport
"auto" String The Netty transport type, either "nio" or "epoll". The "auto" means selecting the property mode automatically based on the platform. Note that the "epoll" mode can get better performance, less GC and have more advanced features which are only available on modern Linux.
taskmanager.network.request-backoff.initial
100 Integer Minimum backoff in milliseconds for partition requests of input channels.
taskmanager.network.request-backoff.max
10000 Integer Maximum backoff in milliseconds for partition requests of input channels.
taskmanager.network.retries
0 Integer The number of retry attempts for network communication. Currently it's only used for establishing input/output channel connections
taskmanager.network.sort-shuffle.min-buffers
512 Integer Minimum number of network buffers required per blocking result partition for sort-shuffle. For production usage, it is suggested to increase this config value to at least 2048 (64M memory if the default 32K memory segment size is used) to improve the data compression ratio and reduce the small network packets. Usually, several hundreds of megabytes memory is enough for large scale batch jobs. Note: you may also need to increase the size of total network memory to avoid the 'insufficient number of network buffers' error if you are increasing this config value.
taskmanager.network.sort-shuffle.min-parallelism
1 Integer Parallelism threshold to switch between sort-based blocking shuffle and hash-based blocking shuffle, which means for batch jobs of smaller parallelism, hash-shuffle will be used and for batch jobs of larger or equal parallelism, sort-shuffle will be used. The value 1 means that sort-shuffle is the default option. Note: For production usage, you may also need to tune 'taskmanager.network.sort-shuffle.min-buffers' and 'taskmanager.memory.framework.off-heap.batch-shuffle.size' for better performance.
taskmanager.network.tcp-connection.enable-reuse-across-jobs
true Boolean Whether to reuse tcp connections across multi jobs. If set to true, tcp connections will not be released after job finishes. The subsequent jobs will be free from the overhead of the connection re-establish. However, this may lead to an increase in the total number of connections on your machine. When it reaches the upper limit, you can set it to false to release idle connections. Note that to avoid connection leak, you must set taskmanager.network.max-num-tcp-connections to a smaller value before you enable tcp connection reuse.

RPC / Akka #

Flink uses Akka for RPC between components (JobManager/TaskManager/ResourceManager). Flink does not use Akka for data transport.

Key Default Type Description
akka.ask.callstack
true Boolean If true, call stack for asynchronous asks are captured. That way, when an ask fails (for example times out), you get a proper exception, describing to the original method call and call site. Note that in case of having millions of concurrent RPC calls, this may add to the memory footprint.
akka.ask.timeout
10 s Duration Timeout used for all futures and blocking Akka calls. If Flink fails due to timeouts then you should try to increase this value. Timeouts can be caused by slow machines or a congested network. The timeout value requires a time-unit specifier (ms/s/min/h/d).
akka.client-socket-worker-pool.pool-size-factor
1.0 Double The pool size factor is used to determine thread pool size using the following formula: ceil(available processors * factor). Resulting size is then bounded by the pool-size-min and pool-size-max values.
akka.client-socket-worker-pool.pool-size-max
2 Integer Max number of threads to cap factor-based number to.
akka.client-socket-worker-pool.pool-size-min
1 Integer Min number of threads to cap factor-based number to.
akka.fork-join-executor.parallelism-factor
2.0 Double The parallelism factor is used to determine thread pool size using the following formula: ceil(available processors * factor). Resulting size is then bounded by the parallelism-min and parallelism-max values.
akka.fork-join-executor.parallelism-max
64 Integer Max number of threads to cap factor-based parallelism number to.
akka.fork-join-executor.parallelism-min
8 Integer Min number of threads to cap factor-based parallelism number to.
akka.framesize
"10485760b" String Maximum size of messages which are sent between the JobManager and the TaskManagers. If Flink fails because messages exceed this limit, then you should increase it. The message size requires a size-unit specifier.
akka.jvm-exit-on-fatal-error
true Boolean Exit JVM on fatal Akka errors.
akka.log.lifecycle.events
false Boolean Turns on the Akka’s remote logging of events. Set this value to 'true' in case of debugging.
akka.lookup.timeout
10 s Duration Timeout used for the lookup of the JobManager. The timeout value has to contain a time-unit specifier (ms/s/min/h/d).
akka.retry-gate-closed-for
50 Long Milliseconds a gate should be closed for after a remote connection was disconnected.
akka.server-socket-worker-pool.pool-size-factor
1.0 Double The pool size factor is used to determine thread pool size using the following formula: ceil(available processors * factor). Resulting size is then bounded by the pool-size-min and pool-size-max values.
akka.server-socket-worker-pool.pool-size-max
2 Integer Max number of threads to cap factor-based number to.
akka.server-socket-worker-pool.pool-size-min
1 Integer Min number of threads to cap factor-based number to.
akka.ssl.enabled
true Boolean Turns on SSL for Akka’s remote communication. This is applicable only when the global ssl flag security.ssl.enabled is set to true.
akka.startup-timeout
(none) String Timeout after which the startup of a remote component is considered being failed.
akka.tcp.timeout
"20 s" String Timeout for all outbound connections. If you should experience problems with connecting to a TaskManager due to a slow network, you should increase this value.
akka.throughput
15 Integer Number of messages that are processed in a batch before returning the thread to the pool. Low values denote a fair scheduling whereas high values can increase the performance at the cost of unfairness.


JVM and Logging Options #

Key Default Type Description
env.hadoop.conf.dir
(none) String Path to hadoop configuration directory. It is required to read HDFS and/or YARN configuration. You can also set it via environment variable.
env.hbase.conf.dir
(none) String Path to hbase configuration directory. It is required to read HBASE configuration. You can also set it via environment variable.
env.java.opts
(none) String Java options to start the JVM of all Flink processes with.
env.java.opts.client
(none) String Java options to start the JVM of the Flink Client with.
env.java.opts.historyserver
(none) String Java options to start the JVM of the HistoryServer with.
env.java.opts.jobmanager
(none) String Java options to start the JVM of the JobManager with.
env.java.opts.taskmanager
(none) String Java options to start the JVM of the TaskManager with.
env.log.dir
(none) String Defines the directory where the Flink logs are saved. It has to be an absolute path. (Defaults to the log directory under Flink’s home)
env.log.max
5 Integer The maximum number of old log files to keep.
env.pid.dir
"/tmp" String Defines the directory where the flink-<host>-<process>.pid files are saved.
env.ssh.opts
(none) String Additional command line options passed to SSH clients when starting or stopping JobManager, TaskManager, and Zookeeper services (start-cluster.sh, stop-cluster.sh, start-zookeeper-quorum.sh, stop-zookeeper-quorum.sh).
env.yarn.conf.dir
(none) String Path to yarn configuration directory. It is required to run flink on YARN. You can also set it via environment variable.

Forwarding Environment Variables #

You can configure environment variables to be set on the JobManager and TaskManager processes started on Yarn.

  • containerized.master.env.: Prefix for passing custom environment variables to Flink’s JobManager process. For example for passing LD_LIBRARY_PATH as an env variable to the JobManager, set containerized.master.env.LD_LIBRARY_PATH: “/usr/lib/native” in the flink-conf.yaml.

  • containerized.taskmanager.env.: Similar to the above, this configuration prefix allows setting custom environment variables for the workers (TaskManagers).



Deprecated Options #

These options relate to parts of Flink that are not actively developed any more. These options may be removed in a future release.

DataSet API Optimizer

Key Default Type Description
compiler.delimited-informat.max-line-samples
10 Integer The maximum number of line samples taken by the compiler for delimited inputs. The samples are used to estimate the number of records. This value can be overridden for a specific input with the input format’s parameters.
compiler.delimited-informat.max-sample-len
2097152 Integer The maximal length of a line sample that the compiler takes for delimited inputs. If the length of a single sample exceeds this value (possible because of misconfiguration of the parser), the sampling aborts. This value can be overridden for a specific input with the input format’s parameters.
compiler.delimited-informat.min-line-samples
2 Integer The minimum number of line samples taken by the compiler for delimited inputs. The samples are used to estimate the number of records. This value can be overridden for a specific input with the input format’s parameters

DataSet API Runtime Algorithms

Key Default Type Description
taskmanager.runtime.hashjoin-bloom-filters
false Boolean Flag to activate/deactivate bloom filters in the hybrid hash join implementation. In cases where the hash join needs to spill to disk (datasets larger than the reserved fraction of memory), these bloom filters can greatly reduce the number of spilled records, at the cost some CPU cycles.
taskmanager.runtime.large-record-handler
false Boolean Whether to use the LargeRecordHandler when spilling. If a record will not fit into the sorting buffer. The record will be spilled on disk and the sorting will continue with only the key. The record itself will be read afterwards when merging.
taskmanager.runtime.max-fan
128 Integer The maximal fan-in for external merge joins and fan-out for spilling hash tables. Limits the number of file handles per operator, but may cause intermediate merging/partitioning, if set too small.
taskmanager.runtime.sort-spilling-threshold
0.8 Float A sort operation starts spilling when this fraction of its memory budget is full.

DataSet File Sinks

Key Default Type Description
fs.output.always-create-directory
false Boolean File writers running with a parallelism larger than one create a directory for the output file path and put the different result files (one per parallel writer task) into that directory. If this option is set to "true", writers with a parallelism of 1 will also create a directory and place a single result file into it. If the option is set to "false", the writer will directly create the file directly at the output path, without creating a containing directory.
fs.overwrite-files
false Boolean Specifies whether file output writers should overwrite existing files by default. Set to "true" to overwrite by default,"false" otherwise.

Back to top