[ http://issues.apache.org/jira/browse/HADOOP-281?page=comments#action_12422504 ] Konstantin Shvachko commented on HADOOP-281: --------------------------------------------
We can still return the correct boolean value to preserve public interface, but throw an exception at the same time. The prototype is in place. Or we can use a usual "trick" of deprecating the old mkdirs() , and define a new one that is void. Which mkdirs() is called by applications? I believe mkdirs() is public since it is a part of the ClientProtocol interface. There are other mkdirs() further in the NameNode data structure implementation. Those should not be and are not called by anything outside the dfs project. These mkdirs() don't need to be public at all, imo. > dfs.FSDirectory.mkdirs can create sub-directories of a file! > ------------------------------------------------------------ > > Key: HADOOP-281 > URL: http://issues.apache.org/jira/browse/HADOOP-281 > Project: Hadoop > Issue Type: Bug > Affects Versions: 0.3.1 > Reporter: Sameer Paranjpye > Fix For: 0.5.0 > > Attachments: addNode.patch, mkdirs.patch, TestDFSMkdirs.java > > > dfs.FSDirectory.mkdirs will merrily adds children to a directory tree node > without checking whether it represents a directory. So it is possible to > create a subdirectories of a file. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
