{"id":1484,"date":"2011-08-16T20:40:28","date_gmt":"2011-08-17T01:40:28","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=1484"},"modified":"2011-08-16T20:40:28","modified_gmt":"2011-08-17T01:40:28","slug":"hbase-jmx-metrics","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2011\/08\/16\/hbase-jmx-metrics\/","title":{"rendered":"HBase JMX metrics"},"content":{"rendered":"<p>HBase exposes several metrics via JMX beans, some of which are similar to the Oracle performance counters recorded by AWR.  Actually, they aren&#8217;t even *close* to what Oracle provides, but one can hope \ud83d\ude42<\/p>\n<p>Below is a simple example of how these can be exposed:<\/p>\n<p>Download the jmx command line client jar from <a href=\"http:\/\/crawler.archive.org\/cmdline-jmxclient\/downloads.html\" target=\"_blank\">http:\/\/crawler.archive.org\/cmdline-jmxclient\/downloads.html<\/a><br \/>\nConfigure HBase to expose JMX metrics as shown at <a href=\"http:\/\/hbase.apache.org\/metrics.html\" target=\"_blank\">http:\/\/hbase.apache.org\/metrics.html<\/a><br \/>\nRun the following command on any server that can access ports 10101 and 10102 (as documented in the link above)<\/p>\n<p>The first five and last five properties are shown below:<\/p>\n<pre lang=\"text\">\r\nemgrid01:oracle:emprod1:\/home\/oracle>java -jar cmdline-jmxclient-0.10.3.jar monitorRole:welcome oradb01dxdu:10102 hadoop:service=RegionServer,name=RegionServerStatistics | awk '{l[NR]=$0} END {while (i < length(l)) {if (i <= 10) {print l[i]} else if (i >= length(l) - 10) {print l[i]};i++}}'\r\n\r\nAttributes:\r\n blockCacheFree: NoDescription (type=java.lang.Long)\r\n compactionSizeNumOps: NoDescription (type=java.lang.Integer)\r\n compactionSizeAvgTime: NoDescription (type=java.lang.Long)\r\n compactionSizeMinTime: NoDescription (type=java.lang.Long)\r\n compactionSizeMaxTime: NoDescription (type=java.lang.Long)\r\n flushTimeNumOps: NoDescription (type=java.lang.Integer)\r\n flushTimeAvgTime: NoDescription (type=java.lang.Long)\r\n flushTimeMinTime: NoDescription (type=java.lang.Long)\r\n flushTimeMaxTime: NoDescription (type=java.lang.Long)\r\n compactionTimeMinTime: NoDescription (type=java.lang.Long)\r\n compactionTimeMaxTime: NoDescription (type=java.lang.Long)\r\n flushSizeNumOps: NoDescription (type=java.lang.Integer)\r\n flushSizeAvgTime: NoDescription (type=java.lang.Long)\r\n flushSizeMinTime: NoDescription (type=java.lang.Long)\r\n flushSizeMaxTime: NoDescription (type=java.lang.Long)\r\n blockCacheSize: NoDescription (type=java.lang.Long)\r\nOperations:\r\n resetAllMinMax: Reset (zero) All Min Max\r\n  Parameters 0, return type=void\r\n<\/pre>\n<p>Pick one of the properties above, and pass it on the command line using the same command as above.  In other words:<\/p>\n<pre lang=\"text\">\r\nemgrid01:oracle:emprod1:\/home\/oracle>java -jar cmdline-jmxclient-0.10.3.jar monitorRole:welcome oradb01dxdu:10102 hadoop:service=RegionServer,name=RegionServerStatistics blockCacheSize\r\n08\/16\/2011 21:39:01 -0400 org.archive.jmx.Client blockCacheSize: 1702296\r\nemgrid01:oracle:emprod1:\/home\/oracle>\r\n<\/pre>\n<p>You can then log these in an RDBMS for periodic analysis, and create a &#8220;poor man&#8217;s&#8221; AWR for HBase.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HBase exposes several metrics via JMX beans, some of which are similar to the Oracle performance counters recorded by AWR. Actually, they aren&#8217;t even *close* to what Oracle provides, but one can hope \ud83d\ude42 Below is a simple example of&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2011\/08\/16\/hbase-jmx-metrics\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[19,21,31,20],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1484"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1484"}],"version-history":[{"count":4,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1484\/revisions"}],"predecessor-version":[{"id":1488,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1484\/revisions\/1488"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1484"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}