Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14431

ModifyTime of FileStatus returned by SFTPFileSystem's getFileStatus method is wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha4
    • fs
    • None
    • Reviewed

    Description

      getFileStatus(ChannelSftp channel, LsEntry sftpFile, Path parentPath)
      get FileStatus as code below:

        private FileStatus getFileStatus(ChannelSftp channel, LsEntry sftpFile,
            Path parentPath) throws IOException {
      
          SftpATTRS attr = sftpFile.getAttrs();
         ……
          long modTime = attr.getMTime() * 1000; // convert to milliseconds
         ……
        }
      

      ,which attr.getMTime return int, which meansthe modTime is wrong

      Attachments

        1. HADOOP-14431-001.patch
          2 kB
          Hongyuan Li
        2. HADOOP-14431-002.patch
          2 kB
          Hongyuan Li

        Activity

          People

            Hongyuan Li Hongyuan Li
            Hongyuan Li Hongyuan Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: