You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Jing Zhao (JIRA)" <ji...@apache.org> on 2012/11/15 23:13:12 UTC

[jira] [Created] (HDFS-4196) Support renaming of snapshots

Jing Zhao created HDFS-4196:
-------------------------------

             Summary: Support renaming of snapshots
                 Key: HDFS-4196
                 URL: https://issues.apache.org/jira/browse/HDFS-4196
             Project: Hadoop HDFS
          Issue Type: Sub-task
            Reporter: Jing Zhao
            Assignee: Jing Zhao


Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499285#comment-13499285 ] 

Aaron T. Myers commented on HDFS-4196:
--------------------------------------

Sounds good to me.

+1, the patch looks good to me. I'll commit this to the branch tonight or tomorrow unless someone else beats me to it in the meantime.
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch, HDFS-4196.004.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499194#comment-13499194 ] 

Aaron T. Myers commented on HDFS-4196:
--------------------------------------

The updated patch looks pretty good to me, except that I think we can remove the synchronization from SnapshotManager#createSnapshot as well, and remove the FSDir locking from FSNS#createSnapshot. This also implies that we should probably move the comment you put in SnapshotManager#renameSnapshot up to the class comment of SnapshotManager. I realize that that's unrelated to this particular change, but we might as well make it here I think.

In general I think the locking structure for snapshot operations should be:

# Lock the FSNS lock in FSNS before calling into SnapshotManager methods.
# Rely on the FSDir's internal locking for actual INode* modifications made by SnapshotManager.

How does this sound?
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Jing Zhao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499217#comment-13499217 ] 

Jing Zhao commented on HDFS-4196:
---------------------------------

Aaron, thanks for the comments. For the synchronization from SnapshotManager#createSnapshot, I think we may remove the synchronization in the SnapshotManager, but explicitly acquiring the write lock of FSDirectory seems still necessary to me. Otherwise it is possible that some operation tries to change FSDir between individual FSDir read/write calls within SnapshotManager#createSnapshot (although FSDir#getINode etc. needs to acquire the read or write lock of FSDir). I'm not sure if FSNS locking can prevent this scenario?
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Colin Patrick McCabe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498539#comment-13498539 ] 

Colin Patrick McCabe commented on HDFS-4196:
--------------------------------------------

Sure.  It can wait.  I was just curious what your thinking was about snapshot names.
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HDFS-4196) Support renaming of snapshots

Posted by "Jing Zhao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jing Zhao updated HDFS-4196:
----------------------------

    Attachment: HDFS-4196.001.patch

Initial patch for renaming snapshots.
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499221#comment-13499221 ] 

Aaron T. Myers commented on HDFS-4196:
--------------------------------------

I don't *think* that will be a problem, as nothing that changes the actual INode structures should be grabbing the FSDir lock without also grabbing the FSNS lock. But regardless, it shouldn't hurt to over-lock the FSDir in this situation.

Then how about this for the locking structure of snapshot operations:

# Lock the FSNS lock in FSNS before calling into SnapshotManager methods.
# Lock the FSDir lock in the SnapshotManager methods themselves.

How does this sound?
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HDFS-4196) Support renaming of snapshots

Posted by "Jing Zhao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jing Zhao updated HDFS-4196:
----------------------------

    Attachment: HDFS-4196.002.patch

Update the testcase a little bit.
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498540#comment-13498540 ] 

Aaron T. Myers commented on HDFS-4196:
--------------------------------------

Patch looks pretty good to me. A few little comments:

# It would be good to add a description of when an exception might be thrown in the case of renameSnapshot or createSnapshot. Just adding "{{@throws IOException}}" isn't very helpful.
# In INodeDirectorySnapshottable#renameSnapshot the order of the params is oldName, newName, path, but everywhere else the order of the parameters is path, oldName, newName.
# I recommend you use HdfsConstants.DOT_SNAPSHOT_DIR instead of hard-coding ".snapshot".
# Is it really necessary to synchronize in here? Shouldn't that be taken care of by the fact that we synchronize externally on the FSNS and FSDir locks? For that matter, it's a little odd that we're locking the FSDir lock in FSNS methods. Perhaps we should move the FSDir locking into SnapshotManager? That would be more inline with the rest of the locking structure in the NN.
# Seems like we should be throwing a SnapshotException in the case of rename failure, not generic IOException.
# Nit: TestSnapshotRename#testSnapshotRename could use a little more white space between lines for my taste. I find it a little dense / hard to read.
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Jing Zhao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499283#comment-13499283 ] 

