[
https://issues.apache.org/jira/browse/HDFS-8122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14492300#comment-14492300
]
Uma Maheswara Rao G edited comment on HDFS-8122 at 4/13/15 11:46 AM:
---------------------------------------------------------------------
Thanks Vinay for the patch!
I have looked at the patch. Mostly changes looks good except the following
change. Please return null when getECSchema retunrs null.
{code}
@@ -8133,16 +8133,12 @@ ECInfo getErasureCodingInfo(String src) throws
AccessControlException,
if (isPermissionEnabled) {
dir.checkPathAccess(pc, iip, FsAction.READ);
}
- if (dir.getECPolicy(iip)) {
- // TODO HDFS-8074 and HDFS-7859 : To get from loaded schemas
- Map<String, String> options = new HashMap<String, String>();
- ECSchema defaultSchema = new ECSchema("RS-6-3", "rs", 6, 3, options);
- return new ECInfo(src, defaultSchema);
- }
+ // Get schema set for the zone
+ ECSchema schema = dir.getECSchema(iip);
+ return new ECInfo(src, schema);
} finally {
readUnlock();
}
- return null;
}
{code}
was (Author: umamaheswararao):
Thanks Vinay for the patch!
I have looked at the patch. Mostly changes looks good except the following
change. Please return default schema when no schema exist.
{code}
@@ -8133,16 +8133,12 @@ ECInfo getErasureCodingInfo(String src) throws
AccessControlException,
if (isPermissionEnabled) {
dir.checkPathAccess(pc, iip, FsAction.READ);
}
- if (dir.getECPolicy(iip)) {
- // TODO HDFS-8074 and HDFS-7859 : To get from loaded schemas
- Map<String, String> options = new HashMap<String, String>();
- ECSchema defaultSchema = new ECSchema("RS-6-3", "rs", 6, 3, options);
- return new ECInfo(src, defaultSchema);
- }
+ // Get schema set for the zone
+ ECSchema schema = dir.getECSchema(iip);
+ return new ECInfo(src, schema);
} finally {
readUnlock();
}
- return null;
}
{code}
> Erasure Coding: Support specifying ECSchema during creation of ECZone
> ---------------------------------------------------------------------
>
> Key: HDFS-8122
> URL: https://issues.apache.org/jira/browse/HDFS-8122
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Vinayakumar B
> Assignee: Vinayakumar B
> Attachments: HDFS-8122-01.patch
>
>
> Support specifying the optional schema param during creation of erasurecoding
> zone.
> If not specified default schema should be used.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)