[
https://issues.apache.org/jira/browse/HDDS-2591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16978713#comment-16978713
]
Attila Doroszlai commented on HDDS-2591:
----------------------------------------
Actually, the method is only used by tests. [~bharat], do you think it can be
removed, or is there a plan to use it later?
> No tailMap needed for startIndex 0 in ContainerSet#listContainer
> ----------------------------------------------------------------
>
> Key: HDDS-2591
> URL: https://issues.apache.org/jira/browse/HDDS-2591
> Project: Hadoop Distributed Data Store
> Issue Type: Improvement
> Components: Ozone Datanode
> Reporter: Attila Doroszlai
> Assignee: Attila Doroszlai
> Priority: Minor
>
> {{ContainerSet#listContainer}} has this code:
> {code:title=https://github.com/apache/hadoop-ozone/blob/3c334f6a7b344e0e5f52fec95071c369286cfdcb/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java#L198}
> map = containerMap.tailMap(containerMap.firstKey(), true);
> {code}
> This is equivalent to:
> {code}
> map = containerMap;
> {code}
> since {{tailMap}} is a sub-map with all keys larger than or equal to
> ({{inclusive=true}}) {{firstKey}}, which is the lowest key in the map. So it
> is a sub-map with all keys, ie. the whole map.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]