private boolean doesNamespaceExist(Admin admin, String namespaceName) throws IOException {
    NamespaceDescriptor[] nd = admin.listNamespaceDescriptors();
    for (int i = 0; i < nd.length; i++) {
      if (nd[i].getName().equals(namespaceName)) {
        return true;
      }
    }
    return false;
  }
Build a response for POST create namespace with properties specified.
@param model   properties used for create.
@param uriInfo (JAX-RS context variable) request URL
@return response code.
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/NamespacesInstanceResource.java