Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.17.0
-
None
-
None
-
Incompatible change, Reviewed
-
getFileInfo returns null for File not found instead of throwing FileNotFoundException
Description
exists() was modified to invoke getFileStatus() internally. But getFileStatus() throws FileNotFoundException for files which does not exists and this is logged in RPC$Server for each exists() call. One way to get rid of these messages is at the Name Node, catch FileNotFoundException and return null. In this case, RPC would not log it in namenode log. But at the client end we might have to check for null on all calls of getFileStatus(). Other option at client end is to construct FileNotFoundException() when getFileInfo() returns null.