[
https://issues.apache.org/jira/browse/HDFS-12370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148709#comment-16148709
]
Weiwei Yang commented on HDFS-12370:
------------------------------------
Hi [~linyiqun]
Thanks for uploading the patch, it looks good to me overall. Some minor comments
*ContainerManagerImpl.java*
# line 185 - 193, can we move the init code to
{{ContainerManagerImpl#readContainerInfo}} ?
# method {{incrNumDeletionBlocks}}, {{decrNumDeletionBlocks}}, why not use
{{incrPendingDeletionBlocks}} and {{decrPendingDeletionBlocks}} as well? Which
seems more accurate to what it does.
*ContainerStatus.java*
# It seems this class is not thread safe, but it will need to be called in
multiple threads in {{BlockDeletingService}}
# line 79 and 88, there seems a small typo, {{Deletin}} -> {{Deletion}}
# line 93 I guess you overrides {{compareTo}} so you can directly use
Collection.sort to sort a ContainerStatus list, but it doesn't seem to be good
to use number of pending deletion blocks to differentiate two ContainerStatus
instances. Can you pass a customized comparator instead? Such as
{{Collections.sort(orderedList, new Comparator ...);}}
*TopNOrderedContainerDeletionChoosingPolicy.java*
NIT, can we add a log message after line 54 to print how many pending deletion
blocks this container has ? This will help to illustrate how it works.
Thank you.
> Ozone: Implement TopN container choosing policy for BlockDeletionService
> ------------------------------------------------------------------------
>
> Key: HDFS-12370
> URL: https://issues.apache.org/jira/browse/HDFS-12370
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ozone
> Affects Versions: HDFS-7240
> Reporter: Yiqun Lin
> Assignee: Yiqun Lin
> Attachments: HDFS-12370-HDFS-7240.001.patch
>
>
> Implement TopN container choosing policy for BlockDeletionService. This is
> discussed from HDFS-12354.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]