{"id":1432,"date":"2011-07-13T12:14:43","date_gmt":"2011-07-13T17:14:43","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=1432"},"modified":"2011-08-12T06:48:09","modified_gmt":"2011-08-12T11:48:09","slug":"printing-all-property-values-in-an-hbase-configuration","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2011\/07\/13\/printing-all-property-values-in-an-hbase-configuration\/","title":{"rendered":"Printing all property values in an HBase configuration"},"content":{"rendered":"<p>I&#8217;m sure there is an easier (perhaps built-in) way to do this, but for now, I wanted to document how you can print all properties for a given configuration that you load into a JVM.<\/p>\n<pre lang=\"java\" line=\"1\">\r\nimport java.util.*;\r\nimport org.apache.hadoop.hbase.*;\r\nimport org.apache.hadoop.conf.*;\r\n\r\nclass printHbase {\r\n\r\n  public static void main(String args[]) {\r\n    try {\r\n      Configuration conf = HBaseConfiguration.create();\r\n      conf.addResource(\"oradev.xml\");\r\n      Iterator it = conf.iterator();\r\n      while (it.hasNext()) {\r\n        System.out.println(it.next());\r\n      }\r\n    }\r\n    catch (Exception e) {\r\n      e.printStackTrace();\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<p>You can just run the class directly.  Below I print the first and last ten properties printed&#8230;<\/p>\n<pre lang=\"text\">\r\nemgrid01:oracle:emprod1:\/home\/oracle>java printHbase | 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\nio.map.index.skip=0\r\nio.seqfile.compress.blocksize=1000000\r\nhbase.hstore.compactionThreshold=3\r\ns3.replication=3\r\nhbase.master.port=9000\r\nwebinterface.private.actions=false\r\nftp.blocksize=67108864\r\nfs.s3.impl=org.apache.hadoop.fs.s3.S3FileSystem\r\nhbase.zookeeper.leaderport=3888\r\nfs.checkpoint.edits.dir=${fs.checkpoint.dir}\r\nhbase.master.logcleaner.plugins=org.apache.hadoop.hbase.master.TimeToLiveLogCleaner\r\nkfs.replication=3\r\nhadoop.common.configuration.version=0.21.0\r\nhbase.master.logcleaner.ttl=600000\r\nio.seqfile.local.dir=${hadoop.tmp.dir}\/io\/local\r\nfile.bytes-per-checksum=512\r\nhbase.regionserver.regionSplitLimit=2147483647\r\nfs.s3.sleepTimeSeconds=10\r\nhbase.client.write.buffer=2097152\r\nhbase.regionserver.info.port.auto=false\r\nemgrid01:oracle:emprod1:\/home\/oracle>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m sure there is an easier (perhaps built-in) way to do this, but for now, I wanted to document how you can print all properties for a given configuration that you load into a JVM. import java.util.*; import org.apache.hadoop.hbase.*; import&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2011\/07\/13\/printing-all-property-values-in-an-hbase-configuration\/\">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,31,20],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1432"}],"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=1432"}],"version-history":[{"count":9,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1432\/revisions"}],"predecessor-version":[{"id":1482,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1432\/revisions\/1482"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1432"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}