hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hongyuan Li (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-14469) the listStatus method of FTPFileSystem should ignore the path "." and ".."
Date Wed, 31 May 2017 07:09:04 GMT
Hongyuan Li created HADOOP-14469:
------------------------------------

             Summary: the listStatus method of FTPFileSystem should ignore the path "."  and
".."
                 Key: HADOOP-14469
                 URL: https://issues.apache.org/jira/browse/HADOOP-14469
             Project: Hadoop Common
          Issue Type: Bug
            Reporter: Hongyuan Li
            Assignee: Hongyuan Li


for some ftpsystems, liststatus method will return new Path(".") and new Path(".."), thus
causing list op looping.We can see in code below:

{code}
  private FileStatus[] listStatus(FTPClient client, Path file)
      throws IOException {
    ……
    FileStatus[] fileStats = new FileStatus[ftpFiles.length];
    for (int i = 0; i < ftpFiles.length; i++) {
      fileStats[i] = getFileStatus(ftpFiles[i], absolute);
    }
    return fileStats;
  }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message