Package org.apache.hadoop.hbase.rest
Class RESTServer
java.lang.Object
org.apache.hadoop.hbase.rest.RESTServer
- All Implemented Interfaces:
Constants
Main class for launching REST gateway as a servlet hosted by Jetty.
The following options are supported:
- -p --port : service port
- -ro --readonly : server mode
-
Field Summary
Modifier and TypeFieldDescriptionstatic org.apache.hadoop.conf.Configuration
(package private) static final int
(package private) static final int
(package private) static final String
private InfoServer
(package private) static org.slf4j.Logger
(package private) static final String
(package private) static final String
(package private) static final String
(package private) static final boolean
(package private) static final String
(package private) static final String
(package private) static final String
(package private) static final String
private static boolean
static final String
(package private) boolean
private org.apache.hbase.thirdparty.org.eclipse.jetty.server.Server
private ServerName
static final String
private final UserProvider
Fields inherited from interface org.apache.hadoop.hbase.rest.Constants
CRLF, CUSTOM_FILTERS, DEFAULT_LISTEN_PORT, DEFAULT_MAX_AGE, DEFAULT_REST_CLIENT_CONN_TIMEOUT, DEFAULT_REST_CLIENT_SOCKET_TIMEOUT, DEFAULT_REST_SCANNERCACHE_EXPIRE_TIME_MS, DEFAULT_REST_SCANNERCACHE_SIZE, FILTER, FILTER_B64, FILTER_CLASSES, KEY_ENCODING_QUERY_PARAM_NAME, MIMETYPE_BINARY, MIMETYPE_HTML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF, MIMETYPE_TEXT, MIMETYPE_XML, NOCACHE_PARAM_NAME, REST_AUTHENTICATION_PRINCIPAL, REST_AUTHENTICATION_TYPE, REST_CLIENT_CONN_TIMEOUT, REST_CLIENT_SOCKET_TIMEOUT, REST_CONNECTOR_ACCEPT_QUEUE_SIZE, REST_DNS_INTERFACE, REST_DNS_NAMESERVER, REST_KERBEROS_PRINCIPAL, REST_KEYTAB_FILE, REST_SCANNERCACHE_EXPIRE_TIME, REST_SCANNERCACHE_SIZE, REST_SSL_ENABLED, REST_SSL_EXCLUDE_CIPHER_SUITES, REST_SSL_EXCLUDE_PROTOCOLS, REST_SSL_INCLUDE_CIPHER_SUITES, REST_SSL_INCLUDE_PROTOCOLS, REST_SSL_KEYSTORE_KEYPASSWORD, REST_SSL_KEYSTORE_PASSWORD, REST_SSL_KEYSTORE_STORE, REST_SSL_KEYSTORE_TYPE, REST_SSL_TRUSTSTORE_PASSWORD, REST_SSL_TRUSTSTORE_STORE, REST_SSL_TRUSTSTORE_TYPE, REST_THREAD_POOL_TASK_QUEUE_SIZE, REST_THREAD_POOL_THREAD_IDLE_TIMEOUT, REST_THREAD_POOL_THREADS_MAX, REST_THREAD_POOL_THREADS_MIN, ROW_KEYS_PARAM_NAME, SCAN_BATCH_SIZE, SCAN_CACHE_BLOCKS, SCAN_COLUMN, SCAN_END_ROW, SCAN_END_TIME, SCAN_FETCH_SIZE, SCAN_FILTER, SCAN_LIMIT, SCAN_MAX_VERSIONS, SCAN_REVERSED, SCAN_START_ROW, SCAN_START_TIME, VERSION_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
addCSRFFilter
(org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletContextHandler ctxHandler, org.apache.hadoop.conf.Configuration conf) org.apache.hadoop.conf.Configuration
getConf()
private static String
getHostName
(org.apache.hadoop.conf.Configuration conf) int
int
getPort()
void
join()
private static Pair<org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder,
Class<? extends org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer>> loginServerPrincipal
(UserProvider userProvider, org.apache.hadoop.conf.Configuration conf) static void
The main method for the HBase rest server.private static void
parseCommandLine
(String[] args, org.apache.hadoop.conf.Configuration conf) private static void
printUsageAndExit
(org.apache.hbase.thirdparty.org.apache.commons.cli.Options options, int exitCode) void
run()
Runs the REST server.void
stop()
private void
-
Field Details
-
LOG
-
REST_SERVER
- See Also:
-
REST_CSRF_ENABLED_KEY
- See Also:
-
REST_CSRF_ENABLED_DEFAULT
- See Also:
-
restCSRFEnabled
boolean restCSRFEnabled -
REST_CSRF_CUSTOM_HEADER_KEY
- See Also:
-
REST_CSRF_CUSTOM_HEADER_DEFAULT
- See Also:
-
REST_CSRF_METHODS_TO_IGNORE_KEY
- See Also:
-
REST_CSRF_METHODS_TO_IGNORE_DEFAULT
- See Also:
-
SKIP_LOGIN_KEY
- See Also:
-
DEFAULT_HTTP_MAX_HEADER_SIZE
- See Also:
-
HTTP_HEADER_CACHE_SIZE
- See Also:
-
DEFAULT_HTTP_HEADER_CACHE_SIZE
- See Also:
-
REST_HTTP_ALLOW_OPTIONS_METHOD
- See Also:
-
REST_HTTP_ALLOW_OPTIONS_METHOD_DEFAULT
-
REST_CSRF_BROWSER_USERAGENTS_REGEX_KEY
- See Also:
-
conf
-
userProvider
-
server
-
infoServer
-
serverName
-
-
Constructor Details
-
RESTServer
-
-
Method Details
-
printUsageAndExit
private static void printUsageAndExit(org.apache.hbase.thirdparty.org.apache.commons.cli.Options options, int exitCode) -
addCSRFFilter
void addCSRFFilter(org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletContextHandler ctxHandler, org.apache.hadoop.conf.Configuration conf) -
loginServerPrincipal
private static Pair<org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder,Class<? extends org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer>> loginServerPrincipal(UserProvider userProvider, org.apache.hadoop.conf.Configuration conf) throws Exception - Throws:
Exception
-
parseCommandLine
-
run
Runs the REST server.- Throws:
Exception
-
getHostName
private static String getHostName(org.apache.hadoop.conf.Configuration conf) throws UnknownHostException - Throws:
UnknownHostException
-
join
- Throws:
Exception
-
stopInfoServer
-
stop
- Throws:
Exception
-
getPort
-
getInfoPort
-
getServerName
-
getConf
-
main
The main method for the HBase rest server.- Parameters:
args
- command-line arguments- Throws:
Exception
- exception
-