{"id":1292,"date":"2013-09-03T09:10:52","date_gmt":"2013-09-03T16:10:52","guid":{"rendered":"http:\/\/blog.light42.com\/wordpress\/?p=1292"},"modified":"2013-09-25T07:44:31","modified_gmt":"2013-09-25T14:44:31","slug":"ampcamp-3-hdfs","status":"publish","type":"post","link":"http:\/\/blog.light42.com\/wordpress\/?p=1292","title":{"rendered":"AmpCamp 3 &#8211; HDFS"},"content":{"rendered":"<p><a href=\"http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2013\/09\/Hadoop-blue-200x200.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2013\/09\/Hadoop-blue-200x200.png\" alt=\"Hadoop-blue-200x200\" width=\"200\" height=\"200\" class=\"alignright size-full wp-image-1287\" srcset=\"http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2013\/09\/Hadoop-blue-200x200.png 200w, http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2013\/09\/Hadoop-blue-200x200-150x150.png 150w\" sizes=\"(max-width: 200px) 100vw, 200px\" \/><\/a><\/p>\n<p>As described in a <a href=\"http:\/\/blog.light42.com\/wordpress\/?p=1252\" title=\"AmpLab2\">previous post<\/a>, I used <strong>Cloudera<\/strong> .debs to install Hadoop\/HDFS on an Ubuntu 12.04 &#8216;Precise&#8217; single node. Now, to put some data into the HDFS system and use it. (<em>note- this did not work in a 32bit VM<\/em>)<\/p>\n<p>The Hadoop\/HDFS install consisted of two steps: obtain and install .deb <code>cdh4-repository<\/code>, which enables a suite of other packages (perhaps auto-magically updated); then use those packages to install the features you want. <\/p>\n<p><code>apt-get update<\/code> shows the Cloudera repository in the list.<br \/>\n<code><br \/>\nHit http:\/\/archive.cloudera.com precise-cdh4 Release.gpg<br \/>\nHit http:\/\/archive.cloudera.com precise-cdh4 Release<br \/>\nHit http:\/\/archive.cloudera.com precise-cdh4\/contrib Sources<br \/>\nHit http:\/\/archive.cloudera.com precise-cdh4\/contrib amd64 Packages<br \/>\nIgn http:\/\/archive.cloudera.com precise-cdh4\/contrib TranslationIndex<br \/>\nIgn http:\/\/archive.cloudera.com precise-cdh4\/contrib Translation-en_US<br \/>\nIgn http:\/\/archive.cloudera.com precise-cdh4\/contrib Translation-en<br \/>\n<\/code><\/p>\n<p>Packages look like this:<br \/>\n<a href=\"http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2013\/09\/CDH4-all-pkgs.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2013\/09\/CDH4-all-pkgs-270x300.png\" alt=\"CDH4-all-pkgs\" width=\"270\" height=\"300\" class=\"alignnone size-medium wp-image-1282\" srcset=\"http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2013\/09\/CDH4-all-pkgs-270x300.png 270w, http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2013\/09\/CDH4-all-pkgs-921x1024.png 921w, http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2013\/09\/CDH4-all-pkgs.png 1100w\" sizes=\"(max-width: 270px) 100vw, 270px\" \/><\/a><\/p>\n<p>Some quick reading shows I have at least two choices to easily interface to HDFS. One is the <a href=\"http:\/\/cloudera.github.io\/hue\/\" title=\"Apache Hue\" target=\"_blank\">hue suite<\/a>, and another is an HDFS <a href=\"http:\/\/en.wikipedia.org\/wiki\/Filesystem_in_Userspace\" title=\"FUSE\" target=\"_blank\">Fuse<\/a> interface. More options are listed on this <a href=\"http:\/\/wiki.apache.org\/hadoop\/MountableHDFS\" title=\"MountableHDFS\" target=\"_blank\">MountableHDFS page<\/a>.<\/p>\n<p>Cloudera supplies an <a href=\"http:\/\/www.cloudera.com\/content\/cloudera-content\/cloudera-docs\/CDH4\/4.2.1\/CDH4-Installation-Guide\/cdh4ig_topic_28.html\" title=\"Fuse\" target=\"_blank\">HDFS Fuse mount<\/a> with their system. Instructions on how to use the FUSE extension are <a href=\"http:\/\/www.cloudera.com\/content\/cloudera-content\/cloudera-docs\/CDH4\/4.2.1\/CDH4-Installation-Guide\/cdh4ig_topic_28.html\" title=\"Cloudera-FUSE\" target=\"_blank\">here<\/a>.<\/p>\n<p>When HDFS is running with this system (with or without FUSE) you can view a web interface at port <code>50070<\/code>. A <a href=\"http:\/\/blog.cloudera.com\/blog\/2009\/08\/hadoop-default-ports-quick-reference\/\" title=\"port-list\" target=\"_blank\">port list here<\/a>.<\/p>\n<p>after mucking with the environment a bit<br \/>\n<code><br \/>\nException in thread \"main\" java.lang.IllegalArgumentException: Invalid URI for NameNode address (check fs.defaultFS):<br \/>\n<\/code><br \/>\nI was getting an error when trying to start the secondarynamenode, that the namenode had an invalid address. so, investigating:<br \/>\n<code><br \/>\nupdate-alternatives --get-selections | grep hadoop<br \/>\nhadoop-conf                    auto     \/etc\/hadoop\/conf.empty<\/p>\n<p>less \/etc\/hadoop\/conf.empty\/core-site.xml<br \/>\n<\/code><\/p>\n<p> core-site.xml turned out to be missing the actual namenode name,<br \/>\nwhich was not apparent in the doc I was reading.. So, edit<br \/>\n<code>\/etc\/hadoop\/conf.empty\/core-site.xml<\/code> and add a name and value property xml tags. The system starts up after this change.<\/p>\n<pre>\r\n&lt;configuration&gt;\r\n &lt;property&gt;\r\n  &lt;name&gt;fs.default.name&lt;\/name&gt;\r\n  &lt;value&gt;hdfs:\/\/127.0.1.1:50070&lt;\/value&gt;\r\n &lt;\/property&gt;\r\n&lt;\/configuration&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>As described in a previous post, I used Cloudera .debs to install Hadoop\/HDFS on an Ubuntu 12.04 &#8216;Precise&#8217; single node. Now, to put some data into the HDFS system and use it. (note- this did not work in a 32bit VM) The Hadoop\/HDFS install consisted of two steps: obtain and install .deb cdh4-repository, which enables [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1292"}],"collection":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1292"}],"version-history":[{"count":16,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1292\/revisions"}],"predecessor-version":[{"id":1373,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1292\/revisions\/1373"}],"wp:attachment":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1292"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}