private void SetNonHARMConfigurationWithEphemeralPorts(Configuration conf) { string hostname = Org.Apache.Hadoop.Yarn.Server.MiniYARNCluster.GetHostname(); conf.Set(YarnConfiguration.RmAddress, hostname + ":0"); conf.Set(YarnConfiguration.RmAdminAddress, hostname + ":0"); conf.Set(YarnConfiguration.RmSchedulerAddress, hostname + ":0"); conf.Set(YarnConfiguration.RmResourceTrackerAddress, hostname + ":0"); WebAppUtils.SetRMWebAppHostnameAndPort(conf, hostname, 0); }