[
https://issues.apache.org/jira/browse/HDFS-8684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yi Liu updated HDFS-8684:
-------------------------
Attachment: HDFS-8684-HDFS-7285.002.patch
Thanks Vinay and Walter for the comments.
{quote}
This seems reasonable,. In fact, before coming to this line of code, this check
is already done. And this whole check itself can be removed.
Before calling /processOverReplicatedBlock itself live vs expected replicas
count check is done. Expected is checked against actual number of blocks itself.
{quote}
Yes, we can remove it.
Vinay:{quote}
As mentioned already in the comment there, this part is used to update the
quota. In that case need to consider parity blocks too. Infact, this part of
the code is not reachable. If we check the call heirarchy, its only called from
a snapshot method and only if replication changed, but for striped block this
is not possible.
{quote}
Walter:
{quote}
It's not only used for quota. The comment is incorrect. You can compare how
contiguous block do it.
{quote}
Only if {{usePreferredBlockSize4LastUcBlock}} is true, we can say It's used to
update the quota, but {{computeFileSize}} itself only counts file size, not
include redundant replicas. I agree it's not reachable for updating the quota
of striped block, and agree that the comment is not correct. How about removing
the comment? It will not affect updating the quota of striped block since it's
not reachable, and from the code logic itself, we should do this fix.
{quote}
The code is ugly. It's my fault. Could you exchange the if-else statement for
me taking this opportunity? I'll very appreciate.
{quote}
Sure, do it in the update patch
> Erasure Coding: fix some block number calculation for striped block
> -------------------------------------------------------------------
>
> Key: HDFS-8684
> URL: https://issues.apache.org/jira/browse/HDFS-8684
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Yi Liu
> Assignee: Yi Liu
> Attachments: HDFS-8684-HDFS-7285.001.patch,
> HDFS-8684-HDFS-7285.002.patch
>
>
> in INodeFile#computeFileSize, the file size calucation for underconstruction
> striped block is incorrect.
> in BlockManager#chooseExcessReplicasStriped, the {{if (nonExcess.size() <=
> groupSize) {}} is incorrect.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)