@Test public void testGetMasterHostname_yarnResourceManagerConf() { CacheConfig.setResourceManagerAddress(conf, TEST_YARN_RESOURCEMANAGER_ADDRESS); final String hostname = ClusterUtil.getMasterHostname(conf); assertEquals(hostname, TEST_YARN_RESOURCEMANAGER_HOSTNAME, "Unexpected hostname!"); }
public static String getMasterHostname(Configuration conf) { log.debug("Trying master.hostname"); String host = CacheConfig.getCoordinatorHostName(conf); if (host != null) { return host; } log.debug("Trying yarn.resourcemanager.address"); host = CacheConfig.getResourceManagerAddress(conf); if (host != null) { return host.contains(":") ? host.substring(0, host.indexOf(":")) : host; } log.debug("No hostname found in etc/*-site.xml, returning localhost"); return "localhost"; }
ClusterUtil { public static String getMasterHostname(Configuration conf) { log.debug("Trying master.hostname"); String host = CacheConfig.getCoordinatorHostName(conf); if (host != null) { return host; } log.debug("Trying yarn.resourcemanager.address"); host = CacheConfig.getResourceManagerAddress(conf); if (host != null) { return host.contains(":") ? host.substring(0, host.indexOf(":")) : host; } log.debug("No hostname found in etc/*-site.xml, returning localhost"); return "localhost"; } }
ClusterUtil { public static String getMasterHostname(Configuration conf) { log.debug("Trying master.hostname"); String host = CacheConfig.getCoordinatorHostName(conf); if (host != null) { return host; } log.debug("Trying yarn.resourcemanager.address"); host = CacheConfig.getResourceManagerAddress(conf); if (host != null) { return host.contains(":") ? host.substring(0, host.indexOf(":")) : host; } log.debug("No hostname found in etc/*-site.xml, returning localhost"); return "localhost"; } private  ClusterUtil(); }
ClusterUtil { public static String getMasterHostname(Configuration conf) { log.debug("Trying master.hostname"); String host = CacheConfig.getCoordinatorHostName(conf); if (host != null) { return host; } log.debug("Trying yarn.resourcemanager.address"); host = CacheConfig.getResourceManagerAddress(conf); if (host != null) { return host.contains(":") ? host.substring(0, host.indexOf(":")) : host; } log.debug("No hostname found in etc/*-site.xml, returning localhost"); return "localhost"; } private  ClusterUtil(); static String getMasterHostname(Configuration conf); static Configuration applyRubixSiteConfig(Configuration conf); static Set<MetricsReporterType> getMetricsReporters(Configuration configuration); }
ClusterUtil { public static String getMasterHostname(Configuration conf) { log.debug("Trying master.hostname"); String host = CacheConfig.getCoordinatorHostName(conf); if (host != null) { return host; } log.debug("Trying yarn.resourcemanager.address"); host = CacheConfig.getResourceManagerAddress(conf); if (host != null) { return host.contains(":") ? host.substring(0, host.indexOf(":")) : host; } log.debug("No hostname found in etc/*-site.xml, returning localhost"); return "localhost"; } private  ClusterUtil(); static String getMasterHostname(Configuration conf); static Configuration applyRubixSiteConfig(Configuration conf); static Set<MetricsReporterType> getMetricsReporters(Configuration configuration); static volatile AtomicReference<Boolean> rubixSiteExists; }