public static Map<TableName, SpaceQuotaSnapshot> getSnapshots(Connection conn)
    throws IOException {
    Map<TableName, SpaceQuotaSnapshot> snapshots = new HashMap<>();
    try (Table quotaTable = conn.getTable(QUOTA_TABLE_NAME);
      ResultScanner rs = quotaTable.getScanner(makeQuotaSnapshotScan())) {
      for (Result r : rs) {
        extractQuotaSnapshot(r, snapshots);
      }
    }
    return snapshots;
  }
Fetches all {@link SpaceQuotaSnapshot} objects from the {@code hbase:quota} table.
@param conn The HBase connection
@return A map of table names and their computed snapshot.
hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaTableUtil.java