@GET
  @Produces({ MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF,
    MIMETYPE_PROTOBUF_IETF })
  public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) {
    if (LOG.isTraceEnabled()) {
      LOG.trace("GET " + uriInfo.getAbsolutePath());
    }
    servlet.getMetrics().incrementRequests(1);
    try {
      NamespacesModel rowModel = null;
      rowModel = new NamespacesModel(servlet.getAdmin());
      servlet.getMetrics().incrementSucessfulGetRequests(1);
      return Response.ok(rowModel).build();
    } catch (IOException e) {
      servlet.getMetrics().incrementFailedGetRequests(1);
      throw new RuntimeException("Cannot retrieve list of namespaces.");
    }
  }
Build a response for a list of all namespaces request.
@param context servlet context
@param uriInfo (JAX-RS context variable) request URL
@return a response for a version request
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/NamespacesResource.java