hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anu Engineer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDDS-427) For containers with no replica ContainerStateMap#getContainerReplicas should return empty map
Date Tue, 11 Sep 2018 00:40:00 GMT

    [ https://issues.apache.org/jira/browse/HDDS-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609951#comment-16609951
] 

Anu Engineer commented on HDDS-427:
-----------------------------------

{quote} Not all of them may view container with no replica as something which warrants an
exception from api itself.
{quote}
The Ozone/HDDS assumes that a container has the requisite number of replicas. Not having the
replica is an error state. So the normal path should be that we should throw an error.
{quote} In some of those cases it is perfectly normal case
{quote}
Yes, in most cases this is the normal path.
{quote}For example during SCM chill mode a container might not have any replica reported initially
{quote}
Chill mode is a special case, it is the time when the cluster is booting up and we may not
have container reports. So shouldn't the Chill Mode manager handle this special case, as appropriate?
{quote}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
{quote}
Absolutely not. If the replicas are missing, it is up to replica manager to deal with that
issue. The appropriate course of action, if it is creating alerting events, logging or whatever
should be done, should be done by the replica manager. This is a case where Container report
handler should catch the error and send across to Replica Manager – probably with logging.
But deciding that information will not  go to ReplicaManager is a no go. Returning null to
flag an error state can lead to users of API ignoring this error. If we throw an exception,
we are flagging and error which the caller cannot ignore and therefore if the user decides
that it an okay error state; for example, Chill Mode,  User can catch this error and ignore
it.

Due to the above reasons  I am -1 on this patch.

 

> 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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message