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] [Updated] (HADOOP-14431) the modifyTime of FileStatus got by SFTPFileSystem's getFileStatus method is wrong
Date Wed, 17 May 2017 13:50:04 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-14431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hongyuan Li updated HADOOP-14431:
---------------------------------
    Description: 
{{getFileStatus(ChannelSftp channel, LsEntry sftpFile, Path parentPath)}} 

get FileStatus as code below:

{code}
  private FileStatus getFileStatus(ChannelSftp channel, LsEntry sftpFile,
      Path parentPath) throws IOException {

    SftpATTRS attr = sftpFile.getAttrs();
   ……
    long modTime = attr.getMTime() * 1000; // convert to milliseconds
   ……
  }
<code}
,which {{attr.getMTime}} return int, which meansthe modTime is wrong

  was:
{{getFileStatus(ChannelSftp channel, LsEntry sftpFile,
      Path parentPath)}} 

get FileStatus as code below:

{code}
  private FileStatus getFileStatus(ChannelSftp channel, LsEntry sftpFile,
      Path parentPath) throws IOException {

    SftpATTRS attr = sftpFile.getAttrs();
   ……
    long modTime = attr.getMTime() * 1000; // convert to milliseconds
   ……
  }
<code},which {{attr.getMTime}} return int, which meansthe modTime is wrong


> the modifyTime of FileStatus got by SFTPFileSystem's getFileStatus method is wrong
> ----------------------------------------------------------------------------------
>
>                 Key: HADOOP-14431
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14431
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>            Reporter: Hongyuan Li
>            Assignee: Hongyuan Li
>            Priority: Trivial
>         Attachments: HADOOP-14431-001.patch
>
>
> {{getFileStatus(ChannelSftp channel, LsEntry sftpFile, Path parentPath)}} 
> get FileStatus as code below:
> {code}
>   private FileStatus getFileStatus(ChannelSftp channel, LsEntry sftpFile,
>       Path parentPath) throws IOException {
>     SftpATTRS attr = sftpFile.getAttrs();
>    ……
>     long modTime = attr.getMTime() * 1000; // convert to milliseconds
>    ……
>   }
> <code}
> ,which {{attr.getMTime}} return int, which meansthe modTime is wrong



--
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