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 about 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. Go to your cluster in Cloudera Manager.
  2. Select Flink from the list of Services.
  3. Select Configuration.
  4. Search for Flink Client Advanced Configuration Snippet (Safety Valve) for flink-conf/log4j.properties configuration.
  5. Add the following parameters to the Safety Valve:
    logger.flink.name = org.apache.flink
    logger.flink.level = DEBUG (or TRACE)
  6. Click Save Changes.
  7. Restart the Flink service.
  8. Restart the SQL Stream Builder service.
  9. Navigate to the YARN Resource Manager to stop the SQL Stream Builder YARN job.
    1. Select YARN from the list of Services.
    2. Select YARN.
    3. Select Applications.
      The running Flink applications are displayed.
  10. Select the application you need to stop.
  11. Click Settings.
  12. Select Kill application.
  13. Navigate to Flink Dashboard and review the log level for the running job.
    1. Go to back to Cloudera Manager.
    2. Select Flink from the list of services.
    3. Click Flink Dashboard.
  14. Select Task Managers from the main menu.
  15. Select the previously submitted job.
  16. Click Logs.