Service.Type
Modifier and Type | Method and Description |
---|---|
void |
addServiceComponent(ServiceComponent component) |
ServiceComponent |
addServiceComponent(String serviceComponentName) |
void |
addServiceComponents(Map<String,ServiceComponent> components) |
boolean |
canBeRemoved()
Find out whether the service and its components
are in a state that it can be removed from a cluster
|
ServiceResponse |
convertToResponse() |
void |
debugDump(StringBuilder sb) |
void |
delete(DeleteHostComponentStatusMetaData deleteMetaData) |
void |
deleteAllComponents(DeleteHostComponentStatusMetaData deleteMetaData) |
void |
deleteServiceComponent(String componentName,
DeleteHostComponentStatusMetaData deleteMetaData) |
Cluster |
getCluster() |
long |
getClusterId() |
RepositoryVersionEntity |
getDesiredRepositoryVersion() |
StackId |
getDesiredStackId() |
State |
getDesiredState() |
String |
getDisplayName() |
MaintenanceState |
getMaintenanceState() |
String |
getName() |
RepositoryVersionState |
getRepositoryState()
Gets the repository for the desired version of this service by consulting
the repository states of all known components.
|
ServiceComponent |
getServiceComponent(String componentName) |
Map<String,ServiceComponent> |
getServiceComponents() |
Set<String> |
getServiceHosts() |
boolean |
isClientOnlyService() |
boolean |
isCredentialStoreEnabled()
Get a true or false value specifying whether
credential store use is enabled for this service.
|
boolean |
isCredentialStoreRequired()
Get a true or false value specifying whether
credential store is required by this service.
|
boolean |
isCredentialStoreSupported()
Get a true or false value specifying whether
credential store is supported by this service.
|
boolean |
isKerberosEnabled()
Tests to see if Kerberos is enabled for this service using the Kerberos enabled test metadata
and the existing cluster configurations.
|
boolean |
isKerberosEnabled(Map<String,Map<String,String>> configurations)
Tests to see if Kerberos is enabled for this service using the Kerberos enabled test metadata
and the supplied configurations map.
|
protected void |
removeEntities() |
void |
setCredentialStoreEnabled(boolean credentialStoreEnabled)
Set a true or false value specifying whether this
service is to be enabled for credential store use.
|
void |
setDesiredRepositoryVersion(RepositoryVersionEntity repositoryVersionEntity) |
void |
setDesiredState(State state) |
void |
setMaintenanceState(MaintenanceState state)
Sets the maintenance state for the service
|
void |
updateServiceInfo()
Refresh Service info due to current stack
|
public void updateServiceInfo() throws org.apache.ambari.server.AmbariException
updateServiceInfo
in interface Service
org.apache.ambari.server.AmbariException
public String getDisplayName()
getDisplayName
in interface Service
public long getClusterId()
getClusterId
in interface Service
public Map<String,ServiceComponent> getServiceComponents()
getServiceComponents
in interface Service
public Set<String> getServiceHosts()
getServiceHosts
in interface Service
public void addServiceComponents(Map<String,ServiceComponent> components) throws org.apache.ambari.server.AmbariException
addServiceComponents
in interface Service
org.apache.ambari.server.AmbariException
public void addServiceComponent(ServiceComponent component) throws org.apache.ambari.server.AmbariException
addServiceComponent
in interface Service
org.apache.ambari.server.AmbariException
public ServiceComponent addServiceComponent(String serviceComponentName) throws org.apache.ambari.server.AmbariException
addServiceComponent
in interface Service
org.apache.ambari.server.AmbariException
public ServiceComponent getServiceComponent(String componentName) throws org.apache.ambari.server.AmbariException
getServiceComponent
in interface Service
org.apache.ambari.server.AmbariException
public State getDesiredState()
getDesiredState
in interface Service
public void setDesiredState(State state)
setDesiredState
in interface Service
public StackId getDesiredStackId()
getDesiredStackId
in interface Service
public RepositoryVersionEntity getDesiredRepositoryVersion()
getDesiredRepositoryVersion
in interface Service
public void setDesiredRepositoryVersion(RepositoryVersionEntity repositoryVersionEntity)
setDesiredRepositoryVersion
in interface Service
public RepositoryVersionState getRepositoryState()
getRepositoryState
in interface Service
public ServiceResponse convertToResponse()
convertToResponse
in interface Service
public Cluster getCluster()
getCluster
in interface Service
public boolean isCredentialStoreSupported()
isCredentialStoreSupported
in interface Service
public boolean isCredentialStoreRequired()
isCredentialStoreRequired
in interface Service
public boolean isCredentialStoreEnabled()
isCredentialStoreEnabled
in interface Service
public void setCredentialStoreEnabled(boolean credentialStoreEnabled)
setCredentialStoreEnabled
in interface Service
credentialStoreEnabled
- - true or falsepublic void debugDump(StringBuilder sb)
public boolean canBeRemoved()
Service
canBeRemoved
in interface Service
public void deleteAllComponents(DeleteHostComponentStatusMetaData deleteMetaData)
deleteAllComponents
in interface Service
public void deleteServiceComponent(String componentName, DeleteHostComponentStatusMetaData deleteMetaData) throws org.apache.ambari.server.AmbariException
deleteServiceComponent
in interface Service
org.apache.ambari.server.AmbariException
public boolean isClientOnlyService()
isClientOnlyService
in interface Service
public void delete(DeleteHostComponentStatusMetaData deleteMetaData)
protected void removeEntities() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public void setMaintenanceState(MaintenanceState state)
Service
setMaintenanceState
in interface Service
state
- the statepublic MaintenanceState getMaintenanceState()
getMaintenanceState
in interface Service
public boolean isKerberosEnabled()
Service
isKerberosEnabled
in interface Service
true
. if it is determined that Kerberos is enabled for this service; false
, otherwiseService.isKerberosEnabled(Map)
public boolean isKerberosEnabled(Map<String,Map<String,String>> configurations)
Service
isKerberosEnabled
in interface Service
configurations
- a map of configurations to use for the testtrue
. if it is determined that Kerberos is enabled for this service; false
, otherwiseService.isKerberosEnabled()
Copyright © 2022 Apache Software Foundation. All rights reserved.