{"id":1356,"date":"2016-07-06T15:02:54","date_gmt":"2016-07-06T15:02:54","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=1356"},"modified":"2016-07-06T15:02:54","modified_gmt":"2016-07-06T15:02:54","slug":"reading-config-from-xml-file","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/reading-config-from-xml-file\/","title":{"rendered":"Reading Config from XML File"},"content":{"rendered":"<p>public class MapReduce<br \/>\n{<br \/>\n   public static void main(String[] args)<br \/>\n  {<br \/>\n\tFile f = new File(&#8220;\/usr\/lib\/hadoop\/etc\/hadoop\/core-site.xml&#8221;);<br \/>\n\tConfiguration conf = new Configuration();<br \/>\n        conf.addResource(new Path(&#8220;\/usr\/lib\/hadoop\/etc\/hadoop\/hdfs-site.xml&#8221;));<\/p>\n<p>        for (Entry<String, String> entry : conf)<br \/>\n        {<br \/>\n\t   System.out.println(&#8220;Key &#8221; + entry.getKey());<br \/>\n\t   System.out.println(&#8220;Value &#8221; + entry.getValue());<br \/>\n \t}<br \/>\n }<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>public class MapReduce { public static void main(String[] args) { File f = new File(&#8220;\/usr\/lib\/hadoop\/etc\/hadoop\/core-site.xml&#8221;); Configuration conf = new Configuration(); conf.addResource(new Path(&#8220;\/usr\/lib\/hadoop\/etc\/hadoop\/hdfs-site.xml&#8221;)); for (Entry entry : conf) { System.out.println(&#8220;Key &#8221; + entry.getKey()); System.out.println(&#8220;Value &#8221; + entry.getValue()); } } }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[151],"tags":[],"class_list":["post-1356","post","type-post","status-publish","format-standard","hentry","category-hadoop"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/1356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=1356"}],"version-history":[{"count":1,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/1356\/revisions"}],"predecessor-version":[{"id":1357,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/1356\/revisions\/1357"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=1356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=1356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=1356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}