long getSnapshotSizesForTable(TableName tn) throws IOException {
    try (Table quotaTable = conn.getTable(QuotaTableUtil.QUOTA_TABLE_NAME)) {
      Scan s = QuotaTableUtil.createScanForSpaceSnapshotSizes(tn);
      ResultScanner rs = quotaTable.getScanner(s);
      try {
        long size = 0L;
        // Should just be a single row (for our table)
        for (Result result : rs) {
          // May have multiple columns, one for each snapshot
          CellScanner cs = result.cellScanner();
          while (cs.advance()) {
            Cell current = cs.current();
            try {
              long snapshotSize = QuotaTableUtil.parseSnapshotSize(current);
              if (LOG.isTraceEnabled()) {
                LOG.trace("Saw snapshot size of " + snapshotSize + " for " + current);
              }
              size += snapshotSize;
            } catch (InvalidProtocolBufferException e) {
              LOG.warn("Failed to parse snapshot size from cell: " + current);
            }
          }
        }
        return size;
      } finally {
        if (null != rs) {
          rs.close();
        }
      }
    }
  }
Fetches any serialized snapshot sizes from the quota table for the {@code tn} provided. Any
malformed records are skipped with a warning printed out.
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/TableQuotaSnapshotStore.java