public class OverriddenMetricsHostProvider extends Object implements MetricHostProvider
MetricHostProvider that can override default component host names.| Constructor and Description |
|---|
OverriddenMetricsHostProvider(Map<String,String> overriddenHosts,
MetricHostProvider metricHostProvider,
ConfigHelper configHelper) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCollectorHostName(String clusterName,
MetricsServiceProvider.MetricsService service)
Get the metrics server host name for the given cluster name.
|
String |
getCollectorPort(String clusterName,
MetricsServiceProvider.MetricsService service)
Get the metrics server port for the given cluster name.
|
Optional<String> |
getExternalHostName(String clusterName,
String componentName)
If a component is installed to a host that is managed outside of Ambari (for example OneFS) then this method will return the external hostname.
|
String |
getHostName(String clusterName,
String componentName)
Get the host name for the given cluster name and component name.
|
boolean |
isCollectorComponentLive(String clusterName,
MetricsServiceProvider.MetricsService service)
Get the status of metrics server component for the given cluster name.
|
boolean |
isCollectorHostExternal(String clusterName)
Is the collector host external to the cluster?
|
boolean |
isCollectorHostLive(String clusterName,
MetricsServiceProvider.MetricsService service)
Get the status of metrics server host for the given cluster name.
|
public OverriddenMetricsHostProvider(Map<String,String> overriddenHosts, MetricHostProvider metricHostProvider, ConfigHelper configHelper)
public Optional<String> getExternalHostName(String clusterName, String componentName)
MetricHostProvidergetExternalHostName in interface MetricHostProviderpublic boolean isCollectorHostExternal(String clusterName)
MetricHostProviderisCollectorHostExternal in interface MetricHostProviderclusterName - the cluster namepublic String getHostName(String clusterName, String componentName) throws SystemException
MetricHostProvidergetHostName in interface MetricHostProviderclusterName - the cluster namecomponentName - the component nameSystemException - if unable to get the JMX host namepublic String getCollectorHostName(String clusterName, MetricsServiceProvider.MetricsService service) throws SystemException
MetricHostProvidergetCollectorHostName in interface MetricHostProviderclusterName - the cluster nameSystemException - if unable to get the metrics server host namepublic String getCollectorPort(String clusterName, MetricsServiceProvider.MetricsService service) throws SystemException
MetricHostProvidergetCollectorPort in interface MetricHostProviderclusterName - the cluster nameSystemException - if unable to get the metrics server portpublic boolean isCollectorHostLive(String clusterName, MetricsServiceProvider.MetricsService service) throws SystemException
MetricHostProviderisCollectorHostLive in interface MetricHostProviderclusterName - the cluster nameSystemException - if unable to get the status of metrics server hostpublic boolean isCollectorComponentLive(String clusterName, MetricsServiceProvider.MetricsService service) throws SystemException
MetricHostProviderisCollectorComponentLive in interface MetricHostProviderclusterName - the cluster nameSystemException - if unable to get the status of metrics server componentCopyright © 2022 Apache Software Foundation. All rights reserved.