   "Generates output for /table_regions.json. Regions grouped by their tables."
   [{:keys [regions table-summary metric sort tables with-system?]
     :or   {tables nil with-system? true}}]
-  (let [;; Exclude hbase:meta table
-        all-regions (if with-system? regions (remove system? regions))
+  (let [all-regions (filter-system-tables with-system? metric regions)
 
         ;; Sort the tables in their names
         all-tables (->> all-regions (map :table) (apply sorted-set) vec)

          region
          [:start-key :end-key]))

(defn- system?
  "Checks if the region is system region. System regions are not shown if
  --no-system option is provided."
  [region]
  (or (:meta? region)
      (if-let [table (:table region)]
        (or (.startsWith table "hbase:")
            (#{".META." "-ROOT-"} table)))))

(defn calculate-locality
  "Calculates the aggregated locality of the regions."

  "Generates output for /server_regions.json. Regions grouped by their servers."
  [{:keys [regions servers metric sort tables with-system?]
    :or   {tables nil with-system? true}}]
  (let [all-regions (filter-system-tables with-system? metric regions)

        ;; Sort the tables in descending order by the sum of the given metric
        all-tables (keys (sort-by
