hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Zheng (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8441) Erasure Coding: make condition check earlier for setReplication
Date Thu, 21 May 2015 02:17:00 GMT

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

Kai Zheng commented on HDFS-8441:
---------------------------------

Thanks for the update. Could we skip the lock and operation check stuffs since it's private
and could be expected to be only used internally?
{code}
+  private boolean isInECZone(String src) throws IOException {
+    byte[][] pathComponents = FSDirectory.getPathComponentsForReservedPath(src);
+    readLock();
+    try {
+      checkOperation(OperationCategory.READ);
+      src = FSDirectory.resolvePath(src, pathComponents, dir);
+      final INodesInPath iip = dir.getINodesInPath(src, true);
+      return dir.isInECZone(iip);
+    } finally {
+      readUnlock();
+    }
+  }
+
{code}

> Erasure Coding: make condition check earlier for setReplication
> ---------------------------------------------------------------
>
>                 Key: HDFS-8441
>                 URL: https://issues.apache.org/jira/browse/HDFS-8441
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Walter Su
>            Assignee: Walter Su
>         Attachments: HDFS-8441-HDFS-7285.001.patch, HDFS-8441-HDFS-7285.002.patch, HDFS-8441-HDFS-7285.003.patch
>
>
> Changes:
> 1. {{UnsupportedActionException}} is more user-firendly.
> 2. check condition before update storage count
> 3. support create EC file with replication=0



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

Mime
View raw message