YARN-981. Fixed YARN webapp so that /logs servlet works like before. Contributed by Jian He.

svn merge --ignore-ancestry -c 1518030 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1518031 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2013-08-27 23:39:16 +00:00
parent 6c8ce84d0b
commit b156434fd5
2 changed files with 7 additions and 1 deletions

View File

@ -90,6 +90,9 @@ Release 2.1.1-beta - UNRELEASED
YARN-1008. MiniYARNCluster with multiple nodemanagers, all nodes have same YARN-1008. MiniYARNCluster with multiple nodemanagers, all nodes have same
key for allocations. (tucu) key for allocations. (tucu)
YARN-981. Fixed YARN webapp so that /logs servlet works like before. (Jian He
via vinodkv)
Release 2.1.0-beta - 2013-08-22 Release 2.1.0-beta - 2013-08-22
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -242,7 +242,10 @@ public class WebApps {
for(Map.Entry<String, Object> entry : attributes.entrySet()) { for(Map.Entry<String, Object> entry : attributes.entrySet()) {
server.setAttribute(entry.getKey(), entry.getValue()); server.setAttribute(entry.getKey(), entry.getValue());
} }
server.addGlobalFilter("guice", GuiceFilter.class.getName(), null); String webAppPath = "/" + name + "/*";
server.defineFilter(server.getWebAppContext(), "guice",
GuiceFilter.class.getName(), null, new String[] { webAppPath, "/" });
webapp.setConf(conf); webapp.setConf(conf);
webapp.setHttpServer(server); webapp.setHttpServer(server);
server.start(); server.start();