[
https://issues.apache.org/jira/browse/HDFS-11187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15706153#comment-15706153
]
Wei-Chiu Chuang edited comment on HDFS-11187 at 11/29/16 6:53 PM:
------------------------------------------------------------------
Submit patch 001.
* This patch adds a new field lastPartialChunkChecksum in FinalizedReplica to
store the last partial chunk checksum in-memory.
* It supersedes HDFS-11056, because when FinalizedReplica is converted to Rbw,
LPCC (last partial chunk checksum) of Rbw is referenced in-memory, instead of
loading from disk.
* When a FinalizedReplica object is instantiated via ReplicaBuilder, it loads
LPCC in-memory if it is converted from Rbw or Finalized.
* BlockSender only loads LPCC from disk if LPCC of FinalizedReplica is null.
* If a replica is truncated and finalized, LPCC is loaded from disk.
was (Author: jojochuang):
Submit patch 001.
* This patch adds a new field lastPartialChunkChecksum in FinalizedReplica to
store the last partial chunk checksum in-memory.
* It supersedes HDFS-11156, because when FinalizedReplica is converted to Rbw,
LPCC (last partial chunk checksum) of Rbw is referenced in-memory, instead of
loading from disk.
* When a FinalizedReplica object is instantiated via ReplicaBuilder, it loads
LPCC in-memory if it is converted from Rbw or Finalized.
* BlockSender only loads LPCC from disk if LPCC of FinalizedReplica is null.
* If a replica is truncated and finalized, LPCC is loaded from disk.
> Optimize disk access for last partial chunk checksum of Finalized replica
> -------------------------------------------------------------------------
>
> Key: HDFS-11187
> URL: https://issues.apache.org/jira/browse/HDFS-11187
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: datanode
> Reporter: Wei-Chiu Chuang
> Assignee: Wei-Chiu Chuang
> Attachments: HDFS-11187.001.patch
>
>
> The patch at HDFS-11160 ensures BlockSender reads the correct version of
> metafile when there are concurrent writers.
> However, the implementation is not optimal, because it must always read the
> last partial chunk checksum from disk while holding FsDatasetImpl lock for
> every reader. It is possible to optimize this by keeping an up-to-date
> version of last partial checksum in-memory and reduce disk access.
> I am separating the optimization into a new jira, because maintaining the
> state of in-memory checksum requires a lot more work.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]