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

Ivan Mitic commented on HDFS-4839:
----------------------------------

Folks, I am sorry to say this, but my vote is not to go in this direction. I 
see NativeIO as means to implement the functionality that simply cannot be 
achieved in Java, in a cross-platform friendly way. Java already made a trade 
off not to return the error code from mkdirs/rename and similar APIs, as it 
would be hard to achieve this in a cross-platform consistent way. I would argue 
that error code for debugging unittests is not a strong enough case to 
introduce this discrepancy between platforms. There will be many other places 
where by going down on the stack we can gain greater control/flexibility, let's 
just do this when it is absolutely needed.

I saw that we already introduced rename for similar reasons. My initial thought 
when I saw a Jira to implement the same functionality on Windows was, why not 
just remove the native implementation altogether :)

Feel free to comment with your views. I am just sharing my honest opinion.
                
> 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.0.5-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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to