hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Yang (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (YARN-6626) Embed REST API service into RM
Date Thu, 14 Sep 2017 22:48:00 GMT

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

Eric Yang edited comment on YARN-6626 at 9/14/17 10:47 PM:
-----------------------------------------------------------

This can be done by specifying hadoop-yarn-service-api as dependency to hadoop-yarn-ui project,
this will automatically place hadoop-yarn-service-api*.jar and dependencies into WEB-INF/lib
of hadoop-yarn-ui war file.  In web.xml file, specify:

{code}
<web-app>
  <display-name>YARN UI</display-name>

  <servlet>
    <servlet-name>REST_API</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
      <param-name>com.sun.jersey.config.property.packages</param-name>
      <param-value>org.apache.hadoop.yarn.appcatalog.controller;org.apache.hadoop.yarn.service.webapp</param-value>
    </init-param>
    <init-param>
      <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>REST_API</servlet-name>
    <url-pattern>/ws/v2/*</url-pattern>
  </servlet-mapping>
</web-app>
{code}

Note that the prefix URL is hard coded in RestApiConstants.  The better approach is to ensure
the prefix directory is described by configuration like in web.xml, or in ApiServerWebApp
where addJerseyResourcePackage is the prefix path.  Hence the URL have the same prefix between
apiserver and resource manager.


was (Author: eyang):
This can be done by specifying hadoop-yarn-service-api as dependency to hadoop-yarn-ui project,
this will automatically place hadoop-yarn-service-api*.jar and dependencies into WEB-INF/lib
of hadoop-yarn-ui war file.  In web.xml file, specify:

{code}
<web-app>
  <display-name>YARN UI</display-name>

  <servlet>
    <servlet-name>REST_API</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
      <param-name>com.sun.jersey.config.property.packages</param-name>
      <param-value>org.apache.hadoop.yarn.appcatalog.controller;org.apache.hadoop.yarn.service.webapp</param-value>
    </init-param>
    <init-param>
      <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>REST_API</servlet-name>
    <url-pattern>/ws/v2/*</url-pattern>
  </servlet-mapping>
</web-app>
{code}

> Embed REST API service into RM
> ------------------------------
>
>                 Key: YARN-6626
>                 URL: https://issues.apache.org/jira/browse/YARN-6626
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Gour Saha
>             Fix For: yarn-native-services
>
>
> As of now the deployment model of the Native Services REST API service is standalone.
There are several cross-cutting solutions that can be inherited for free (kerberos, HA, ACLs,
trusted proxy support, etc.) by the REST API service if it is embedded into the RM process.
In fact we can expose the REST API via the same port as RM UI (8088 default). The URI path
/services/v1/applications will distinguish the REST API calls from other RM APIs.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message