cchung100m commented on PR #11435:
URL: https://github.com/apache/ozone/pull/11435#issuecomment-6358431647

   HI @peterxcli 
   
   Thanks for the suggestion and the diff! I agree that the null check was only 
needed because the retry function `RpcClient` swallowed the `IOException` and 
returned null, so I've applied your refactor:
   
   - Changed the retry function type from `Function<OmKeyInfo, OmKeyInfo>` to 
`CheckedFunction<OmKeyInfo, OmKeyInfo, IOException>` in `KeyInputStream`, 
`RpcClient`, and `TestBlockTokens`.
   - Moved the `IOException` catch and error log into the retry lambda in 
`KeyInputStream#createSteams`. It still returns null on a failed lookup, which 
`BlockExtenedInputStrem#refreshBlockInfo` already handles.


-- 
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