HADOOP-4572. Can not access user logs - Jetty is not configured by default to serve aliases/symlinks (ahmed via tucu)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1376755 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f068e8db4b
commit
eb04620e43
|
@ -221,6 +221,9 @@ Release 2.0.1-alpha - UNRELEASED
|
||||||
|
|
||||||
HADOOP-8632. Configuration leaking class-loaders (Costin Leau via bobby)
|
HADOOP-8632. Configuration leaking class-loaders (Costin Leau via bobby)
|
||||||
|
|
||||||
|
HADOOP-4572. Can not access user logs - Jetty is not configured by default
|
||||||
|
to serve aliases/symlinks (ahmed via tucu)
|
||||||
|
|
||||||
BREAKDOWN OF HDFS-3042 SUBTASKS
|
BREAKDOWN OF HDFS-3042 SUBTASKS
|
||||||
|
|
||||||
HADOOP-8220. ZKFailoverController doesn't handle failure to become active
|
HADOOP-8220. ZKFailoverController doesn't handle failure to become active
|
||||||
|
|
|
@ -172,6 +172,12 @@ public class CommonConfigurationKeys extends CommonConfigurationKeysPublic {
|
||||||
public static final String DEFAULT_HADOOP_HTTP_STATIC_USER =
|
public static final String DEFAULT_HADOOP_HTTP_STATIC_USER =
|
||||||
"dr.who";
|
"dr.who";
|
||||||
|
|
||||||
|
/** Enable/Disable aliases serving from jetty */
|
||||||
|
public static final String HADOOP_JETTY_LOGS_SERVE_ALIASES =
|
||||||
|
"hadoop.jetty.logs.serve.aliases";
|
||||||
|
public static final boolean DEFAULT_HADOOP_JETTY_LOGS_SERVE_ALIASES =
|
||||||
|
true;
|
||||||
|
|
||||||
/* Path to the Kerberos ticket cache. Setting this will force
|
/* Path to the Kerberos ticket cache. Setting this will force
|
||||||
* UserGroupInformation to use only this ticket cache file when creating a
|
* UserGroupInformation to use only this ticket cache file when creating a
|
||||||
* FileSystem instance.
|
* FileSystem instance.
|
||||||
|
|
|
@ -329,6 +329,12 @@ public class HttpServer implements FilterContainer {
|
||||||
Context logContext = new Context(parent, "/logs");
|
Context logContext = new Context(parent, "/logs");
|
||||||
logContext.setResourceBase(logDir);
|
logContext.setResourceBase(logDir);
|
||||||
logContext.addServlet(AdminAuthorizedServlet.class, "/*");
|
logContext.addServlet(AdminAuthorizedServlet.class, "/*");
|
||||||
|
if (conf.getBoolean(
|
||||||
|
CommonConfigurationKeys.HADOOP_JETTY_LOGS_SERVE_ALIASES,
|
||||||
|
CommonConfigurationKeys.DEFAULT_HADOOP_JETTY_LOGS_SERVE_ALIASES)) {
|
||||||
|
logContext.getInitParams().put(
|
||||||
|
"org.mortbay.jetty.servlet.Default.aliases", "true");
|
||||||
|
}
|
||||||
logContext.setDisplayName("logs");
|
logContext.setDisplayName("logs");
|
||||||
setContextAttributes(logContext, conf);
|
setContextAttributes(logContext, conf);
|
||||||
defaultContexts.put(logContext, true);
|
defaultContexts.put(logContext, true);
|
||||||
|
|
|
@ -1083,4 +1083,13 @@
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<property>
|
||||||
|
<name>hadoop.jetty.logs.serve.aliases</name>
|
||||||
|
<value>true</value>
|
||||||
|
<description>
|
||||||
|
Enable/Disable aliases serving from jetty
|
||||||
|
</description>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
Loading…
Reference in New Issue