code: public static void setAddress(JobConf conf, String key,
        InetSocketAddress address) {
      if (address == null) {
        conf.unset(key);
        return;
      }
      String addrStr = address.getHostName() + ":" + address.getPort();
      conf.set(key, addrStr);
    }
docs: Serialize InetSocketAddress to String and saves in given conf
  @param conf job conf
  @param key name of entry
  @param address address to save