Configure a deployment

Updated at:

Configure a deployment's settings before starting a job.

Prerequisites

Before you begin, make sure that you have:

Configure deployment settings

  1. Log on to the Realtime Compute for Apache Flink console.

  2. Find the workspace and click Console in the Actions column.

  3. In the left-side navigation pane, choose O&M > Deployments. On the Deployments page, click the deployment name.

  4. On the Configuration tab, find the section to edit and click Edit in its upper-right corner.

  5. Modify the settings in the following sections:

  6. Click Save.

Basic

The following parameters are available in the Basic section. Availability depends on the deployment type.

ParameterDeployment typeDescription
Engine VersionSQL, JAR, PythonThe Flink engine version to use.
Additional DependenciesSQL, JAR, PythonAdditional dependency files for the deployment.
DescriptionSQL, JAR, PythonA text description of the deployment.
LabelSQL, JAR, PythonLabels for organizing and identifying the deployment.
JAR UriJARThe URI of the JAR file to run.
Entry Point ClassJARThe fully qualified name of the main class.
Entry Point Main ArgumentsJAR, PythonArguments passed to the entry point.
Kerberos NameJAR, PythonThe Kerberos principal name for authentication.
Python UriPythonThe URI of the Python file to run.
Entry ModulePythonThe Python module to use as the entry point.
Python LibrariesPythonAdditional Python library dependencies.
Python ArchivesPythonArchive files required by the Python job.

For parameter details, see Develop an SQL draft (SQL deployments) or Deploy a job (JAR and Python deployments).

Note

For SQL deployments, clicking Edit in the Basic section displays a confirmation message. Click OK to confirm, and you are redirected to the SQL Editor page to edit and redeploy the deployment.

Parameters

Checkpointing

ParameterDescription
Checkpointing IntervalHow often a checkpoint is generated. If not set, checkpointing is disabled.
Checkpointing Timeout timeThe maximum time allowed for a checkpoint to complete. Default: 10 minutes. If a checkpoint does not complete within this time, it fails.
Min Interval Between CheckpointsThe minimum gap between two consecutive checkpoints. When the maximum checkpoint parallelism is 1, this defines the minimum interval between checkpoints.

State expiration

ParameterDescription
State Expiration TimeThe time-to-live (TTL) of a deployment's state data. Default: 36 h. State data not accessed within this period is automatically removed from the state backend, freeing up memory.
Important

The default TTL of 36 hours is based on Alibaba Cloud best practices and differs from Apache Flink's default of 0, which means state data never expires. Set the TTL based on your data access patterns to balance computation accuracy and memory usage.

How state data works:

When data first enters the system, it is stored in the state backend. If data with the same primary key arrives again, Flink computes against the stored state and updates the last-access time. If the data is not accessed again within the TTL, Flink treats it as expired and removes it. Reducing TTL lowers memory consumption and improves system stability, but may affect accuracy for late-arriving data.

Restart policy

Flink controls job restart behavior through two independent mechanisms: the job restart policy and the task failure recovery policy.

Job restart policy

The job restart policy determines whether and how the job restarts after a failure.

Default behavior (when no policy is explicitly set):

  • If checkpointing is enabled: the job restarts using Fixed Delay.

  • If checkpointing is disabled: the job does not restart.

Override the default by selecting one of these policies:

PolicyDescriptionAdditional parameters
No RestartsThe job does not restart if it fails.
Fixed Delay (default)The job restarts at a fixed interval after each failure.Number of Restart Attempts, Delay Between Restart Attempts
Failure RateThe job restarts as long as the failure rate stays below a defined threshold.Failure Rate Interval, Max Failures per Interval, Delay Between Restart Attempts

Task failure recovery policy

The task failure recovery policy determines which tasks are restarted when a failure occurs. Configure it by setting jobmanager.execution.failover-strategy in the Other Configuration field.

ValueBehavior
fullRestarts the entire job when any task fails.
region (default)Restarts only the minimum set of tasks needed to recover the failed pipelined region, leaving other regions unaffected.
Note

When failover-strategy is set to region, different regions may have different start timestamps after recovery — this is expected behavior.

For more information, see Task Failure Recovery in the Apache Flink documentation.

Other configuration

Use Other Configuration to set additional Flink parameters as key-value pairs, for example:

akka.ask.timeout: 10
jobmanager.execution.failover-strategy: full
Note

GC type settings (such as -XX:+UseG1GC) cannot be modified via env.java.opts.

Logging

ParameterDescription
Log ArchivingWhether to archive logs. Enabled by default. When enabled, historical deployment logs are available on the Logs tab. In VVR 3.X, only VVR 3.0.7 and later support log archiving. In VVR 4.X, only VVR 4.0.11 and later support log archiving. For more information, see View the logs of a historical deployment.
Log Archives ExpiresHow long archived logs are retained. Default: 7 days.
Root Log LevelThe minimum severity level to log. Levels in ascending order of urgency: TRACE, DEBUG, INFO, WARN, ERROR.
Log LevelsCustom log name and level pairs for specific loggers.
Logging ProfileThe log template to use. Select default or Custom Template. Custom Template lets you export logs to external storage. For more information, see Configure parameters to export logs of a deployment.

References