Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to See Log or Sysout in Flink Standalone

Tags:

apache-flink

I run my application in Flink standalone, but can't find it's sysout in console or FLINK_HOME/log.

Does anyone know where I can see my application debug log? And how to know which TMs my application run on?

like image 899
zhangshengxiong Avatar asked Aug 20 '15 03:08

zhangshengxiong


People also ask

Where are Flink logs stored?

log. dir defines the directory where the Flink logs are saved. It has to be an absolute path. Log location: the logs are local, i.e. they are produced in the machine(s) running the JobManager(s) / Taskmanager(s).

Does Flink use Log4j?

Flink ships with the Log4j API bridge, allowing existing applications that work against Log4j1 classes to continue working.


1 Answers

When running a Flink application in standalone mode on a cluster, everything that is logged to system out or system err goes into the respective local log/ directories. So for getting the logs, you have to connect (for example using SSH) to the machines running TaskManagers and retrieve the logs from there.

And how to know which TMs my application run on.

The JobManager web interface (running on host:8081 by default) shows where the tasks are deployed to. When the parallelism == number of slots, the tasks usually run on all machines.

like image 106
Robert Metzger Avatar answered Oct 13 '22 11:10

Robert Metzger