code: public void updateZooKeeper(String serviceName, String instance) throws IOException {
      Avatar avatar = avatarnode.getAvatar();
      if (avatar != Avatar.ACTIVE) {
        throw new IOException("Cannot update ZooKeeper information to point to " +
        		"the AvatarNode in Standby mode");
      }
      AvatarNodeZkUtil.updateZooKeeper(originalConf, conf, true, serviceName, instance);
    }
docs: /*
  This method tries to update the information in ZooKeeper
  For every address of the NameNode it is being run for
  (fs.default.name, dfs.namenode.dn-address, dfs.namenode.http.address)
  if they are present.
  It also creates information for aliases in ZooKeeper for lists of strings
  in fs.default.name.aliases, dfs.namenode.dn-address.aliases and
  dfs.namenode.http.address.aliases
  
  Each address it transformed to the address of the zNode to be created by
  substituting all . and : characters to /. The slash is also added in the
  front to make it a valid zNode address.
  So dfs.domain.com:9000 will be /dfs/domain/com/9000
  
  If any part of the path does not exist it is created automatically