You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2008/09/15 12:59:44 UTC
[jira] Commented: (HADOOP-3969) Provide Mechanism to optionally
expose public org.apache.hadoop.util.Services APIs
[ https://issues.apache.org/jira/browse/HADOOP-3969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630985#action_12630985 ]
Steve Loughran commented on HADOOP-3969:
----------------------------------------
1. I'd like to see what you propose as a RESTy API. We could bounce it past the rest-discuss mailing list too
2. longer term, it would be good to take the foundation and see what could be used for a general purpose REST interface to bits of Hadoop
One thing that I've looked at in the past of having a RESTful deployment API is not to have start/stop operations, but purely to export the state as a URI of its own
PUT https://server1/namenode/state <- started/stopped, etc.
GET https://server1/namenode/state returns the state
GET https://server1/namenode/stateis/started returns 200 if in that state, some error -404, 500- if not
GET https://server1/namenode/ping would do the ping and return a page that could be handled with XPath and a load balancer; 500 on a ping failure and 200 if all is well.
In this world the rest of the service configuration would also be something to GET, maybe PUT before you start the service.
> Provide Mechanism to optionally expose public org.apache.hadoop.util.Services APIs
> -----------------------------------------------------------------------------------
>
> Key: HADOOP-3969
> URL: https://issues.apache.org/jira/browse/HADOOP-3969
> Project: Hadoop Core
> Issue Type: New Feature
> Reporter: Pete Wyckoff
>
> Enhance manageability of Hadoop Services by providing Jute, Thrift, REST, ... APIs to select methods in the Service class (or potentially others).
> This will allow external tools written in a myriad of languages to query the state of Hadoop Servers and/or interact with them.
> This can be encapsulated in the Service class by defining a very simple interface and then optionally instantiating such an implementation provided in the Configuration.
> Some methods to be implemented include all the public methods in Service:
> {code}
> ping()
> isRunning()
> terminate()
> getServiceState()
> verifyServiceState()
> isTerminated(),
> {code}
> INTERFACE:
> {code}
> package org.apache.hadoop.util;
> public interface ExposeServiceAPIs {
> /**
> * @param service - the service whose APIs are to be exposed
> * @param serviceName - a symbolic name for the service
> * @param configuration - the hadoop configuration object
> **/
> public void initialize(Service service, String serviceName, Configuration conf) throws IOException,
> public boolean start();
> public boolean stop();
> } ;
> {code}
> Two straightforward implementations of this would be:
> 1. Servlet that exposes the APIs via REST
> 2. Thrift DDL of the service APIs and an implementation in Java + bindings in C++, Java, Perl, Python, Ruby, PHP
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.