Skip to content

Instantly share code, notes, and snippets.

hbase.ss.jmx> (p/print-table [:host :blockCacheEvictedCount :blockCacheCount :blockCacheFree :blockCacheSize]
(map #(-> %
(j/massager :blockCacheFree (fn [x] (str (float (/ x 1024 1024)) "MB")))
(j/massager :blockCacheSize (fn [x] (str (float (/ x 1024 1024)) "MB")))
(j/massager :host (fn [x] "Some host.")))
(j/get-regionserver-metrics [:blockCacheEvictedCount
:blockCacheCount
:blockCacheFree
:blockCacheSize])))
===========================================================================================
# The data set used in this example is from http://archive.ics.uci.edu/ml/datasets/Wine+Quality
# P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis.
# Modeling wine preferences by data mining from physicochemical properties. In Decision Support Systems, Elsevier, 47(4):547-553, 2009.
import os
import warnings
import sys
import random
import pandas as pd