hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Zhuge (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-9633) Add more SnapshotDiffReport unit tests
Date Fri, 25 Mar 2016 17:54:25 GMT

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

John Zhuge updated HDFS-9633:
-----------------------------
    Description: 
Add more behavior-based unit tests to verify and document SnapshotDiffReport API behaviors:
* DeleteRecreateSameName: Delete a file, then create a new file of the same
  name. Expect a DELETE and a CREATE entry instead of one MODIFY entry.
* CircularRenames: Rename file "a" to "tmp", rename "b" to "a", then rename
  "tmp" to "b". Expect RENAME(a->b) and RENAME(b->a) entry.

These unit tests will prevent any future NN change from accidentally breaking SnapshotDiffReport
API.

Has anyone built incremental copy/migration tools based on command {{hdfs snapshotDiff}} or
directly on the API?

  was:
SnapshotDiffReport design uses "file path" (instead of "inode ID + file path" as one example)
to represent each diff entry. This can leads to some strange scenarios.

* DeleteRecreate: Delete a file, then create a new file of the same name.
* CircularRenames: Rename file "a" to "tmp", rename "b" to "a", then rename "tmp" to "b".

Add more unit tests to verify these corner cases.

        Summary: Add more SnapshotDiffReport unit tests  (was: Test SnapshotDiffReport file
path corner cases)

> Add more SnapshotDiffReport unit tests
> --------------------------------------
>
>                 Key: HDFS-9633
>                 URL: https://issues.apache.org/jira/browse/HDFS-9633
>             Project: Hadoop HDFS
>          Issue Type: Test
>            Reporter: John Zhuge
>            Assignee: John Zhuge
>            Priority: Minor
>         Attachments: HDFS-9633-001.patch
>
>
> Add more behavior-based unit tests to verify and document SnapshotDiffReport API behaviors:
> * DeleteRecreateSameName: Delete a file, then create a new file of the same
>   name. Expect a DELETE and a CREATE entry instead of one MODIFY entry.
> * CircularRenames: Rename file "a" to "tmp", rename "b" to "a", then rename
>   "tmp" to "b". Expect RENAME(a->b) and RENAME(b->a) entry.
> These unit tests will prevent any future NN change from accidentally breaking SnapshotDiffReport
API.
> Has anyone built incremental copy/migration tools based on command {{hdfs snapshotDiff}}
or directly on the API?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message