[
https://issues.apache.org/jira/browse/HDDS-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16668571#comment-16668571
]
Nanda kumar commented on HDDS-755:
----------------------------------
[~linyiqun], thanks for the review.
{quote}Compared with original logic, we introduce the new state QUASI_CLOSED,
is intended change?
{quote}
Yes, QUASI_CLOSED state will be used when there is no pipeline and we want to
close the container. I have planned to file follow-up jiras which will use this
state.
{quote}Can we reuse State definition like before? And not define the same State
both in ContainerReplicaProto and ContainerDataProto.
{quote}
The reason for duplicating this is because protobuf doesn't allow the same
constant to be used across different enums in same proto file. We already have
{{OPEN}}, {{CLOSING}}, {{CLOSED}}, etc in {{LifeCycleState}}, so we cannot have
another enum in Hdds.proto which has these values.
There is also plan to simplify the Container and Pipeline states in SCM. This
will bring changes in {{LifeCycleState}} and {{LifeCycleEvent}} enums in
{{Hdds.proto}}. HDDS-735 and follow-up jiras will bring those changes.
{quote}I mean we won't throw error for the case of default case after this
change. Maybe we should add the state check.
{quote}
Actually if there is no corresponding value in enum, while calling {{valueOf}}
we will get {{java.lang.IllegalArgumentException: No enum constant ...}}. I
agree that the exception with a custom message will make more sense. Changed it
to the older format.
Also fixed related test failures in patch v001.
> ContainerInfo and ContainerReplica protobuf changes
> ---------------------------------------------------
>
> Key: HDDS-755
> URL: https://issues.apache.org/jira/browse/HDDS-755
> Project: Hadoop Distributed Data Store
> Issue Type: Improvement
> Components: Ozone Datanode, SCM
> Reporter: Nanda kumar
> Assignee: Nanda kumar
> Priority: Major
> Attachments: HDDS-755.000.patch, HDDS-755.001.patch
>
>
> We have different classes that maintain container related information, we can
> consolidate them so that it is easy to read the code.
> Proposal:
> In SCM: will be used in communication between SCM and Client, also used for
> storing in db
> * ContainerInfoProto
> * ContainerInfo
>
> In Datanode: Used in communication between Datanode and SCM
> * ContainerReplicaProto
> * ContainerReplica
>
> In Datanode: Used in communication between Datanode and Client
> * ContainerDataProto
> * ContainerData
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]