public interface ServiceComponentHost
Modifier and Type | Method and Description |
---|---|
boolean |
canBeRemoved() |
ServiceComponentHostResponse |
convertToResponse(Map<String,DesiredConfig> desiredConfigs)
Builds a
ServiceComponentHostResponse . |
ServiceComponentHostResponse |
convertToResponseStatusOnly(Map<String,DesiredConfig> desiredConfigs,
boolean collectStaleConfigsStatus) |
void |
debugDump(StringBuilder sb) |
void |
delete(DeleteHostComponentStatusMetaData deleteMetaData) |
Map<String,HostConfig> |
getActualConfigs()
Gets the actual config tags, if known.
|
long |
getClusterId()
Get the Cluster that this object maps to
|
String |
getClusterName()
Get the Cluster that this object maps to
|
HostComponentAdminState |
getComponentAdminState() |
StackId |
getDesiredStackId()
Convenience method to get the desired stack id from the service component
|
State |
getDesiredState() |
HostComponentDesiredStateEntity |
getDesiredStateEntity() |
Host |
getHost()
Get the Host this object maps to
|
String |
getHostName()
Get the Host this object maps to
|
HostState |
getHostState() |
MaintenanceState |
getMaintenanceState() |
List<Map<String,String>> |
getProcesses() |
String |
getPublicHostName()
Get the public host name this object maps to
|
ServiceComponent |
getServiceComponent()
Gets the service component.
|
String |
getServiceComponentName()
Get the ServiceComponent this object maps to
|
String |
getServiceName()
Get the Service this object maps to
|
State |
getState() |
UpgradeState |
getUpgradeState() |
String |
getVersion()
Gets the version of the component.
|
void |
handleEvent(ServiceComponentHostEvent event)
Send a ServiceComponentHostState event to the StateMachine
|
boolean |
isClientComponent() |
boolean |
isRecoveryEnabled()
Get whether recovery is enabled for
this component or not.
|
boolean |
isRestartRequired() |
boolean |
isRestartRequired(HostComponentDesiredStateEntity hostComponentDesiredStateEntity) |
HostVersionEntity |
recalculateHostVersionState()
Updates an existing
HostVersionEntity for the desired repository of
this component, or create one if it doesn't exist. |
void |
setComponentAdminState(HostComponentAdminState attribute) |
void |
setDesiredState(State state) |
void |
setMaintenanceState(MaintenanceState state) |
void |
setProcesses(List<Map<String,String>> procs) |
void |
setRestartRequired(boolean restartRequired) |
boolean |
setRestartRequiredWithoutEventPublishing(boolean restartRequired)
Set restartRequired flag for appropriate HostComponentDesiredStateEntity
|
void |
setState(State state) |
void |
setUpgradeState(UpgradeState upgradeState) |
void |
setVersion(String version)
Sets the version of the component from the stack.
|
long getClusterId()
String getClusterName()
String getServiceName()
boolean isClientComponent()
String getServiceComponentName()
String getHostName()
String getPublicHostName()
Host getHost()
boolean isRecoveryEnabled()
void handleEvent(ServiceComponentHostEvent event) throws InvalidStateTransitionException
event
- Event to handleInvalidStateTransitionException
State getDesiredState()
void setDesiredState(State state)
State getState()
void setState(State state)
String getVersion()
void setVersion(String version) throws org.apache.ambari.server.AmbariException
version
- component version (e.g. 2.2.0.0-2041)org.apache.ambari.server.AmbariException
void setUpgradeState(UpgradeState upgradeState)
upgradeState
- the upgrade stateUpgradeState getUpgradeState()
HostComponentAdminState getComponentAdminState()
void setComponentAdminState(HostComponentAdminState attribute)
ServiceComponentHostResponse convertToResponse(Map<String,DesiredConfig> desiredConfigs)
ServiceComponentHostResponse
.desiredConfigs
- the desired configurations for the cluster. Obtaining these can be
expensive and since this method operates on SCH's, it could be
called 10,000's of times when generating cluster/host responses.
Therefore, the caller should build these once and pass them in. If
null
, then this method will retrieve them at runtime,
incurring a performance penality.ServiceComponentHostResponse convertToResponseStatusOnly(Map<String,DesiredConfig> desiredConfigs, boolean collectStaleConfigsStatus)
void debugDump(StringBuilder sb)
boolean canBeRemoved()
void delete(DeleteHostComponentStatusMetaData deleteMetaData)
Map<String,HostConfig> getActualConfigs()
HostState getHostState()
void setMaintenanceState(MaintenanceState state)
state
- the maintenance stateMaintenanceState getMaintenanceState()
void setProcesses(List<Map<String,String>> procs)
procs
- a list containing a map describing each processList<Map<String,String>> getProcesses()
boolean isRestartRequired()
boolean isRestartRequired(HostComponentDesiredStateEntity hostComponentDesiredStateEntity)
void setRestartRequired(boolean restartRequired)
restartRequired
- the restartRequired flagboolean setRestartRequiredWithoutEventPublishing(boolean restartRequired)
restartRequired
- the restartRequired flag.HostComponentDesiredStateEntity getDesiredStateEntity()
ServiceComponent getServiceComponent()
null
).HostVersionEntity recalculateHostVersionState() throws org.apache.ambari.server.AmbariException
HostVersionEntity
for the desired repository of
this component, or create one if it doesn't exist.org.apache.ambari.server.AmbariException
StackId getDesiredStackId()
Copyright © 2022 Apache Software Foundation. All rights reserved.