Jing Zhao commented on HDFS-4196:
---------------------------------

Yeah, I left it there because we need to change the visibility of FSDir locking methods when moving FSDir locking from FSNS to SnapshotManager. Also the necessity of FSDir can be revisited since it seems nothing changes the FSDir without grabbing the FSNS lock (as you mentioned). Thus we can revisit/refactor the lock in a separate jira. 
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch, HDFS-4196.004.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498499#comment-13498499 ] 

Suresh Srinivas commented on HDFS-4196:
---------------------------------------

bq. Also, if there a JIRA associated with the TODO, it might be helpful to add a reference to it in the comment.
Generally branch related work TODO: are taken care of during merge time, if not during development.
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500218#comment-13500218 ] 

Hudson commented on HDFS-4196:
------------------------------

Integrated in Hadoop-Hdfs-Snapshots-Branch-build #16 (See [https://builds.apache.org/job/Hadoop-Hdfs-Snapshots-Branch-build/16/])
    HDFS-4196. Support renaming of snapshots. Contributed by Jing Zhao (Revision 1410986)

     Result = FAILURE
szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1410986
Files : 
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-2802.txt
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ClientNamenodeProtocolServerSideTranslatorPB.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ClientNamenodeProtocolTranslatorPB.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOpCodes.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/INodeDirectorySnapshottable.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/ClientNamenodeProtocol.proto
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotTestHelper.java
* /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotRename.java

                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>             Fix For: Snapshot (HDFS-2802)
>
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch, HDFS-4196.004.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HDFS-4196) Support renaming of snapshots

Posted by "Jing Zhao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jing Zhao updated HDFS-4196:
----------------------------

    Attachment: HDFS-4196.004.patch

That sounds good. New patch uploaded.
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch, HDFS-4196.004.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Colin Patrick McCabe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498497#comment-13498497 ] 

Colin Patrick McCabe commented on HDFS-4196:
--------------------------------------------

Hi Jing,

This looks good to me.  One question: can you elaborate on this TODO?

{code}
// TODO: check if the new name is valid. May also need this for
// creationSnapshot
{code}

Also, if there a JIRA associated with the TODO, it might be helpful to add a reference to it in the comment.
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HDFS-4196) Support renaming of snapshots

Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499278#comment-13499278 ] 

Aaron T. Myers commented on HDFS-4196:
--------------------------------------

Hey Jing, this patch looks good to me, except that it doesn't move the FSDir locking out of FSNS and into the SnapshotManager. Do you intend to do that in a separate JIRA? Either way works for me.
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch, HDFS-4196.004.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (HDFS-4196) Support renaming of snapshots

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE resolved HDFS-4196.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: Snapshot (HDFS-2802)
     Hadoop Flags: Reviewed

I have committed this.  Thanks, Jing!
                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>             Fix For: Snapshot (HDFS-2802)
>
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch, HDFS-4196.004.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HDFS-4196) Support renaming of snapshots

Posted by "Jing Zhao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jing Zhao updated HDFS-4196:
----------------------------

    Attachment: HDFS-4196.003.patch

Thanks for the comments! Uploaded a new patch mainly addressing Aaron's comments: 
1. Add javadoc description explaining exception for renameSnapshot and createSnapshot in SnapshotManager.

2. Reorder parameters in INodeDirectorySnapshottable#renameSnapshot.

3. Use HdfsConstants.DOT_SNAPSHOT_DIR to replace .snapshot

4. For rename, seems we only need to acquire FSNamesystem's write lock (FSDirectory#getINode already gets the read lock of FSDirectory). Also add some comments in SnapshotManager.

5. Use SnapshotException to replace IOException in INodeDirectorySnapshottable#renameSnapshot.

6. Make TestSnapshotRename#testSnapshotRename more readable..

Besides, will address the name checking problem in a later jira.


                
> Support renaming of snapshots
> -----------------------------
>
>                 Key: HDFS-4196
>                 URL: https://issues.apache.org/jira/browse/HDFS-4196
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: data-node, name-node
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4196.001.patch, HDFS-4196.002.patch, HDFS-4196.003.patch
>
>
> Add the functionality of renaming an existing snapshot with a given new name.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira