{"id":1478,"date":"2011-08-12T06:47:25","date_gmt":"2011-08-12T11:47:25","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=1478"},"modified":"2011-08-12T06:51:12","modified_gmt":"2011-08-12T11:51:12","slug":"printing-hadoop-properties","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2011\/08\/12\/printing-hadoop-properties\/","title":{"rendered":"Printing hadoop properties"},"content":{"rendered":"<p>The hadoop Configuration class implements the Iterable interface, so you can simply create a default configuration and list all properties, or pass a custom XML configuration file and print the properties from that.<\/p>\n<p>Below is a simple example.<\/p>\n<pre lang=\"java\" line=\"1\">\r\nimport java.util.*;\r\nimport org.apache.hadoop.conf.*;\r\n\r\nclass printHadoop {\r\n\r\n  public static void main(String args[]) {\r\n    Configuration conf = new Configuration();\r\n    if ( args.length == 1)\r\n      conf.addResource(args[0]);\r\n    Iterator it = conf.iterator();\r\n    while (it.hasNext()) {\r\n      System.out.println(it.next());\r\n    }\r\n  }\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The hadoop Configuration class implements the Iterable interface, so you can simply create a default configuration and list all properties, or pass a custom XML configuration file and print the properties from that. Below is a simple example. import java.util.*;&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2011\/08\/12\/printing-hadoop-properties\/\">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],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1478"}],"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=1478"}],"version-history":[{"count":3,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1478\/revisions"}],"predecessor-version":[{"id":1483,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1478\/revisions\/1483"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1478"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}