org.apache.hadoop.hbase.rest
Class NamespacesInstanceResource

java.lang.Object
  extended by org.apache.hadoop.hbase.rest.ResourceBase
      extended by org.apache.hadoop.hbase.rest.NamespacesInstanceResource
All Implemented Interfaces:
Constants

@InterfaceAudience.Private
public class NamespacesInstanceResource
extends ResourceBase

Implements the following REST end points:

/namespaces/{namespace} GET: get namespace properties. /namespaces/{namespace} POST: create namespace. /namespaces/{namespace} PUT: alter namespace. /namespaces/{namespace} DELETE: drop namespace. /namespaces/{namespace}/tables GET: list namespace's tables.


Field Summary
 
Fields inherited from interface org.apache.hadoop.hbase.rest.Constants
CRLF, DEFAULT_LISTEN_PORT, DEFAULT_MAX_AGE, FILTER_CLASSES, 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_DNS_INTERFACE, REST_DNS_NAMESERVER, REST_KERBEROS_PRINCIPAL, REST_KEYTAB_FILE, REST_SSL_ENABLED, REST_SSL_KEYSTORE_KEYPASSWORD, REST_SSL_KEYSTORE_PASSWORD, REST_SSL_KEYSTORE_STORE, ROW_KEYS_PARAM_NAME, SCAN_BATCH_SIZE, SCAN_COLUMN, SCAN_END_ROW, SCAN_END_TIME, SCAN_FETCH_SIZE, SCAN_LIMIT, SCAN_MAX_VERSIONS, SCAN_START_ROW, SCAN_START_TIME, VERSION_STRING
 
Constructor Summary
NamespacesInstanceResource(String namespace)
          Constructor for standard NamespaceInstanceResource.
NamespacesInstanceResource(String namespace, boolean queryTables)
          Constructor for querying namespace table list via NamespaceInstanceResource.
 
Method Summary
 javax.ws.rs.core.Response deleteNoBody(byte[] message, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders headers)
          Build a response for DELETE delete namespace.
 javax.ws.rs.core.Response get(javax.servlet.ServletContext context, javax.ws.rs.core.UriInfo uriInfo)
          Build a response for GET namespace description or GET list of namespace tables.
 NamespacesInstanceResource getNamespaceInstanceResource(String namespace)
          Dispatch to NamespaceInstanceResource for getting list of tables.
 javax.ws.rs.core.Response post(NamespacesInstanceModel model, javax.ws.rs.core.UriInfo uriInfo)
          Build a response for POST create namespace with properties specified.
 javax.ws.rs.core.Response postNoBody(byte[] message, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders headers)
          Build a response for POST create namespace with no properties specified.
 javax.ws.rs.core.Response put(NamespacesInstanceModel model, javax.ws.rs.core.UriInfo uriInfo)
          Build a response for PUT alter namespace with properties specified.
 javax.ws.rs.core.Response putNoBody(byte[] message, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders headers)
          Build a response for PUT alter namespace with no properties specified.
 
Methods inherited from class org.apache.hadoop.hbase.rest.ResourceBase
processException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespacesInstanceResource

public NamespacesInstanceResource(String namespace)
                           throws IOException
Constructor for standard NamespaceInstanceResource.

Throws:
IOException

NamespacesInstanceResource

public NamespacesInstanceResource(String namespace,
                                  boolean queryTables)
                           throws IOException
Constructor for querying namespace table list via NamespaceInstanceResource.

Throws:
IOException
Method Detail

get

public javax.ws.rs.core.Response get(@Context
                                     javax.servlet.ServletContext context,
                                     @Context
                                     javax.ws.rs.core.UriInfo uriInfo)
Build a response for GET namespace description or GET list of namespace tables.

Parameters:
context - servlet context
uriInfo - (JAX-RS context variable) request URL
Returns:
A response containing NamespacesInstanceModel for a namespace descriptions and TableListModel for a list of namespace tables.

put

public javax.ws.rs.core.Response put(NamespacesInstanceModel model,
                                     @Context
                                     javax.ws.rs.core.UriInfo uriInfo)
Build a response for PUT alter namespace with properties specified.

Parameters:
model - properties used for alter.
uriInfo - (JAX-RS context variable) request URL
Returns:
response code.

putNoBody

public javax.ws.rs.core.Response putNoBody(byte[] message,
                                           @Context
                                           javax.ws.rs.core.UriInfo uriInfo,
                                           @Context
                                           javax.ws.rs.core.HttpHeaders headers)
Build a response for PUT alter namespace with no properties specified.

Parameters:
message - value not used.
headers - value not used.
Returns:
response code.

post

public javax.ws.rs.core.Response post(NamespacesInstanceModel model,
                                      @Context
                                      javax.ws.rs.core.UriInfo uriInfo)
Build a response for POST create namespace with properties specified.

Parameters:
model - properties used for create.
uriInfo - (JAX-RS context variable) request URL
Returns:
response code.

postNoBody

public javax.ws.rs.core.Response postNoBody(byte[] message,
                                            @Context
                                            javax.ws.rs.core.UriInfo uriInfo,
                                            @Context
                                            javax.ws.rs.core.HttpHeaders headers)
Build a response for POST create namespace with no properties specified.

Parameters:
message - value not used.
headers - value not used.
Returns:
response code.

deleteNoBody

public javax.ws.rs.core.Response deleteNoBody(byte[] message,
                                              @Context
                                              javax.ws.rs.core.UriInfo uriInfo,
                                              @Context
                                              javax.ws.rs.core.HttpHeaders headers)
Build a response for DELETE delete namespace.

Parameters:
message - value not used.
headers - value not used.
Returns:
response code.

getNamespaceInstanceResource

public NamespacesInstanceResource getNamespaceInstanceResource(String namespace)
                                                        throws IOException
Dispatch to NamespaceInstanceResource for getting list of tables.

Throws:
IOException


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.