Is it okay to troubleshoot myself in here? Yester...
# troubleshooting
m
Is it okay to troubleshoot myself in here? Yesterday, I was declined a job offer for a job that I really wanted, that would allow me to continue working with Apache Flink. Part of the reason that I was declined was that I didn't know enough about the internal workings of Apache Flink and Apache Kafka. I know it more from an application developer perspective. I didn't know the checkpointing algorithm for example. I read through articles explaining it several times over the past year, but since the only problems I ever had with Apache Flink checkpoints were failing checkpoints when there was excessive back pressure, I solved that by more effectively partitioning the data. There was never a need for me to dive more deeply than that. You can say that Apache Flink has worked so well for me, that its abstractions hid the details from me. The job description does indeed say that they would like an Apache Flink PMC member to be the job candidate! Now I want to dive more deeply into learning Apache Flink. I am reading the paper on Asynchronous Barrier Snapshotting, and the Chandy-Lamport algorithm. I checked out the Apache Flink project source code. However, I would like to trace how it happens within the Flink code base. Can somebody please give me a helping hand on where to start? Perhaps using Apache Apache Kafka, where does the checkpoint start there, and how I find the entry points in the task manager and job manager as well? I would really like to trace this out for my own benefit.
g
High Level overview 1. Jobmanager trigger the checkpoint to start 2. Checkpoints are special messages injected in the source called barriers 3. These barriers flow from the source down to the sink 4. Everytime these barriers arrive in the input buffers of a node they block the processing until all the barriers arrive 5. when they arrive 1. data (state) gets flushed on disk and asynchronously data gets uploaded to a dfs. 6. Then all nodes down to the sink receive these barriers they report back to the JobManager.. at these point the checkpoint has been completed A few problems though: 1. since they block when backpressure kicks-in it cause problems, delays and overall the job suffer.. to address this issue we have unaligned checkpoints. instead of waiting for all barriers in the input buffers, they are propagated to the output buffer and in-flight data is also stored. 2. The causes another problem now, that because in-flight data can be stored - the data size can grow more and more.. this is were buffer debloating helps. it makes sure that in the input buffers there is only enough data for processing and not too much data 3. Incremental checkpoints also also typically used in order to help reduce the total size of data that needs to be uploaded on DFS. But still with these improvements there were more problems and Generalized Incremental Checkpoints were introduced. This read should help provide some context https://www.ververica.com/blog/generic-log-based-incremental-checkpoint This is a high level and even with these there are more to say and more problem to solve. But start with these and hope it helps πŸ™‚
πŸ™ 1
m
Thank you!
I remember having trouble with incremental checkpoints because it would cause the system to run out of memory. I think there were too many files. Everything worked perfectly after we changed to full checkpoints.