hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9442) Move block replication logic from BlockManager to a new class ReplicationManager
Date Thu, 03 Dec 2015 18:47:11 GMT

    [ https://issues.apache.org/jira/browse/HDFS-9442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15038291#comment-15038291

Haohui Mai commented on HDFS-9442:

The patch looks good to me overall. Thanks Mingliang for the work. Some comments:

# BlockManager.getReplication(BlockInfo block) can be inlined.
# A couple more functions need to be moved into {{ReplicationManager}}, including {{hasEnoughEffectiveReplicas()}},
{{isNeededReplication()}}, and {{validateRecover()}}.

-          blockLog.debug("BLOCK* removeStoredBlock: {} is removed from " +
-              "excessBlocks", storedBlock);

Debug log is missing in the {{ReplicationManager}}

+  void scheduleNeedeReplicationIfNotPending(BlockInfo block,
+      NumberReplicas num) {

Typo in the function name.

> Move block replication logic from BlockManager to a new class ReplicationManager
> --------------------------------------------------------------------------------
>                 Key: HDFS-9442
>                 URL: https://issues.apache.org/jira/browse/HDFS-9442
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Mingliang Liu
>            Assignee: Mingliang Liu
>         Attachments: HDFS-9442.000.patch, HDFS-9442.001.patch, HDFS-9442.002.patch, HDFS-9442.003.patch,
HDFS-9442.004.patch, HDFS-9442.005.patch
> Currently the {{BlockManager}} is managing all replication logic for over- , under- and
mis-replicated blocks. This jira proposes to move that code to a new class named {{ReplicationManager}}
for cleaner code logic, shorter source files, and easier lock separating work in future.
> The {{ReplicationManager}} is a package local class, providing {{BlockManager}} with
methods that accesses its internal data structures of replication queue. Meanwhile, the class
maintains the lifecycle of {{replicationThread}} and {{replicationQueuesInitializer}} daemon.

This message was sent by Atlassian JIRA

View raw message