code: public static String getLocalNodeName(AlluxioConfiguration conf) {
      switch (CommonUtils.PROCESS_TYPE.get()) {
        case JOB_MASTER:
          if (conf.isSet(PropertyKey.JOB_MASTER_HOSTNAME)) {
            return conf.get(PropertyKey.JOB_MASTER_HOSTNAME);
          }
          break;
        case JOB_WORKER:
          if (conf.isSet(PropertyKey.JOB_WORKER_HOSTNAME)) {
            return conf.get(PropertyKey.JOB_WORKER_HOSTNAME);
          }
          break;
        case CLIENT:
          if (conf.isSet(PropertyKey.USER_HOSTNAME)) {
            return conf.get(PropertyKey.USER_HOSTNAME);
          }
          break;
        case MASTER:
          if (conf.isSet(PropertyKey.MASTER_HOSTNAME)) {
            return conf.get(PropertyKey.MASTER_HOSTNAME);
          }
          break;
        case WORKER:
          if (conf.isSet(PropertyKey.WORKER_HOSTNAME)) {
            return conf.get(PropertyKey.WORKER_HOSTNAME);
          }
          break;
        default:
          break;
      }
      return getLocalHostName((int) conf.getMs(PropertyKey.NETWORK_HOST_RESOLUTION_TIMEOUT_MS));
    }
docs: Gets a local node name from configuration if it is available, falling back on localhost lookup.
  
  @param conf Alluxio configuration
  @return the local node name