wiki:jazz/09-03-30

2009-03-30

  • Hadoop 與 DRBL 整合時,常遇到 storageID 無法識別的困擾,遇到這種問題的時候,就直接給定 hostname 當 storageID 就可以看到全部的 DataNode 都加進 HDFS 了
    • 首先,為了日後重開機以後,維持 NameNode 的 namenodeID 不變,我們把 namenode 的資料存在 /home/hdfsadm 中。修改 /etc/hadoop/hadoop-site.xml 的 dfs.name.dir 來達成這個目標。至於原本安裝 hadoop 套件時設定的 localhost 則應該要改成 DRBL 對內的 IP 位址(這裡以 192.168.100.254 為例)。另外,也把 /etc/hadoop/slaves 修改成目前 DRBL Client 的 IP 範圍。
      jazz@drbl:~$ cat /etc/hadoop/hadoop-site.xml
      <?xml version="1.0"?>
      <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
      
      <!-- Put site-specific property overrides in this file. -->
      
      <configuration>
        <property>
          <name>fs.default.name</name>
          <value>192.168.100.254:9000</value>
          <description>
            The name of the default file system. Either the literal string
            "local" or a host:port for NDFS.
          </description>
        </property>
        <property>
          <name>mapred.job.tracker</name>
          <value>192.168.100.254:9001</value>
          <description>
          The host and port that the MapReduce job tracker runs at. If
          "local", then jobs are run in-process as a single map and
          reduce task.
          </description>
        </property>
        <property>
          <name>dfs.name.dir</name>
          <value>/home/hdfsadm/dfs/name</value>
          <description>
            Determines where on the local filesystem the DFS name node
            should store the name table.  If this is a comma-delimited list
            of directories then the name table is replicated in all of the
            directories, for redundancy.
          </description>
        </property>
      </configuration>
      jazz@drbl:~$ cat /etc/hadoop/slaves
      192.168.100.1
      192.168.100.2
      ...
      192.168.100.30
      
    • 接著以 dcs 的功能執行 re-deploy 好讓每一個 nodes 的設定同步。然後只做一次 namenode 格式化,以後就不需要再格式化了。再用 dcs 做 DRBL Client 的 reboot 或 Wake-on-LAN。
      jazz@drbl:~$ sudo /opt/drbl/sbin/dcs
      jazz@drbl:~$ sudo /opt/hadoop/bin/hadoop namenode -format
      jazz@drbl:~$ sudo /opt/drbl/sbin/dcs
      
    • 最後,用 start-all.sh 與 stop-all.sh 確認已停掉目前正在執行的 Hadoop 執行緒。用 dsh 把每台 DRBL Client 目前 /tmp 目錄下的 dfs storageID 是正確的。
      hdfsadm@drbl:~$ /opt/hadoop/bin/start-all.sh
      hdfsadm@drbl:~$ /opt/hadoop/bin/stop-all.sh
      hdfsadm@drbl:~$ dsh -a "echo \"storageID=\$(hostname)\" >> /tmp/hadoop-hdfsadm/dfs/data/current/VERSION"
      hdfsadm@drbl:~$ /opt/hadoop/bin/start-all.sh
      

DRBL-Hadoop-Live

  • 預設執行 /opt/drbl/sbin/create-drbl-live-by-pkg
    /opt/drbl/sbin/create-drbl-live -l en -d lenny -p xfce -k iceweasel-l10n-zh-tw x-ttcidfont-conf ttf-arphic-newsung scim-chewing scim-tables-zh im-switch mlterm mlterm-im-scim discover1 xresprobe mdetect grandr boinc-client dnsutils bind9-host syslogd gparted ntfsprogs hfsutils hfsprogs jfsutils xfsprogs xfsdump reiserfsprogs reiser4progs parted 
    ntfs-3g dosfstools mtools lvm2 mbr -b unstable -e experimental
    
Last modified 15 years ago Last modified on Mar 30, 2009, 4:22:02 PM