void updateTableQuota(TableName table, SpaceQuotaSnapshot currentSnapshot,
    SpaceQuotaSnapshot targetSnapshot) throws IOException {
    final SpaceQuotaStatus currentStatus = currentSnapshot.getQuotaStatus();
    final SpaceQuotaStatus targetStatus = targetSnapshot.getQuotaStatus();

    // If we're changing something, log it.
    if (!currentSnapshot.equals(targetSnapshot)) {
      this.snapshotNotifier.transitionTable(table, targetSnapshot);
      // Update it in memory
      tableSnapshotStore.setCurrentState(table, targetSnapshot);

      // If the target is none, we're moving out of violation. Update the hbase:quota table
      SpaceViolationPolicy currPolicy = currentStatus.getPolicy().orElse(null);
      SpaceViolationPolicy targetPolicy = targetStatus.getPolicy().orElse(null);
      if (!targetStatus.isInViolation()) {
        // In case of Disable SVP, we need to enable the table as it moves out of violation
        if (isDisableSpaceViolationPolicy(currPolicy, targetPolicy)) {
          QuotaUtil.enableTableIfNotEnabled(conn, table);
        }
        if (LOG.isDebugEnabled()) {
          LOG.debug(table + " moved into observance of table space quota.");
        }
      } else {
        // We're either moving into violation or changing violation policies
        if (currPolicy != targetPolicy && SpaceViolationPolicy.DISABLE == currPolicy) {
          // In case of policy switch, we need to enable the table if current policy is Disable SVP
          QuotaUtil.enableTableIfNotEnabled(conn, table);
        } else if (SpaceViolationPolicy.DISABLE == targetPolicy) {
          // In case of Disable SVP, we need to disable the table as it moves into violation
          QuotaUtil.disableTableIfNotDisabled(conn, table);
        }
        if (LOG.isDebugEnabled()) {
          LOG.debug(
            table + " moved into violation of table space quota with policy of " + targetPolicy);
        }
      }
    } else if (LOG.isTraceEnabled()) {
      // Policies are the same, so we have nothing to do except log this. Don't need to re-update
      // the quota table
      if (!currentStatus.isInViolation()) {
        LOG.trace(table + " remains in observance of quota.");
      } else {
        LOG.trace(table + " remains in violation of quota.");
      }
    }
  }
Updates the hbase:quota table with the new quota policy for this <code>table</code> if
necessary.
@param table           The table being checked
@param currentSnapshot The state of the quota on this table from the previous invocation.
@param targetSnapshot  The state the quota should be in for this table.
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java