Hexiaoqiao commented on PR #6710:
URL: https://github.com/apache/hadoop/pull/6710#issuecomment-2044371352

   @haiyang1987 Thanks for your works. At description I see that you mentioned,
   ```
         // Here the locatedBlocks only contains one locatedBlock, at this time 
the offset is 1024 and fileLength is 0,
         // so the targetBlockIdx is -2
         int targetBlockIdx = locatedBlocks.findBlock(offset);
   ```
   This is the root cause here, right ? I am a little confused with it why here 
return -2 which is binary search for collections contains only one element, 
IIUC, it will return -1 for this case. Please correct me if i missed something.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to