[ 
https://issues.apache.org/jira/browse/HDFS-4839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13848453#comment-13848453
 ] 

Chris Nauroth commented on HDFS-4839:
-------------------------------------

bq. Irrespective of how this is done, it changes the behaviour of local file:// 
operations when things fail.

>From a compatibility perspective, I think this means we'd have to be careful 
>that the change doesn't start throwing {{IOException}} in cases that used to 
>return {{false}}.  As you said, just logging the information would be a way to 
>handle this.  I think this meets our goal to provide enough information for 
>diagnosis.  (I don't think anyone is proposing that we propagate the native 
>{{errno}} all the way out to the caller of {{FileSystem#mkdirs}}.)

bq. In which case, this could maybe be implemented with reflection today

Sorry, I didn't follow this part.  Could you explain?  I've been thinking of 
this change as calling C {{mkdir}}, then getting the {{errno}}, and then 
pushing that back up to the Java layer for logging.  How can reflection help 
with this?  Is the {{errno}} hidden somewhere in the JDK classes, and you're 
proposing that we peek at it with reflection?

Thanks!


> add NativeIO#mkdirs, that provides an error message on failure
> --------------------------------------------------------------
>
>                 Key: HDFS-4839
>                 URL: https://issues.apache.org/jira/browse/HDFS-4839
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 2.1.0-beta
>            Reporter: Colin Patrick McCabe
>            Priority: Minor
>
> It would be nice to have a variant of mkdirs that provided an error message 
> explaining why it failed.  This would make it easier to debug certain failing 
> unit tests that rely on mkdir / mkdirs-- the ChecksumFilesystem tests, for 
> example.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to