Package org.apache.hadoop.hbase.rest
Class RESTServlet
java.lang.Object
org.apache.hadoop.hbase.rest.RESTServlet
- All Implemented Interfaces:
Constants
Singleton class encapsulating global REST servlet state and functions.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
private final org.apache.hadoop.conf.Configuration
private final ConnectionCache
(package private) static final String
private static RESTServlet
private static final org.slf4j.Logger
static final String
private final MetricsREST
private final JvmPauseMonitor
private final org.apache.hadoop.security.UserGroupInformation
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
ConstructorDescriptionRESTServlet
(org.apache.hadoop.conf.Configuration conf, UserProvider userProvider) Constructor with existing configuration -
Method Summary
Modifier and TypeMethodDescription(package private) Admin
getAdmin()
(package private) org.apache.hadoop.conf.Configuration
Returns the ConnectionCache instancestatic RESTServlet
Returns the RESTServlet singleton instancestatic RESTServlet
getInstance
(org.apache.hadoop.conf.Configuration conf, UserProvider userProvider) (package private) MetricsREST
(package private) org.apache.hadoop.security.UserGroupInformation
(package private) Table
Caller closes the table afterwards.(package private) boolean
Helper method to determine if server should only respond to GET HTTP method requests.private void
registerCustomFilter
(org.apache.hadoop.conf.Configuration conf) (package private) void
setEffectiveUser
(String effectiveUser) (package private) void
shutdown()
Shutdown any services that need to stopstatic void
stop()
(package private) boolean
-
Field Details
-
LOG
-
INSTANCE
-
conf
-
metrics
-
connectionCache
-
realUser
-
pauseMonitor
-
CLEANUP_INTERVAL
- See Also:
-
MAX_IDLETIME
- See Also:
-
HBASE_REST_SUPPORT_PROXYUSER
- See Also:
-
-
Constructor Details
-
RESTServlet
RESTServlet(org.apache.hadoop.conf.Configuration conf, UserProvider userProvider) throws IOException Constructor with existing configuration- Parameters:
conf
- existing configurationuserProvider
- the login user provider- Throws:
IOException
-
-
Method Details
-
getRealUser
org.apache.hadoop.security.UserGroupInformation getRealUser() -
getInstance
Returns the RESTServlet singleton instance -
getConnectionCache
Returns the ConnectionCache instance -
getInstance
public static RESTServlet getInstance(org.apache.hadoop.conf.Configuration conf, UserProvider userProvider) throws IOException - Parameters:
conf
- Existing configuration to use in rest servletuserProvider
- the login user provider- Returns:
- the RESTServlet singleton instance
- Throws:
IOException
-
stop
-
getAdmin
- Throws:
IOException
-
getTable
Caller closes the table afterwards.- Throws:
IOException
-
getConfiguration
org.apache.hadoop.conf.Configuration getConfiguration() -
getMetrics
-
isReadOnly
boolean isReadOnly()Helper method to determine if server should only respond to GET HTTP method requests.- Returns:
- boolean for server read-only state
-
setEffectiveUser
-
shutdown
void shutdown()Shutdown any services that need to stop -
supportsProxyuser
boolean supportsProxyuser() -
registerCustomFilter
-