Change IP/Hostname on a Cloudera Cluster

  1. Change the hostname:
    /etc/hosts
    /etc/sysconfig/networkhome
    /etc/sysconfig/network-scripts/ifcfg-eth0   # or whatever is your network interface
  2. cd /etc/hadoop
  3. find .   | xargs grep -i myhostname | cut -d”:” -f1 | uniq -c
    3 ./conf.cloudera.hdfs1/hdfs-site.xml
    1 ./conf.cloudera.hdfs1/core-site.xml
    3 ./conf.cloudera.yarn1/hdfs-site.xml
    5 ./conf.cloudera.yarn1/yarn-site.xml
    1 ./conf.cloudera.yarn1/core-site.xml
    2 ./conf.cloudera.yarn1/mapred-site.xml
    3 ./conf.cloudera.mapreduce
    1 /hdfs-site.xml
    1 ./conf.cloudera.mapreduce1/core-site.xml
    1 ./conf.cloudera.mapreduce1/mapred-site.xml
  4. Edit each occurrences in all the files
  5. Loop Steps 3 and 4  on all the hadoop animals config directories
    ex:-  /etc/hbase, /etc/hive, /etc/oozie, /etc/sqoop /etc/sqoop2
  6. Repeat the above steps on all the Nodes where ever IP/Hostname  needs a change.
  7. Stop Cloudera manager:
    service cloudera-scm-agent stop
    service cloudera-scm-server stop
    service cloudera-scm-server-db stop
  8. Start Cloudera Manager:
    service cloudera-scm-server-db start
    service cloudera-scm-server start
    service cloudera-scm-agent start
  9. Re-start Cloudera Cluster from Cloudera Manager –> Actions –> Re-Start
Advertisements