hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jing Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8937) Fix the exception when set replication to Erasure Coding files
Date Tue, 01 Sep 2015 20:54:45 GMT

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

Jing Zhao commented on HDFS-8937:
---------------------------------

Thanks for working on this, [~demongaorui]! Here are the comments for the patch:
# We should return null if the file is striped. So I guess the change can look like:
{code}
@@ -406,14 +406,11 @@ static INodeDirectory unprotectedSetQuota(
 
     final INodesInPath iip = fsd.getINodesInPath4Write(src, true);
     final INode inode = iip.getLastINode();
-    if (inode == null || !inode.isFile()) {
+    if (inode == null || !inode.isFile() || inode.asFile().isStriped()) {
+      // TODO we do not support replication on stripe layout files yet
       return null;
     }
     INodeFile file = inode.asFile();
-    if (file.isStriped()) {
-      throw new UnsupportedActionException(
-          "Cannot set replication to a file with striped blocks");
-    }
 
     final short oldBR = file.getPreferredBlockReplication();
{code}
# Actually we do not need to add the new test. Instead, we need to update {{TestErasureCodingZones#testReplication}}
to make sure {{setReplication}} is a no-op for a striped file.

> Fix the exception when set replication to Erasure Coding files
> --------------------------------------------------------------
>
>                 Key: HDFS-8937
>                 URL: https://issues.apache.org/jira/browse/HDFS-8937
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: GAO Rui
>            Assignee: GAO Rui
>         Attachments: HDFS-8937-HDFS-7285.00.patch
>
>
> Setting replication to an EC file caused exception.  We should simply ignore the request,
just like what we're currently doing for a setReplication request against a directory. 



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

Mime
View raw message