org.eclipse.smila.clusterconfig
Interface ClusterConfigService
- All Known Implementing Classes:
- SimpleClusterConfigService
public interface ClusterConfigService
Interface for cluster config service.
getAllProperties
AnyMap getAllProperties()
- Returns:
- all configured properties as AnyMap.
getClusterNodes
java.util.List<java.lang.String> getClusterNodes()
throws ClusterConfigException
- Returns:
- names of all nodes in cluster
- Throws:
ClusterConfigException - when not running in a configured cluster
getLocalHost
java.lang.String getLocalHost()
- Returns:
- the name of the local host
getZkGcInterval
long getZkGcInterval()
- Returns:
- interval for zookeeper clean up of data/log directories.
getFailSafetyLevel
long getFailSafetyLevel()
- Returns:
- number of nodes that may fail without ZooKeeper service stopping to work. '0' if no ClusterConfigService is
reachable.
isConfigured
boolean isConfigured()
- Returns:
- true, if we are running in a configured cluster, false otherwise.
getMaxScaleUp
long getMaxScaleUp()
- Returns:
- total max scale up for all workers of one node (checked by taskmanager).
getWorkerScaleUp
long getWorkerScaleUp(java.lang.String worker)
- Returns:
- scale up limit for given worker, -1 if no scale up limit is set for worker.
getWorkersWithScaleUp
java.util.Collection<java.lang.String> getWorkersWithScaleUp()
- Returns:
- all workers that have set a scale up limit.
getHttpPort
int getHttpPort(java.lang.String serviceName)
- Returns a configured http port for a specified service. Returns -1 if no port is configured or the service unknown.
getMaxRetries
long getMaxRetries()
- Returns:
- total maximum number of retries for a task.
getTimeToLive
long getTimeToLive()
- Returns:
- time before an in-progress task is rolled back when no keepAlives are sent anymore.
isResumeJobs
boolean isResumeJobs()
- Returns:
- if jobs should be resumed after restart.