|
> I think you mean open and isDir can be replaced.
FileSystem#isDirectory() is implemented in terms of FileSystem#getFileInfo(), so removing the DistributedFileSystem implementation should work fine, no? And, yes, open() is still called. It's implementation on the NameNode is identical to getBlockLocations, except for the update of a counter. So, if that counter is not critical, open() could also be removed. Being able to distinguish between open counts and getLocation counts is not necessary.
From that point getting rid of the open rpc call seems reasonable. The only advantage the open call has (and we don't take advantage of this) is to have only open SO my vote is +1 2470_20080310.patch: deprecated of isDir(...) and open(...) in NameNode and ClientProtocol and removed the use of them. Since there are already a lot of tests for testing the functionality, no additional tests are added.
I would prefer to simply remove the methods open & isDir in ClientProtocol, Namenode, and FSNameSystem. Since they are not user-facing public APIs, we do not need to deprecate them first.
2470_20080312.patch: removed open & isDir. Also removed getContentLength which is already deprecated.
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12377714/2470_20080312.patch against trunk revision 619744. @author +1. The patch does not contain any @author tags. tests included +1. The patch appears to include 3 new or modified tests. javadoc +1. The javadoc tool did not generate any warning messages. javac -1. The applied patch generated 600 javac compiler warnings (more than the trunk's current 598 warnings). release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1955/testReport/ This message is automatically generated. The new javac warnings are due to the newly deprecated DFSClient.isDirectory(String).
I just committed this. Thanks, Nicholas!
Integrated in Hadoop-trunk #428 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/428/
Noted as incompatible in changes.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I think you mean open and isDir can be replaced. Currently, open and isDir are called in a few places but they can be obviously replaced by getBlockLocations and getFileInfo.