[
https://issues.apache.org/jira/browse/HDFS-8494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14570027#comment-14570027
]
Kai Zheng commented on HDFS-8494:
---------------------------------
Thanks Kai for the hard work. The patch looks good. Some comments:
1. Maybe we could move the exception handling to {{getCellSize}} so the
multiple callings of it can be simplified, and the message can be more relevant.
{code}
+ int cellSize;
+ try {
+ cellSize = getCellSize(stripedBlock);
+ } catch (IOException e) {
+ blockLog
+ .warn("Failed to get the EC zone for the file {} ",
+ stripedBlock.getBlockCollection().getName());
+ return null;
+ }
{code}
2. In the following change: 1) the TODO isn't correct, because cellSize and
ECZone are from XAttr, just remove it; 2) why we use the default constant?
{code}
+ // TODO: Cell size and ECZone info should be restored from
FSImage(HDFS-7859).
size += StripedBlockUtil.spaceConsumedByStripedBlock(p.getBlock()
.getNumBytes(), p.getDataBlockNum(), p.getParityBlockNum(),
- HdfsConstants.BLOCK_STRIPED_CELL_SIZE);
+ HdfsConstants.DEFAULT_BLOCK_STRIPED_CELL_SIZE);
{code}
> Remove hard-coded chunk size in favor of ECZone
> -----------------------------------------------
>
> Key: HDFS-8494
> URL: https://issues.apache.org/jira/browse/HDFS-8494
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Affects Versions: HDFS-7285
> Reporter: Kai Sasaki
> Assignee: Kai Sasaki
> Fix For: HDFS-7285
>
> Attachments: HDFS-8494-HDFS-7285-01.patch
>
>
> It is necessary to remove hard-coded values inside NameNode configured in
> {{HdfsConstants}}. In this JIRA, we can remove {{chunkSize}} gracefully in
> favor of HDFS-8375.
> Because {{cellSize}} is now originally stored only in {{ErasureCodingZone}},
> {{BlockInfoStriped}} can receive {{ErasureCodingZone}} instead of
> {{ECSchema}} when its initialization.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)