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

George Huang commented on HDFS-11912:
-------------------------------------

10.
  /** Delete an existing test directory */
  private void deleteTestDir() throws IOException {
    if (snapshottableDirectories.size() > 0) {
      int index = GENERATOR.nextInt(snapshottableDirectories.size());
      Path deleteDir = snapshottableDirectories.get(index);

      if (!pathToSnapshotsMap.containsKey(deleteDir)) {
           .. .. // deletion
      }
deleteTestDir and renameTestDir have the above model where the deletion or 
rename task is only performed when directory does not exist in 
pathToSnapshotsMap. But, pathToSnapshotsMap will always have this home dir 
after the first snapshot created. So, deletions and renames will always be 
skipped after the first snapshot taken?

=> See response above. pathTosnapshotsMap will have multile entries as 
snapshottableDirectory will have multiple entries (size() > 0) as explained 
earlier. This was verified by multiple local runs.

Many thanks!

> Add a snapshot unit test with randomized file IO operations
> -----------------------------------------------------------
>
>                 Key: HDFS-11912
>                 URL: https://issues.apache.org/jira/browse/HDFS-11912
>             Project: Hadoop HDFS
>          Issue Type: Test
>          Components: hdfs
>            Reporter: George Huang
>            Priority: Minor
>         Attachments: HDFS-11912.001.patch
>
>
> Adding a snapshot unit test with randomized file IO operations.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to