[
https://issues.apache.org/jira/browse/HDFS-7949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14485578#comment-14485578
]
Zhe Zhang commented on HDFS-7949:
---------------------------------
Thanks for the update Rakesh.
# I think the static method should calculate the consumed space of a striped
block, instead of a file. Something like the below under {{BlockInfoStriped}}:
{code}
public static long spaceConsumed(long numBytes, short dataBlockNum, short
parityBlockNum) {
// 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() - 1) / (dataBlockNum * BLOCK_STRIPED_CELL_SIZE) + 1)
* BLOCK_STRIPED_CELL_SIZE * parityBlockNum + getNumBytes();
}
{code}
The file level logic should still be in {{FSImageLoader}}.
# Javadoc format issue:
{code}
+ * @param f
+ * inode file
+ * @return file size
{code}
> WebImageViewer need support file size calculation with striped blocks
> ---------------------------------------------------------------------
>
> Key: HDFS-7949
> URL: https://issues.apache.org/jira/browse/HDFS-7949
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Hui Zheng
> Assignee: Rakesh R
> Priority: Minor
> Attachments: HDFS-7949-001.patch, HDFS-7949-002.patch
>
>
> The file size calculation should be changed when the blocks of the file are
> striped in WebImageViewer.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)