You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Jiandan Yang (JIRA)" <ji...@apache.org> on 2018/10/11 07:07:00 UTC
[jira] [Created] (HDFS-13984) getFileInfo of libhdfs call
NameNode#getFileStatus twice
Jiandan Yang created HDFS-13984:
------------------------------------
Summary: 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
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: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org