Enabling Flink DEBUG logging

You can review the log text files of the Flink jobs when an error is detected during the processes. When you set the log level of Flink to DEBUG, you can easily trace the log file for errors.

A log file is created for every Flink process that contains messages for the different events happening in the given process. You can use these log files to solve the errors and problems that can occur during Flink processes. You can access the Flink logs using the Flink Dashboard.

  1. Navigate to the Configuration page in Cloudera Manager.
    1. Go to your cluster in Cloudera Manager.
    2. Select Flink from the list of services.
    3. Click Configuration.
  2. Search for Flink Client Advanced Configuration Snippet (Safety Valve) for flink-conf/log4j.properties configuration.
  3. Add the following parameters to the Safety Valve:
    logger.flink.name = org.apache.flink
    logger.flink.level = DEBUG
  4. Click Save Changes.
  5. Restart the Flink service with Action > Restart.
  6. Access the YARN Resource Manager user interface to stop the YARN job of the Flink application.
    1. Go back to your cluster in Cloudera Manager.
    2. Select YARN from the list of Services.
    3. Select Applications.
      You are redirected to the Resource Manager page, and the running Flink applications are displayed.
  7. Select the application you need to stop.
  8. Click Settings.
  9. Select Kill application.
  10. Navigate to Flink Dashboard and review the log level for the running job.
    1. Go back to Cloudera Manager.
    2. Select Flink from the list of services.
    3. Click Flink Dashboard.
  11. Select Task Managers from the main menu.
  12. Select the previously submitted job.
  13. Click Logs.