 
 (defn exit [message]
   (println message)
-  (println "usage: hbase-region-inspector [--read-only] QUORUM[/ZKPORT] PORT")
+  (println "usage: hbase-region-inspector [--read-only --with-meta] QUORUM[/ZKPORT] PORT")
   (System/exit 1))
 
 (defn -main [& args]
   (let [[opts args] ((juxt filter remove) #(.startsWith % "-") args)
         opts (set (map #(keyword (str/replace % #"^-*" "")) opts))]
     (reset! read-only? (contains? opts :read-only))
+    (reset! with-meta? (contains? opts :with-meta))
     (when (not= 2 (count args)) (exit "invalid number of arguments"))
     (try
       (let [[zk port] args

             tables (if (instance? String tables) [tables] tables)]
         (response
           (regions-by-servers (:regions @cached) (:servers @cached)
                               (keyword metric) (keyword sort) tables))))
  (GET "/table_regions.json"
       {{:keys [sort metric]
         :or {sort "metric" metric "store-file-size-mb"}} :params}
       (response
         (regions-by-tables (:regions @cached)
                            (keyword metric) (keyword sort))))
  (PUT "/move_region" {{:keys [src dest region]} :params}
       (when @read-only?
         (throw (Exception. "Read-only mode. Not allowed.")))


(defn regions-by-tables
  "Generates output for /table_regions.json. Regions grouped by their tables."
  [regions metric sort {:keys [with-meta?] :or {with-meta? false}}]
  (let [;; Exclude hbase:meta table
        all-regions (if with-meta? regions (remove :meta? regions))
        ;; Sort the regions
        sorted-regions (if (= sort :metric)
                         (reverse (sort-by metric all-regions))
