Enabling Flink DEBUG logging for SQL Stream Builder
You can review the log text files of the Flink jobs behind SQL Stream Builder (SSB) 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 SSB and Flink processes. You can access the Flink logs using the Flink Dashboard.
- Go to your cluster in Cloudera Manager.
- Select Flink from the list of Services.
- Select Configuration.
- Search for Flink Client Advanced Configuration Snippet (Safety Valve) for flink-conf/log4j.properties configuration.
Add the following parameters to the Safety Valve:
logger.flink.name = org.apache.flink logger.flink.level = DEBUG (or TRACE)
- Click Save Changes.
- Restart the Flink service.
- Restart the SQL Stream Builder service.
Navigate to the YARN Resource Manager to stop the SQL
Stream Builder YARN job.
- Select YARN from the list of Services.
- Select YARN.
The running SSB application is displayed.
- Click the settings represented by three dots.
- Select the stop option.
Navigate to Streaming SQL Console and run any job.
- Select .
Click SQLStreamBuilder Console.
You are redirected to the Streaming SQL Console.
- Execute a SQL query in the SQL window.
Navigate to Flink Dashboard and review the log level for
the running job.
- Select SQL jobs on the main tabs of Streaming SQL Console.
- Select Running jobs.
- Search for the previously submitted job.
Click Flink Dashboard.
You are redirected to the Flink Dashboard page.
- Select Task Managers from the main menu.
- Select the previously submitted job.
- Click Logs.