public class Stack extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Stack.ConfigProperty
Contains a configuration property's value and attributes.
|
Constructor and Description |
---|
Stack(StackEntity stack,
AmbariManagementController ambariManagementController)
Constructor.
|
Stack(StackId stackId,
AmbariManagementController ambariManagementController) |
Stack(String name,
String version,
AmbariManagementController controller)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Collection<String> |
getAllConfigurationTypes(String service)
Get all configuration types, including excluded types for the specified service.
|
AutoDeployInfo |
getAutoDeployInfo(String component)
Obtain auto-deploy information for the specified component.
|
Cardinality |
getCardinality(String component)
Obtain the required cardinality for the specified component.
|
ComponentInfo |
getComponentInfo(String component)
Get info for the specified component.
|
Map<String,Collection<String>> |
getComponents()
Get all service components
|
Collection<String> |
getComponents(String service)
Get components contained in the stack for the specified service.
|
String |
getConditionalServiceForDependency(DependencyInfo dependency)
Get the service, if any, that a component dependency is conditional on.
|
Configuration |
getConfiguration() |
Configuration |
getConfiguration(Collection<String> services) |
Map<String,Map<String,String>> |
getConfigurationAttributes(String service,
String type)
Get config attributes for the specified service and configuration type.
|
Map<String,String> |
getConfigurationProperties(String service,
String type)
Get config properties for the specified service and configuration type.
|
Map<String,Stack.ConfigProperty> |
getConfigurationPropertiesWithMetadata(String service,
String type) |
Collection<String> |
getConfigurationTypes(String service)
Get configuration types for the specified service.
|
Configuration |
getDefaultConfig() |
Collection<DependencyInfo> |
getDependenciesForComponent(String component)
Return the dependencies specified for the given component.
|
Set<String> |
getExcludedConfigurationTypes(String service)
Get the set of excluded configuration types for this service.
|
String |
getExternalComponentConfig(String component) |
String |
getName()
Obtain stack name.
|
Collection<Stack.ConfigProperty> |
getRequiredConfigurationProperties(String service)
Get all required config properties for the specified service.
|
Collection<Stack.ConfigProperty> |
getRequiredConfigurationProperties(String service,
PropertyInfo.PropertyType propertyType)
Get required config properties for the specified service which belong to the specified property type.
|
String |
getServiceForComponent(String component)
Get the service for the specified component.
|
String |
getServiceForConfigType(String config)
Obtain the service name which corresponds to the specified configuration.
|
Optional<ServiceInfo> |
getServiceInfo(String serviceName) |
Set<String> |
getServices()
Get services contained in the stack.
|
Collection<String> |
getServicesForComponents(Collection<String> components)
Get the names of the services which contains the specified components.
|
List<String> |
getServicesForConfigType(String config) |
Map<String,Map<String,String>> |
getStackConfigurationAttributes(String type) |
Map<String,String> |
getStackConfigurationProperties(String type) |
StackId |
getStackId() |
Configuration |
getValidDefaultConfig() |
String |
getVersion()
Obtain stack version.
|
boolean |
isKerberosPrincipalNameProperty(String service,
String type,
String propertyName) |
boolean |
isMasterComponent(String component) |
boolean |
isPasswordProperty(String service,
String type,
String propertyName) |
String |
toString() |
public Stack(StackEntity stack, AmbariManagementController ambariManagementController) throws org.apache.ambari.server.AmbariException
stack
- the stack (not null
).ambariManagementController
- the management controller (not null
).org.apache.ambari.server.AmbariException
public Stack(StackId stackId, AmbariManagementController ambariManagementController) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public Stack(String name, String version, AmbariManagementController controller) throws org.apache.ambari.server.AmbariException
name
- stack nameversion
- stack versionorg.apache.ambari.server.AmbariException
- an exception occurred getting stack information
for the specified name and versionpublic String getName()
public String getVersion()
public StackId getStackId()
public Set<String> getServices()
public Collection<String> getComponents(String service)
service
- service namepublic Map<String,Collection<String>> getComponents()
public ComponentInfo getComponentInfo(String component)
component
- component namepublic Optional<ServiceInfo> getServiceInfo(String serviceName)
public Collection<String> getAllConfigurationTypes(String service)
service
- service namepublic Collection<String> getConfigurationTypes(String service)
service
- service namepublic Set<String> getExcludedConfigurationTypes(String service)
service
- service namepublic Map<String,String> getConfigurationProperties(String service, String type)
service
- service nametype
- configuration typepublic Map<String,Stack.ConfigProperty> getConfigurationPropertiesWithMetadata(String service, String type)
public Collection<Stack.ConfigProperty> getRequiredConfigurationProperties(String service)
service
- service namepublic Collection<Stack.ConfigProperty> getRequiredConfigurationProperties(String service, PropertyInfo.PropertyType propertyType)
service
- service namepropertyType
- property typepublic boolean isPasswordProperty(String service, String type, String propertyName)
public Map<String,String> getStackConfigurationProperties(String type)
public boolean isKerberosPrincipalNameProperty(String service, String type, String propertyName)
public Map<String,Map<String,String>> getConfigurationAttributes(String service, String type)
service
- service nametype
- configuration typepublic Map<String,Map<String,String>> getStackConfigurationAttributes(String type)
public String getServiceForComponent(String component)
component
- component namepublic Collection<String> getServicesForComponents(Collection<String> components)
components
- collection of componentspublic String getServiceForConfigType(String config)
config
- configuration typepublic Collection<DependencyInfo> getDependenciesForComponent(String component)
component
- component to get dependency information forpublic String getConditionalServiceForDependency(DependencyInfo dependency)
dependency
- dependency to get conditional service forpublic Cardinality getCardinality(String component)
public AutoDeployInfo getAutoDeployInfo(String component)
public boolean isMasterComponent(String component)
public Configuration getConfiguration(Collection<String> services)
public Configuration getConfiguration()
public Configuration getValidDefaultConfig()
public Configuration getDefaultConfig()
Copyright © 2022 Apache Software Foundation. All rights reserved.