@InterfaceAudience.Private public class InfoServer extends Object
Modifier and Type | Field and Description |
---|---|
private static String |
HBASE_APP_DIR |
private HttpServer |
httpServer |
Constructor and Description |
---|
InfoServer(String name,
String bindAddress,
int port,
boolean findPort,
org.apache.hadoop.conf.Configuration c)
Create a status server on the given port.
|
Modifier and Type | Method and Description |
---|---|
void |
addPrivilegedServlet(String name,
String pathSpec,
Class<? extends javax.servlet.http.HttpServlet> clazz) |
void |
addServlet(String name,
String pathSpec,
Class<? extends javax.servlet.http.HttpServlet> clazz)
Deprecated.
Use
addUnprivilegedServlet(String, String, Class) or
addPrivilegedServlet(String, String, Class) instead of this
method which does not state outwardly what kind of authz rules will
be applied to this servlet. |
void |
addUnprivilegedServlet(String name,
String pathSpec,
Class<? extends javax.servlet.http.HttpServlet> clazz) |
(package private) org.apache.hadoop.security.authorize.AccessControlList |
buildAdminAcl(org.apache.hadoop.conf.Configuration conf)
Builds an ACL that will restrict the users who can issue commands to endpoints on the UI
which are meant only for administrators.
|
static boolean |
canUserModifyUI(javax.servlet.http.HttpServletRequest req,
javax.servlet.ServletContext ctx,
org.apache.hadoop.conf.Configuration conf)
Returns true if and only if UI authentication (spnego) is enabled, UI authorization is enabled,
and the requesting user is defined as an administrator.
|
int |
getPort()
Deprecated.
Since 0.99.0
|
void |
setAttribute(String name,
Object value) |
void |
start() |
void |
stop() |
private static final String HBASE_APP_DIR
private final HttpServer httpServer
public InfoServer(String name, String bindAddress, int port, boolean findPort, org.apache.hadoop.conf.Configuration c) throws IOException
name
.name
- The name of the serverbindAddress
- address to bind toport
- The port to use on the serverfindPort
- whether the server should start at the given port and increment by 1 until it
finds a free port.c
- the Configuration
to build the serverIOException
- if getting one of the password fails or the server cannot be createdorg.apache.hadoop.security.authorize.AccessControlList buildAdminAcl(org.apache.hadoop.conf.Configuration conf)
@Deprecated public void addServlet(String name, String pathSpec, Class<? extends javax.servlet.http.HttpServlet> clazz)
addUnprivilegedServlet(String, String, Class)
or
addPrivilegedServlet(String, String, Class)
instead of this
method which does not state outwardly what kind of authz rules will
be applied to this servlet.addPrivilegedServlet(String, String, Class)
or
addUnprivilegedServlet(String, String, Class)
instead of this method.
This method will add a servlet which any authenticated user can access.public void addUnprivilegedServlet(String name, String pathSpec, Class<? extends javax.servlet.http.HttpServlet> clazz)
public void addPrivilegedServlet(String name, String pathSpec, Class<? extends javax.servlet.http.HttpServlet> clazz)
public void setAttribute(String name, Object value)
public void start() throws IOException
IOException
@Deprecated public int getPort()
public static boolean canUserModifyUI(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletContext ctx, org.apache.hadoop.conf.Configuration conf)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.