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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha4
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      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-002.patch
          2 kB
          Hongyuan Li
        2. HADOOP-14431-001.patch
          2 kB
          Hongyuan Li

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: