[
https://issues.apache.org/jira/browse/HADOOP-3239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588107#action_12588107
]
Doug Cutting commented on HADOOP-3239:
--------------------------------------
> Is it enough if RPC does not log these?
That sounds like a hack. If some consumers of getFileInfo() don't consider
FileNotFound exceptional, then returning null is the right contract for that
protocol method. As I've said before, using exception handling for normal
control flow is a bad design. The exists() method should be able to return
false via normal control flow.
> exists() calls logs FileNotFoundException in namenode log
> ---------------------------------------------------------
>
> Key: HADOOP-3239
> URL: https://issues.apache.org/jira/browse/HADOOP-3239
> Project: Hadoop Core
> Issue Type: Bug
> Affects Versions: 0.17.0
> Reporter: lohit vijayarenu
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.