[
https://issues.apache.org/jira/browse/HADOOP-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169931#comment-13169931
]
Uma Maheswara Rao G commented on HADOOP-7925:
---------------------------------------------
Eli, Patch looks good to me.
One small comment:
Looks we are spreading the "active", "standby" string literals in common and
hdfs. If some one changes toString value of ActiveState in HDFS and prints the
value somewhere that may give the new value of state, at the same time we must
change common also.
My suggestion is to keep this literals in Enum itself and provide the toString
of it. We can use this in both the places now. This is just suggestion, what do
you say?
Also we need not have the state comparision checks.
{code}
enum HAServiceState {
ACTIVE("active"),
STANDBY("standby");
private String state = null;
HAServiceState(String state)
{
this.state = state;
}
public String toString()
{
return this.state;
}
}
{code}
> Add interface and update CLI to query current state to HAServiceProtocol
> ------------------------------------------------------------------------
>
> Key: HADOOP-7925
> URL: https://issues.apache.org/jira/browse/HADOOP-7925
> Project: Hadoop Common
> Issue Type: Sub-task
> Affects Versions: HA Branch (HDFS-1623)
> Reporter: Eli Collins
> Assignee: Eli Collins
> Attachments: hadoop-7925.txt, hadoop-7925.txt
>
>
> Common side of HDFS-2679.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira