     (util/info (format "  http://%s:%d" ip port)))
   (run-jetty app {:port port}))
 
-(defn exit [message]
+(defn exit
+  "Prints the message and terminates the program"
+  [message]
   (println message)
   (println
     (str/join

      (recur))))

(defn json-response
  [data]
  (-> data json/generate-string response))

(defmacro cached-json-response
  [[& keys] & forms]
  (let [keys (vec keys)]
    `(if-let [body# (get-in @cached [:response ~keys])]

            [hbase-region-inspector.config :as config])
  (:gen-class))

(defonce ^{:doc "Application configuration"} config (atom {}))
(defonce ^{:doc "Whether we should allow region relocation or not"} read-only? (atom true))
(defonce ^{:doc "Whether we should include system regions or not"} with-system? (atom true))
(defonce ^{:doc "Cached result of the previous inspection"} cached
  (atom {:updated-at nil :regions [] :response {}}))
(defonce ^{:doc "Inspection interval"} update-interval (atom 10))

(defn long-fmt
  "Returns string representation of the given integer"
  [val]
  (str/replace (str (long val)) #"\B(?=(\d{3})+(?!\d))" ","))

(defn format-val
