@Test public void getComponentMappingsGetHostIfExists() { final String defaultHost = "my-default-host"; final String host = "my-host"; final List<ExtraService.ComponentMapping> componentMappings = app.createAndManageChild(createDummyExtraServiceSpec(defaultHost, null, ImmutableList.of("MY_COMPONENT|" + host))).getComponentMappings(); for (ExtraService.ComponentMapping componentMapping : componentMappings) { assertEquals(host, componentMapping.getHost()); } }
@Override @Nonnull public List<ComponentMapping> getComponentMappings() { if (componentMappings == null) { componentMappings = MutableList.of(); if (getConfig(COMPONENT_NAMES) != null) { for (String mapping : getConfig(COMPONENT_NAMES)) { componentMappings.add(new ComponentMapping(mapping, getConfig(BIND_TO))); } } } return componentMappings; }
AbstractExtraService extends BasicStartableImpl implements ExtraService { @Override @Nonnull public List<ComponentMapping> getComponentMappings() { if (componentMappings == null) { componentMappings = MutableList.of(); if (getConfig(COMPONENT_NAMES) != null) { for (String mapping : getConfig(COMPONENT_NAMES)) { componentMappings.add(new ComponentMapping(mapping, getConfig(BIND_TO))); } } } return componentMappings; } }
AbstractExtraService extends BasicStartableImpl implements ExtraService { @Override @Nonnull public List<ComponentMapping> getComponentMappings() { if (componentMappings == null) { componentMappings = MutableList.of(); if (getConfig(COMPONENT_NAMES) != null) { for (String mapping : getConfig(COMPONENT_NAMES)) { componentMappings.add(new ComponentMapping(mapping, getConfig(BIND_TO))); } } } return componentMappings; }  }
AbstractExtraService extends BasicStartableImpl implements ExtraService { @Override @Nonnull public List<ComponentMapping> getComponentMappings() { if (componentMappings == null) { componentMappings = MutableList.of(); if (getConfig(COMPONENT_NAMES) != null) { for (String mapping : getConfig(COMPONENT_NAMES)) { componentMappings.add(new ComponentMapping(mapping, getConfig(BIND_TO))); } } } return componentMappings; }  @Override @Deprecated Map<String, Map> getAmbariConfig(); @Override Map<String, Map> getAmbariConfig(AmbariCluster ambariCluster); @Override @Nonnull List<ComponentMapping> getComponentMappings(); }
AbstractExtraService extends BasicStartableImpl implements ExtraService { @Override @Nonnull public List<ComponentMapping> getComponentMappings() { if (componentMappings == null) { componentMappings = MutableList.of(); if (getConfig(COMPONENT_NAMES) != null) { for (String mapping : getConfig(COMPONENT_NAMES)) { componentMappings.add(new ComponentMapping(mapping, getConfig(BIND_TO))); } } } return componentMappings; }  @Override @Deprecated Map<String, Map> getAmbariConfig(); @Override Map<String, Map> getAmbariConfig(AmbariCluster ambariCluster); @Override @Nonnull List<ComponentMapping> getComponentMappings();  }