[
https://issues.apache.org/jira/browse/HADOOP-1656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519451
]
dhruba borthakur commented on HADOOP-1656:
------------------------------------------
The blocksize is a heuristic that HDFS uses to chunk up a file. HDFS makes
every effort to chunk a file where most chunks are of size specified by
blocksize. This means HDFS can still create blocks of a size other than the
specified blocksize if it needs to (maybe in the case of appends). Another
requirement is that if an application specified the blocksize while creating
the file, it should have the ability to retrieve that *precise* value by
invoking getBlockSize(). Given the above definition and requirements, the above
proposal 1-3 might not fit the needs. I do not see any other way of achieving
this other than persisting the blocksize attribute in the inode.
> HDFS does not record the blocksize for a file
> ---------------------------------------------
>
> Key: HADOOP-1656
> URL: https://issues.apache.org/jira/browse/HADOOP-1656
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Affects Versions: 0.13.0
> Reporter: Sameer Paranjpye
> Assignee: dhruba borthakur
> Fix For: 0.15.0
>
> Attachments: blockSize2.patch
>
>
> The blocksize that a file is created with is not recorded by the Namenode. It
> is used only by the client when it writes the file. Invoking 'getBlockSize'
> merely returns the size of the first block. The Namenode should record the
> blocksize.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.