[ https://issues.apache.org/jira/browse/YARN-6626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16181727#comment-16181727 ]
Eric Yang commented on YARN-6626: --------------------------------- [~jianhe] I will change the api-services to api-service. Are you sure that you have api service enabled? Without implement it as a WebFilter, the web filter chaining would not have worked correctly. Here is the resource manager log error when it is not extending WebService: {code} 2017-09-21 01:51:55,623 INFO org.apache.hadoop.service.AbstractService: Service ResourceManager failed in state STARTED; cause: com.google.inject.CreationException: Unable to create injector, see the following errors: 1) Could not find a suitable constructor in org.apache.hadoop.yarn.service.webapp.ApiServer. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private. at org.apache.hadoop.yarn.service.webapp.ApiServer.class(ApiServer.java:63) at org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebApp.setup(RMWebApp.java:53) 1 error com.google.inject.CreationException: Unable to create injector, see the following errors: 1) Could not find a suitable constructor in org.apache.hadoop.yarn.service.webapp.ApiServer. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private. at org.apache.hadoop.yarn.service.webapp.ApiServer.class(ApiServer.java:63) at org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebApp.setup(RMWebApp.java:53) 1 error at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466) at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107) at com.google.inject.Guice.createInjector(Guice.java:96) at com.google.inject.Guice.createInjector(Guice.java:73) at com.google.inject.Guice.createInjector(Guice.java:62) at org.apache.hadoop.yarn.webapp.WebApps$Builder.build(WebApps.java:356) at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:401) at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.startWepApp(ResourceManager.java:1161) at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStart(ResourceManager.java:1271) at org.apache.hadoop.service.AbstractService.start(AbstractService.java:194) at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1467) {code} In addition, if we want to get HTTPContext object from the WebFilter for username later, this will work correctly. > 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 > Assignee: Eric Yang > Fix For: yarn-native-services > > Attachments: YARN-6626.yarn-native-services.001.patch, > YARN-6626.yarn-native-services.002.patch, > YARN-6626.yarn-native-services.003.patch, > YARN-6626.yarn-native-services.004.patch, > YARN-6626.yarn-native-services.005.patch, > YARN-6626.yarn-native-services.006.patch, > YARN-6626.yarn-native-services.007.patch > > > 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org