hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Íñigo Goiri (JIRA) <j...@apache.org>
Subject [jira] [Commented] (HDFS-13386) RBF: Wrong date information in list file(-ls) result
Date Mon, 09 Apr 2018 17:06:00 GMT

    [ https://issues.apache.org/jira/browse/HDFS-13386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16430879#comment-16430879
] 

Íñigo Goiri commented on HDFS-13386:
------------------------------------

The unit test seems to run successfully in less than 0.2 seconds so we are good here.
Couple minor style comments to  [^HDFS-13386-004.patch]:
* Use Time.now() for {{beforeCreatingTIme}}
* Capitalization typo in {{beforeCreatingTIme}}
* {{requiredPaths}} should be named something like {{pathModTime}}.
* I'm not sure is needed to do a listStatus and a getPartialListing, shouldn't we be able
to check the dates directly?
{code}
190	    // Match date/time for each path returned
191	    for(HdfsFileStatus f : listing.getPartialListing()) {
193	      String currentFile = f.getFullPath(new Path("/")).getName();
194	      long modTime = f.getModificationTime();
196	
197	      assertEquals(currentFile, fileName);
198	      assertTrue(modTime > t0);
199	    }
{code}
We could also check that the number of entries is the expected.
Right now it looks a little bit complicated for what we want to check which is basically that
the time of the new files/folders/mount table entries is bigger than the initial time.
We could even just check that is small that t0 + 10 seconds say and put a timeout of 10 seconds.

> RBF: Wrong date information in list file(-ls) result
> ----------------------------------------------------
>
>                 Key: HDFS-13386
>                 URL: https://issues.apache.org/jira/browse/HDFS-13386
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Dibyendu Karmakar
>            Assignee: Dibyendu Karmakar
>            Priority: Minor
>         Attachments: HDFS-13386-002.patch, HDFS-13386-003.patch, HDFS-13386-004.patch,
HDFS-13386.000.patch, HDFS-13386.001.patch, image-2018-04-03-11-59-51-623.png
>
>
> # hdfs dfs -ls 
> !image-2018-04-03-11-59-51-623.png!
> this is happening because getMountPointDates is not implemented 
> {code:java}
> private Map<String, Long> getMountPointDates(String path) {
> Map<String, Long> ret = new TreeMap<>();
> // TODO add when we have a Mount Table
> return ret;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message