Class NamespacesInstanceResource

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

@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 Details

  • Constructor Details

  • Method Details

    • get

      @GET @Produces({"text/plain","text/xml","application/json","application/x-protobuf","application/protobuf"}) public org.apache.hbase.thirdparty.javax.ws.rs.core.Response get(@Context javax.servlet.ServletContext context, @Context org.apache.hbase.thirdparty.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

      @PUT @Consumes({"text/xml","application/json","application/x-protobuf","application/protobuf"}) public org.apache.hbase.thirdparty.javax.ws.rs.core.Response put(NamespacesInstanceModel model, @Context org.apache.hbase.thirdparty.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.
    • post

      @POST @Consumes({"text/xml","application/json","application/x-protobuf","application/protobuf"}) public org.apache.hbase.thirdparty.javax.ws.rs.core.Response post(NamespacesInstanceModel model, @Context org.apache.hbase.thirdparty.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.
    • processUpdate

      private org.apache.hbase.thirdparty.javax.ws.rs.core.Response processUpdate(NamespacesInstanceModel model, boolean updateExisting, org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo uriInfo)
    • createOrUpdate

      private org.apache.hbase.thirdparty.javax.ws.rs.core.Response createOrUpdate(NamespacesInstanceModel model, org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo uriInfo, Admin admin, boolean updateExisting)
    • doesNamespaceExist

      private boolean doesNamespaceExist(Admin admin, String namespaceName) throws IOException
      Throws:
      IOException
    • deleteNoBody

      @DELETE public org.apache.hbase.thirdparty.javax.ws.rs.core.Response deleteNoBody(byte[] message, @Context org.apache.hbase.thirdparty.javax.ws.rs.core.UriInfo uriInfo, @Context org.apache.hbase.thirdparty.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

      @Path("tables") public NamespacesInstanceResource getNamespaceInstanceResource(@PathParam("tables") String namespace) throws IOException
      Dispatch to NamespaceInstanceResource for getting list of tables.
      Throws:
      IOException