Prerequisites
- Java 8 or higher installed on all nodes.
- A recent Flink distribution downloaded and unpacked from the Apache Flink downloads page.
- For multi-node clusters: passwordless SSH access between nodes sharing the same Flink directory structure.
Starting a local session cluster
The fastest way to get started is a single-machine session cluster:Start the cluster
Deployment modes
Session mode
In Session mode the cluster runs independently from any individual job. You submit multiple jobs to the same running cluster:Application mode
In Application mode, one JobManager is dedicated to a single application. The application’smain() method runs on the JobManager itself.
Start the application-mode JobManager
lib/:
Distributed cluster setup
For a multi-machine cluster, configure which hosts run which components.Configuring masters and workers
Editconf/masters to list JobManager hosts:
conf/workers to list TaskManager hosts:
jobmanager.rpc.address in conf/config.yaml to the master hostname:
Local multi-process example
To simulate a cluster on one machine (useful for testing), listlocalhost multiple times in conf/workers:
Managing components individually
You can start and stop individual components without usingstart-cluster.sh:
Dynamic properties
The component scripts accept dynamic configuration overrides via-D:
conf/config.yaml.
User JARs and classpath
| Mode | User JAR recognition |
|---|---|
| Session mode | JAR file specified in the flink run command |
| Application mode | JAR specified in the startup command, plus all JARs in $FLINK_HOME/usrlib/ |
Setting up high availability
Standalone HA requires ZooKeeper. Configure it inconf/config.yaml and list multiple JobManagers in conf/masters:
conf/masters:
Logs and debugging
Log files are written to thelogs/ directory. Each service writes a .log file. Log files rotate on each service restart; older runs have a numeric suffix.
To enable DEBUG logging, edit conf/log4j.properties:

