public abstract class AbstractProviderModule extends Object implements ProviderModule, ResourceProviderObserver, JMXHostProvider, MetricHostProvider, MetricsServiceProvider
MetricsServiceProvider.MetricsService| Modifier and Type | Field and Description |
|---|---|
protected AmbariEventPublisher |
eventPublisher
Used to respond to the following events:
ClusterConfigChangedEvent |
protected AmbariManagementController |
managementController |
| Constructor and Description |
|---|
AbstractProviderModule()
Create a default provider module.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createPropertyProviders(Resource.Type type) |
protected abstract ResourceProvider |
createResourceProvider(Resource.Type type) |
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.
|
String |
getHostName(String clusterName,
String componentName)
Get the host name for the given cluster name and component name.
|
Set<String> |
getHostNames(String clusterName,
String componentName)
Get the JMX host names for the given cluster name and component name.
|
String |
getJMXProtocol(String clusterName,
String componentName)
Get the protocol for the specified cluster name and component.
|
String |
getJMXRpcMetricTag(String clusterName,
String componentName,
String port)
Get the rpc tag for the specified cluster name, component and port number
|
MetricsServiceProvider.MetricsService |
getMetricsServiceType()
Get type of Metrics system installed.
|
String |
getPort(String clusterName,
String componentName,
String hostName,
boolean httpsEnabled)
Get the port for the specified cluster name and component.
|
List<PropertyProvider> |
getPropertyProviders(Resource.Type type)
Get the list of property providers for the given resource type.
|
String |
getPublicHostName(String clusterName,
String hostName) |
ResourceProvider |
getResourceProvider(Resource.Type type)
Get a resource adapter for the given resource type.
|
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.
|
void |
onConfigurationChangedEvent(ClusterConfigChangedEvent event)
Handles
ClusterConfigChangedEvent which means that some caches
should invalidate. |
protected void |
putPropertyProviders(Resource.Type type,
List<PropertyProvider> providers) |
protected void |
putResourceProvider(Resource.Type type,
ResourceProvider resourceProvider) |
protected void |
registerResourceProvider(Resource.Type type) |
void |
update(ResourceProviderEvent event)
Update this observer with an event from a resource provider.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExternalHostName@Inject protected AmbariManagementController managementController
@Inject protected AmbariEventPublisher eventPublisher
public AbstractProviderModule()
public ResourceProvider getResourceProvider(Resource.Type type)
ProviderModulegetResourceProvider in interface ProviderModuletype - the resource typepublic List<PropertyProvider> getPropertyProviders(Resource.Type type)
ProviderModulegetPropertyProviders in interface ProviderModuletype - the resource typepublic void update(ResourceProviderEvent event)
ResourceProviderObserverupdate in interface ResourceProviderObserverevent - the eventpublic MetricsServiceProvider.MetricsService getMetricsServiceType()
getMetricsServiceType in interface MetricsServiceProviderpublic 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 boolean isCollectorHostExternal(String clusterName)
MetricHostProviderisCollectorHostExternal in interface MetricHostProviderclusterName - the cluster 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 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 getPublicHostName(String clusterName, String hostName)
getPublicHostName in interface JMXHostProviderpublic Set<String> getHostNames(String clusterName, String componentName)
JMXHostProvidergetHostNames in interface JMXHostProviderclusterName - the cluster namecomponentName - the component namepublic 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 componentpublic String getPort(String clusterName, String componentName, String hostName, boolean httpsEnabled)
JMXHostProvidergetPort in interface JMXHostProviderclusterName - the cluster namecomponentName - the component namehostName - the component hostNamehttpsEnabled - https enabledprotected abstract ResourceProvider createResourceProvider(Resource.Type type)
protected void registerResourceProvider(Resource.Type type)
protected void putResourceProvider(Resource.Type type, ResourceProvider resourceProvider)
protected void putPropertyProviders(Resource.Type type, List<PropertyProvider> providers)
protected void createPropertyProviders(Resource.Type type)
public String getJMXProtocol(String clusterName, String componentName)
JMXHostProvidergetJMXProtocol in interface JMXHostProviderclusterName - the cluster namecomponentName - the component namepublic String getJMXRpcMetricTag(String clusterName, String componentName, String port)
JMXHostProvidergetJMXRpcMetricTag in interface JMXHostProviderclusterName - the cluster namecomponentName - the componentName nameport - the port numberpublic void onConfigurationChangedEvent(ClusterConfigChangedEvent event)
ClusterConfigChangedEvent which means that some caches
should invalidate.event - the change event.Copyright © 2022 Apache Software Foundation. All rights reserved.