[
https://issues.apache.org/jira/browse/HADOOP-14065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855886#comment-15855886
]
Genmao Yu edited comment on HADOOP-14065 at 2/7/17 12:30 PM:
-------------------------------------------------------------
I think L218 has exceeded 80.
{code}
+ long elapsedTime = System.currentTimeMillis()
+ - dirFileStatus.getModificationTime();
{code}
A better style is
{code}
+ long currentTime = System.currentTimeMillis();
+ long elapsedTime = currentTime - dirFileStatus.getModificationTime();
{code}
was (Author: unclegen):
I think L218 has exceeded 80.
```
+ long elapsedTime = System.currentTimeMillis()
+ - dirFileStatus.getModificationTime();
```
A better style is
```
+ long currentTime = System.currentTimeMillis();
+ long elapsedTime = currentTime - dirFileStatus.getModificationTime();
```
> AliyunOSS: oss directory filestatus should use meta time
> --------------------------------------------------------
>
> Key: HADOOP-14065
> URL: https://issues.apache.org/jira/browse/HADOOP-14065
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/oss
> Affects Versions: 3.0.0-alpha2
> Reporter: Fei Hui
> Assignee: Fei Hui
> Attachments: HADOOP-14065.001.patch, HADOOP-14065.patch
>
>
> code in getFileStatus function
> else if (objectRepresentsDirectory(key, meta.getContentLength())) {
> return new FileStatus(0, true, 1, 0, 0, qualifiedPath);
> }
> we should set right modifiedtime
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]