public class HttpServer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpServer.Builder |
Modifier and Type | Field and Description |
---|---|
static String |
ADMINS_ACL |
static String |
CONF_CONTEXT_ATTRIBUTE |
Modifier and Type | Method and Description |
---|---|
void |
addServlet(String name,
String pathSpec,
Class<? extends javax.servlet.http.HttpServlet> clazz)
Add a servlet in the server.
|
int |
getPort() |
static boolean |
isInstrumentationAccessAllowed(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Checks the user has privileges to access to instrumentation servlets.
|
void |
start() |
void |
stop() |
public static final String CONF_CONTEXT_ATTRIBUTE
public static final String ADMINS_ACL
public int getPort()
@InterfaceAudience.LimitedPrivate(value="hive") public static boolean isInstrumentationAccessAllowed(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
hadoop.security.instrumentation.requires.admin
is set to FALSE
(default value) it always returns TRUE.
If hadoop.security.instrumentation.requires.admin
is set to TRUE
it will check if the current user is in the admin ACLS. If the user is
in the admin ACLs it returns TRUE, otherwise it returns FALSE.servletContext
- the servlet context.request
- the servlet request.response
- the servlet response.IOException
Copyright © 2021 The Apache Software Foundation. All rights reserved.