[
https://issues.apache.org/jira/browse/HDFS-13984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16673339#comment-16673339
]
John Zhuge commented on HDFS-13984:
-----------------------------------
[~yangjiandan]Thanks for the contribution!
Could you please take a look at the 2 unit test failures? And the 4 compiler
warnings in
[https://builds.apache.org/job/PreCommit-HDFS-Build/25415/artifact/out/diff-compile-cc-hadoop-hdfs-project_hadoop-hdfs-native-client.txt?|https://builds.apache.org/job/PreCommit-HDFS-Build/25415/artifact/out/diff-compile-cc-hadoop-hdfs-project_hadoop-hdfs-native-client.txt]
> getFileInfo of libhdfs call NameNode#getFileStatus twice
> --------------------------------------------------------
>
> Key: HDFS-13984
> URL: https://issues.apache.org/jira/browse/HDFS-13984
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: libhdfs
> Reporter: Jiandan Yang
> Assignee: Jiandan Yang
> Priority: Major
> Attachments: HDFS-13984.001.patch, HDFS-13984.002.patch
>
>
> getFileInfo in hdfs.c calls *FileSystem#exists* first, then calls
> *FileSystem#getFileStatus*.
> *FileSystem#exists* also call *FileSystem#getFileStatus*, just as follows:
> {code:java}
> public boolean exists(Path f) throws IOException {
> try {
> return getFileStatus(f) != null;
> } catch (FileNotFoundException e) {
> return false;
> }
> }
> {code}
> and finally this leads to call NameNodeRpcServer#getFileInfo twice.
> Actually we can implement by calling once.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]