I was trying to investigate the scenarios in which we perform a seek back of 24 bytes(Header size) while we do a HFileBlock read. In the process I stumbled upon this issue. In order to avoid the seek back problem, what we do is to store the header of the next block in a class named PrefetchedHeader. This prefetched header is stored as a private ThreadLocal object in the FSReaderV2 class. I was wondering why we would be needing a ThreadLocalc when each FSReader object has its own PrefetchedHeader object and moreover if its private. Can anybody familiar with this part of the code tell me what was the design decision that was taken at that time?
Thanks, Manukranth Kolloju