private NamespaceDescriptor getNamespaceDescriptor(String namespaceAsString) {
    try {
      return this.master.getClusterSchema().getNamespace(namespaceAsString);
    } catch (IOException e) {
      LOG.error("Error while fetching namespace descriptor for namespace : {}", namespaceAsString);
      return null;
    }
  }
Check and update region count for an existing table. To handle scenarios like restore snapshot
@param name name of the table for region count needs to be checked and updated
@param incr count of regions
@throws QuotaExceededException if quota exceeds for the number of regions allowed in a
                               namespace
@throws IOException            Signals that an I/O exception has occurred.
hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceStateManager.java