public class AmbariContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AmbariContext.TaskType |
Constructor and Description |
---|
AmbariContext() |
Modifier and Type | Method and Description |
---|---|
void |
createAmbariClusterResource(String clusterName,
String stackName,
String stackVersion,
SecurityType securityType) |
void |
createAmbariHostResources(long clusterId,
String hostName,
Map<String,Collection<String>> components) |
void |
createAmbariResources(ClusterTopology topology,
String clusterName,
SecurityType securityType,
String repoVersionString,
Long repoVersionId) |
void |
createAmbariServiceAndComponentResources(ClusterTopology topology,
String clusterName,
StackId stackId,
Long repositoryVersionId) |
HostRoleCommand |
createAmbariTask(long taskId,
long requestId,
long stageId,
String component,
String host,
AmbariContext.TaskType type,
boolean skipFailure) |
HostRoleCommand |
createAmbariTask(long requestId,
long stageId,
String component,
String host,
AmbariContext.TaskType type,
boolean skipFailure) |
List<ConfigurationRequest> |
createConfigurationRequests(Map<String,Object> clusterProperties) |
static ClusterController |
getClusterController() |
long |
getClusterId(String clusterName) |
String |
getClusterName(long clusterId) |
ConfigHelper |
getConfigHelper()
Gets an instance of
ConfigHelper for classes which are not
dependency injected. |
static AmbariManagementController |
getController() |
Long |
getNextRequestId() |
PersistedState |
getPersistedTopologyState() |
HostRoleCommand |
getPhysicalTask(long id) |
Collection<HostRoleCommand> |
getPhysicalTasks(Collection<Long> ids) |
static void |
init(HostRoleCommandFactory factory) |
RequestStatusResponse |
installHost(String hostName,
String clusterName,
Collection<String> skipInstallForComponents,
Collection<String> dontSkipInstallForComponents,
boolean skipFailure) |
boolean |
isClusterKerberosEnabled(long clusterId) |
boolean |
isHostRegisteredWithCluster(long clusterId,
String host) |
boolean |
isTopologyResolved(long clusterId)
Verifies if the given cluster has at least one desired configuration transitioned through
TopologyManager.INITIAL -> ....
|
void |
notifyAgentsAboutConfigsChanges(String clusterName) |
void |
persistInstallStateForUI(String clusterName,
String stackName,
String stackVersion)
Persist cluster state for the ambari UI.
|
void |
registerHostWithConfigGroup(String hostName,
ClusterTopology topology,
String groupName) |
void |
setConfigurationOnCluster(ClusterRequest clusterRequest) |
RequestStatusResponse |
startHost(String hostName,
String clusterName,
Collection<String> installOnlyComponents,
boolean skipFailure) |
void |
waitForConfigurationResolution(String clusterName,
Set<String> updatedConfigTypes)
Verifies that all desired configurations have reached the resolved state
before proceeding with the install
|
public boolean isClusterKerberosEnabled(long clusterId)
public HostRoleCommand createAmbariTask(long requestId, long stageId, String component, String host, AmbariContext.TaskType type, boolean skipFailure)
public HostRoleCommand createAmbariTask(long taskId, long requestId, long stageId, String component, String host, AmbariContext.TaskType type, boolean skipFailure)
public HostRoleCommand getPhysicalTask(long id)
public Collection<HostRoleCommand> getPhysicalTasks(Collection<Long> ids)
public void createAmbariResources(ClusterTopology topology, String clusterName, SecurityType securityType, String repoVersionString, Long repoVersionId)
public void createAmbariClusterResource(String clusterName, String stackName, String stackVersion, SecurityType securityType)
public void createAmbariServiceAndComponentResources(ClusterTopology topology, String clusterName, StackId stackId, Long repositoryVersionId)
public void createAmbariHostResources(long clusterId, String hostName, Map<String,Collection<String>> components)
public Long getNextRequestId()
public static AmbariManagementController getController()
public static ClusterController getClusterController()
public static void init(HostRoleCommandFactory factory)
public void registerHostWithConfigGroup(String hostName, ClusterTopology topology, String groupName)
public RequestStatusResponse installHost(String hostName, String clusterName, Collection<String> skipInstallForComponents, Collection<String> dontSkipInstallForComponents, boolean skipFailure)
public RequestStatusResponse startHost(String hostName, String clusterName, Collection<String> installOnlyComponents, boolean skipFailure)
public void persistInstallStateForUI(String clusterName, String stackName, String stackVersion)
clusterName
- cluster namestackName
- stack namestackVersion
- stack versionpublic List<ConfigurationRequest> createConfigurationRequests(Map<String,Object> clusterProperties)
public void setConfigurationOnCluster(ClusterRequest clusterRequest)
public void notifyAgentsAboutConfigsChanges(String clusterName)
public void waitForConfigurationResolution(String clusterName, Set<String> updatedConfigTypes) throws org.apache.ambari.server.AmbariException
clusterName
- name of the clusterupdatedConfigTypes
- set of config types that are required to be in the TOPOLOGY_RESOLVED stateorg.apache.ambari.server.AmbariException
- upon any system-level error that occurspublic boolean isTopologyResolved(long clusterId)
clusterId
- the identifier of the cluster to be checkedpublic PersistedState getPersistedTopologyState()
public boolean isHostRegisteredWithCluster(long clusterId, String host)
public long getClusterId(String clusterName) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public String getClusterName(long clusterId) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public ConfigHelper getConfigHelper()
ConfigHelper
for classes which are not
dependency injected.ConfigHelper
instance.Copyright © 2022 Apache Software Foundation. All rights reserved.