Support Questions

Find answers, ask questions, and share your expertise

Kudu source code



Is anybody can help understanding the source code of kudu. See file where there are errors mentioned.

kudu src kudu cfile

Need to understand how we can troubleshoot issues related to file i.e.Block related issue ( failed to init CFileReader ).

If somebody can share the functional flow for this code would be great.









Rising Star

There are some design docs you might find helpful, such as docs/design-docs/

But to be honest, this forum isn't really the best venue in which to learn how the code works. Instead I recommend engaging with the upstream Apache Kudu community. Slack is probably the ideal medium for this conversation. 


Thanks Adar,

Need some clarification because looking into Design doc doesn't help much. 

i.e. For kudu file issue troubelshooting i try to look into


Status CFileReader::Init() {

Substitute("failed to init CFileReader for block $0",block_id().ToString()));


We got issue in cluster org.apache.kudu.client.NonRecoverableException: failed to init CFileReader for block : bad CFile header magic: I\x19[\xd6(!xE\xe1\xe0n\x8f


Now how i can work as temp solution . If i can get clarity what this code does and how i can debug this and patch for alternate solution, that gone help me.

So if i will be aware about this code then i can troubleshoot lot of problem.


That is the objective of understanding the code.





Rising Star

That sounds like some of your on-disk data was corrupted. Have you checked whether the machine in question suffered hardware errors, especially to disks?


Either way, if your tables all have a replication factor of at least 3, and all tablets are fully replicated (apart from this downed tserver), you can reformat the tserver and let Kudu rereplicate the affected data elsewhere.


Hello Adar,

Formatting is not the actual solution. In place of formatting i can delete. so similar way there are other problems i.e.TABLET_DATA_COPYING  and 

Tablet Copy: Downloading WAL segment with seq

I just see this as peer as Learner and the tablet data was not copying and stuck in TABLET_DATA_COPYING. Also see the Error .

IO error: Unable to initialize catalog manager: Failed to initialize sys tables async: Could not remove renamed recovery dir


I use the temp option to change the leader but this is not solution to correct it. As still the replica is in learner state not follower.

So need help for similar kind of issues, how can resolve it by looking into code.

It also through the error --> Tablet copy aborted.

I saw inside code and found that error in tablet copy client file. 

Kudu Developer will be definitely aware how to resolve these kind of issues as they are fully aware about code flow where it stuck.


So need that kind of help for the issue.





Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.