void processNamespacesWithQuotas(final Set<String> namespacesWithQuotas,
    final Multimap<String, TableName> tablesByNamespace) throws IOException {
    long numNamespacesInViolation = 0L;
    for (String namespace : namespacesWithQuotas) {
      // Get the quota definition for the namespace
      final SpaceQuota spaceQuota = namespaceSnapshotStore.getSpaceQuota(namespace);
      if (spaceQuota == null) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Could not get Namespace space quota for " + namespace
            + ", maybe it was recently deleted.");
        }
        continue;
      }
      final SpaceQuotaSnapshot currentSnapshot = namespaceSnapshotStore.getCurrentState(namespace);
      final SpaceQuotaSnapshot targetSnapshot =
        namespaceSnapshotStore.getTargetState(namespace, spaceQuota);
      if (LOG.isTraceEnabled()) {
        LOG.trace("Processing " + namespace + " with current=" + currentSnapshot + ", target="
          + targetSnapshot);
      }
      updateNamespaceQuota(namespace, currentSnapshot, targetSnapshot, tablesByNamespace);

      if (targetSnapshot.getQuotaStatus().isInViolation()) {
        numNamespacesInViolation++;
      }
    }

    // Report the number of namespaces in violation
    if (metrics != null) {
      metrics.setNumNamespacesInSpaceQuotaViolation(numNamespacesInViolation);
    }
  }
Processes each namespace which has a quota defined and moves all of the tables contained in
that namespace into or out of violation of the quota. Tables which are already in violation of
a quota at the table level which <em>also</em> have a reside in a namespace with a violated
quota will not have the namespace quota enacted. The table quota takes priority over the
namespace quota.
@param namespacesWithQuotas The set of namespaces that have quotas defined
@param tablesByNamespace    A mapping of namespaces and the tables contained in those
                            namespaces
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java