[
https://issues.apache.org/jira/browse/HDFS-7826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14349683#comment-14349683
]
Jing Zhao commented on HDFS-7826:
---------------------------------
Thanks for the update, Kai. Some comments for the latest patch:
# {{spaceQuotas}} can be renamed to {{spaceConsumed}}, and we can define this
function only for BlockInfoStriped.
# The following calculation may not be accurate if the last data stripe is not
full. Maybe we should change it to "(getNumBytes() / (dataBlockNum * 64KB) + 1)
* 64KB * parityBlockNum + getNumBytes()" ?
{code}
+ @Override
+ public long spaceQuotas() {
+ // In case striped blocks, total usage by this striped blocks should
+ // be the total of data blocks and parity blocks because
+ // `getNumBytes` is the total of actual data block size.
+ return (getNumBytes() * (dataBlockNum + parityBlockNum)) / dataBlockNum;
+ }
{code}
# In {{computeFileSize}}, we should still use {{getNumBytes}} instead of
{{spaceQuotas}}
# Here we can directly call {{getBlocks()}}.
{code}
+ BlockInfo[] blockInfos = isWithStripedBlocks() ? getBlocks() : blocks;
{code}
> Erasure Coding: Update INodeFile quota computation for striped blocks
> ---------------------------------------------------------------------
>
> Key: HDFS-7826
> URL: https://issues.apache.org/jira/browse/HDFS-7826
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Jing Zhao
> Assignee: Kai Sasaki
> Attachments: HDFS-7826.1.patch, HDFS-7826.2.patch
>
>
> Currently INodeFile's quota computation only considers contiguous blocks
> (i.e., {{INodeFile#blocks}}). We need to update it to support striped blocks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)