[
https://issues.apache.org/jira/browse/HDDS-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609684#comment-16609684
]
Ajay Kumar edited comment on HDDS-427 at 9/11/18 12:12 AM:
-----------------------------------------------------------
getContainerReplicas can be used by multiple callers to check replicas for
given container. Not all of them may view container with no replica as
something which warrants an exception from api itself. In some of those cases
it is perfectly normal case. For example during SCM chill mode a container
might not have any replica reported initially. Similarly during container
report handling if no replicas are found for given container
ContainerReportHandler should log the message and move on as ReplicationManager
can't do anything in that specific case.
was (Author: ajayydv):
getContainerReplicas can be used by multiple callers to check replicas for
given container. Not all of them may view container with no replica as
something which warrants an exception from api itself. In some of those cases
it is perfectly normal case. For example during SCM chill mode a container
might not have any replica reported initially. Similarly during container
report handling if no replicas are found for given container
ContainerReportHandler should take log the message and move on as
ReplicationManager can't do anything in that specific case.
> For containers with no replica ContainerStateMap#getContainerReplicas should
> return empty map
> ---------------------------------------------------------------------------------------------
>
> Key: HDDS-427
> URL: https://issues.apache.org/jira/browse/HDDS-427
> Project: Hadoop Distributed Data Store
> Issue Type: Improvement
> Reporter: Ajay Kumar
> Assignee: Ajay Kumar
> Priority: Major
> Attachments: HDDS-427.00.patch
>
>
> Callers of API ContainerStateMap#getContainerReplicas should be allowed to
> decide if its violation of some condition (when there are no replicas,
> warranting exception) instead of it being implicit to every caller. Instead
> ContainerStateMap#getContainerReplicas should return empty map for no
> replicas. Callers can decide if no replicas for given container is a volition
> of business condition. Throwing exception in this API also results in a
> subtle bug in ContainerReportHandler where exception for one container may
> result in whole container list being skipped.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]