Samrat Deb
11/06/2022, 6:19 AMStreamGraph -> JobGraph -> ExecutionGraph -> Physical Execution
Why we need Stream Graph ?
Why not Client make a job graph and directly submit ?
What is the advantage of having StreamGraph ?
2. During Checkpointing , Flink is using Chandy–Lamport algorithm which is efficient because Jobmanager inserts checkpoint-Identifier in the record stream , whenever any operator running TaskManager (taskSlots) encounters this special record it will go in pause state will call the sleeping Thread responsible for checkpointing. This increases performance and entire processing flow doesn't go in halt
But JobGraph has IntermediateDataSet and in physical Execution it has ResultPartition which wraps ResultSubPartition which holds output from operator. How this is handled ? When job is recovered from checkpoint, we can replay data from some specific point but how do we retrieve intermediateData created by operators in the DAG ?
3. Flink has top level SCALA api's for scala developers , scala is a language built on top of java 8 . Why we need StreamingExecutionEnviroment class and other implementation in SCALA also , looking into the code SCALA imports java classes itself only , felt like some wrapper in SCALA form on top of Java classes . What are the benefits it serve having these top level wrappers ? If there is really strong requirement and real use case , i see scala api's don't have all the implementation , felt like its incomplete . Why is it so?
4. When there is a flink job which needs to return some output to client why it uses Accumulator . TaskManagers write the output to accumulator then Jobmanager / Jobmaster reads and then passes it to client . What significance it provides ? Why not taskmanagers directly provide output to the client . this can reduse the workload on jobmanager , I think hadoop allows client result to be delivered by workers (not sure completely). What was the reason to choose this design in flink ? I am sure there would be good reason to choose this flow in flink trying to dig