How to interpret Flink log file names

Question

In a standalone Flink cluster, FLINK_HOME/log directory may contains many log files. How do I interpret the file names there?

Answer

Note: This article applies to Flink version 1.8 and later.

Let us take the following file names an example:

flink-root-standalonesession-0-centos.local.log

flink-root-standalonesession-0-centos.local.out

flink-root-taskexecutor-0-centos.local.log

flink-root-taskexecutor-0-centos.local.log.1

flink-root-taskexecutor-0-centos.local.out

flink-root-taskexecutor-0-centos.local.out.1

flink-root-taskexecutor-1-centos.local.log

flink-root-taskexecutor-1-centos.local.out

flink-root-client-centos.local.log

The file names consist of several components:

  • flink: A static prefix
  • root: The user which started the Flink daemon/process
  • standalonesession, taskexecutor, client: The type of the Flink daemon/process
  • 0, 1: The ID of the Flink deamon. It is calculated based on the position of the daemon PID in the PID file which is under tmp by default. The use of IDs allows to start multiple daemons of each type.
  • centos.local: The Fully Qualified Domain Name (FQDN) of the host where the Flink daemon/process runs
  • .log, .out: The suffix indicating logs or stdout
  • .1: The suffix indicating log rotation. For example, the log file with suffix .2 contains older logs than .1

Related Information