hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron T. Myers (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7455) Introduce HA Service Protocol Interface
Date Sun, 10 Jul 2011 05:02:59 GMT

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

Aaron T. Myers commented on HADOOP-7455:
----------------------------------------

Hey Suresh, I'm afraid I don't understand the expected semantics of the methods provided by
this interface.

{code}
+	/**
+	 * Monitor the health of service.
+	 * @throws ServiceException
+	 *           if the health check for the service fails.
+	 */
+	public void monitor() throws ServiceException;
{code}

Shouldn't this method return something to indicate the health of the service? Or is the intention
that returning without throwing a {{ServiceException}} indicates "healthy" and throwing a
{{ServiceException}} indicates "unhealthy" ?

{code}
+	/**
+	 * Promote a service in standby state to active state. No operation, if the
+	 * service is already in active state.
+	 * @throws ServiceException
+	 *           if the service is not in standby state.
+	 */
+	public void promote() throws ServiceException;
{code}

This comment seems contradictory to me. If it is a no-op "if the service is already in active
state" how can it throw an exception "if the service is not in standby state" (and is therefore
in active state.) Or, if the intention is that an implementer of this interface should do
nothing *but* throw an exception if the service is already active, how should an implementer
of this interface indicate "the service was in standby state, but for some reason failed to
become active" ?

{code}
+	/**
+	 * Demote a service in active state to standby state. No operation, if the
+	 * service is already in standby state.
+	 * @throws ServiceException
+	 *           if the service is not in active state.
+	 */
+	public void demote() throws ServiceException;
{code}

Ditto my previous comment reversing "standby" and "active".

> Introduce HA Service Protocol Interface
> ---------------------------------------
>
>                 Key: HADOOP-7455
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7455
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: util
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>         Attachments: HDFS-7454.patch
>
>
> This jira introduces a protocol interface to be implemented by services that provide
HA functionality.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message