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

Daryn Sharp commented on HDFS-6562:
-----------------------------------

Are you sure this can't be a {{SnapshotAccessControlException}} (which seems 
more appropriate) or tunneled out more cleanly?
{noformat}
+    } catch (IOException e) {
+      // XXX: The client expects an exception in this case,
+      // and we can't subclass this exception due to backward compatibility
+      String msg = e.getMessage();
+      if (msg.contains(" is snapshottable and already has snapshots")) {
{noformat}

> Refactor rename() in FSDirectory
> --------------------------------
>
>                 Key: HDFS-6562
>                 URL: https://issues.apache.org/jira/browse/HDFS-6562
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-6562.000.patch, HDFS-6562.001.patch, 
> HDFS-6562.002.patch, HDFS-6562.003.patch
>
>
> Currently there are two variants of {{rename()}} sitting in {{FSDirectory}}. 
> Both implementation shares quite a bit of common code.
> This jira proposes to clean up these two variants and extract the common code.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to