@Validated
public interface ClusterService
| Modifier and Type | Method and Description |
|---|---|
void |
addCommandsForCluster(java.lang.String id,
java.util.List<java.lang.String> commandIds)
Add commands to the cluster.
|
void |
addConfigsForCluster(java.lang.String id,
java.util.Set<java.lang.String> configs)
Add configuration files to the cluster.
|
void |
addDependenciesForCluster(java.lang.String id,
java.util.Set<java.lang.String> dependencies)
Add dependency files to the cluster.
|
void |
addTagsForCluster(java.lang.String id,
java.util.Set<java.lang.String> tags)
Add tags to the cluster.
|
java.util.List<Cluster> |
chooseClusterForJobRequest(JobRequest jobRequest)
Get the clusters on which the job can be run.
|
java.lang.String |
createCluster(Cluster cluster)
Create new cluster configuration.
|
void |
deleteAllClusters()
Delete all clusters from database.
|
void |
deleteCluster(java.lang.String id)
Delete a cluster configuration by id.
|
Cluster |
getCluster(java.lang.String id)
Get the cluster configuration by id.
|
org.springframework.data.domain.Page<Cluster> |
getClusters(java.lang.String name,
java.util.Set<ClusterStatus> statuses,
java.util.Set<java.lang.String> tags,
java.util.Date minUpdateTime,
java.util.Date maxUpdateTime,
org.springframework.data.domain.Pageable page)
Get cluster info for various parameters.
|
java.util.List<Command> |
getCommandsForCluster(java.lang.String id,
java.util.Set<CommandStatus> statuses)
Get the set of commands associated with the cluster with given id.
|
java.util.Set<java.lang.String> |
getConfigsForCluster(java.lang.String id)
Get the set of configuration files associated with the cluster with given
id.
|
java.util.Set<java.lang.String> |
getDependenciesForCluster(java.lang.String id)
Get the set of dependency files associated with the cluster with given id.
|
java.util.Set<java.lang.String> |
getTagsForCluster(java.lang.String id)
Get the set of tags associated with the cluster with given
id.
|
void |
patchCluster(java.lang.String id,
com.github.fge.jsonpatch.JsonPatch patch)
Patch a cluster with the given json patch.
|
void |
removeAllCommandsForCluster(java.lang.String id)
Remove all commands from the cluster.
|
void |
removeAllConfigsForCluster(java.lang.String id)
Remove all configuration files from the cluster.
|
void |
removeAllDependenciesForCluster(java.lang.String id)
Remove all dependency files from the cluster.
|
void |
removeAllTagsForCluster(java.lang.String id)
Remove all tags from the cluster.
|
void |
removeCommandForCluster(java.lang.String id,
java.lang.String cmdId)
Remove a command from the cluster.
|
void |
removeDependencyForCluster(java.lang.String id,
java.lang.String dependency)
Remove a dependency file from the cluster.
|
void |
removeTagForCluster(java.lang.String id,
java.lang.String tag)
Remove a tag from the cluster.
|
void |
setCommandsForCluster(java.lang.String id,
java.util.List<java.lang.String> commandIds)
Update the set of command files associated with the cluster with
given id.
|
void |
updateCluster(java.lang.String id,
Cluster updateCluster)
Update a cluster.
|
void |
updateConfigsForCluster(java.lang.String id,
java.util.Set<java.lang.String> configs)
Update the set of configuration files associated with the cluster with
given id.
|
void |
updateDependenciesForCluster(java.lang.String id,
java.util.Set<java.lang.String> dependencies)
Update the set of dependency files associated with the cluster with given
id.
|
void |
updateTagsForCluster(java.lang.String id,
java.util.Set<java.lang.String> tags)
Update the set of tags associated with the cluster with
given id.
|
java.lang.String createCluster(@NotNull(message="No cluster entered. Unable to create.")
Cluster cluster)
throws GenieException
cluster - The cluster to createGenieException - if there is an errorCluster getCluster(@NotBlank(message="No id entered. Unable to get.") java.lang.String id) throws GenieException
id - unique id of cluster configuration to returnGenieException - For any errororg.springframework.data.domain.Page<Cluster> getClusters(java.lang.String name, java.util.Set<ClusterStatus> statuses, java.util.Set<java.lang.String> tags, java.util.Date minUpdateTime, java.util.Date maxUpdateTime, org.springframework.data.domain.Pageable page)
name - cluster namestatuses - valid types - Types.ClusterStatustags - tags allocated to this clusterminUpdateTime - min time when cluster configuration was updatedmaxUpdateTime - max time when cluster configuration was updatedpage - The page to getjava.util.List<Cluster> chooseClusterForJobRequest(@NotNull(message="JobRequest object is null. Unable to continue.") JobRequest jobRequest) throws GenieException
jobRequest - The request to runt he job. Not null.GenieException - if there is an errorvoid updateCluster(@NotBlank(message="No cluster id entered. Unable to update.")
java.lang.String id,
@NotNull(message="No cluster information entered. Unable to update.")
Cluster updateCluster)
throws GenieException
id - The id of the cluster to updateupdateCluster - The information to update the cluster withGenieException - if there is an errorvoid patchCluster(@NotBlank
java.lang.String id,
@NotNull
com.github.fge.jsonpatch.JsonPatch patch)
throws GenieException
id - The id of the cluster to updatepatch - The json patch to use to update the given clusterGenieException - if there is an errorvoid deleteAllClusters()
throws GenieException
GenieException - if there is an errorvoid deleteCluster(@NotBlank(message="No id entered unable to delete.")
java.lang.String id)
throws GenieException
id - unique id for cluster to deleteGenieException - if there is an errorvoid addConfigsForCluster(@NotBlank(message="No cluster id entered. Unable to add configurations.")
java.lang.String id,
@NotEmpty(message="No configuration files entered. Unable to add.")
java.util.Set<java.lang.String> configs)
throws GenieException
id - The id of the cluster to add the configuration file to. Not
null/empty/blank.configs - The configuration files to add. Not null/empty.GenieException - if there is an errorjava.util.Set<java.lang.String> getConfigsForCluster(@NotBlank(message="No cluster id sent. Cannot retrieve configurations.")
java.lang.String id)
throws GenieException
id - The id of the cluster to get the configuration files for. Not
null/empty/blank.GenieException - if there is an errorvoid updateConfigsForCluster(@NotBlank(message="No cluster id entered. Unable to update configurations.")
java.lang.String id,
@NotEmpty(message="No configs entered. Unable to update.")
java.util.Set<java.lang.String> configs)
throws GenieException
id - The id of the cluster to update the configuration files for.
Not null/empty/blank.configs - The configuration files to replace existing configurations
with. Not null/empty.GenieException - if there is an errorvoid removeAllConfigsForCluster(@NotBlank(message="No cluster id entered. Unable to remove configs.")
java.lang.String id)
throws GenieException
id - The id of the cluster to remove the configuration file from.
Not null/empty/blank.GenieException - if there is an errorvoid addDependenciesForCluster(@NotBlank(message="No cluster id entered. Unable to add dependencies.")
java.lang.String id,
@NotEmpty(message="No dependencies entered. Unable to add dependencies.")
java.util.Set<java.lang.String> dependencies)
throws GenieException
id - The id of the cluster to add the dependency file to. Not
null/empty/blank.dependencies - The dependency files to add. Not null.GenieException - if there is an errorjava.util.Set<java.lang.String> getDependenciesForCluster(@NotBlank(message="No cluster id entered. Unable to get dependencies.")
java.lang.String id)
throws GenieException
id - The id of the cluster to get the dependency files for. Not
null/empty/blank.GenieException - if there is an errorvoid updateDependenciesForCluster(@NotBlank(message="No cluster id entered. Unable to update dependencies.")
java.lang.String id,
@NotNull(message="No dependencies entered. Unable to update.")
java.util.Set<java.lang.String> dependencies)
throws GenieException
id - The id of the cluster to update the dependency files for. Not
null/empty/blank.dependencies - The dependency files to replace existing dependencies with. Not null/empty.GenieException - if there is an errorvoid removeAllDependenciesForCluster(@NotBlank(message="No cluster id entered. Unable to remove dependencies.")
java.lang.String id)
throws GenieException
id - The id of the cluster to remove the configuration file
from. Not null/empty/blank.GenieException - if there is an errorvoid removeDependencyForCluster(@NotBlank(message="No cluster id entered. Unable to remove dependency.")
java.lang.String id,
@NotBlank(message="No dependency entered. Unable to remove dependency.")
java.lang.String dependency)
throws GenieException
id - The id of the cluster to remove the dependency file from. Not
null/empty/blank.dependency - The dependency file to remove. Not null/empty/blank.GenieException - if there is an errorvoid addTagsForCluster(@NotBlank(message="No cluster id entered. Unable to add tags.")
java.lang.String id,
@NotEmpty(message="No tags entered. Unable to add to tags.")
java.util.Set<java.lang.String> tags)
throws GenieException
id - The id of the cluster to add the tags to. Not
null/empty/blank.tags - The tags to add. Not null/empty.GenieException - if there is an errorjava.util.Set<java.lang.String> getTagsForCluster(@NotBlank(message="No cluster id sent. Cannot retrieve tags.")
java.lang.String id)
throws GenieException
id - The id of the cluster to get the tags for. Not
null/empty/blank.GenieException - if there is an errorvoid updateTagsForCluster(@NotBlank(message="No cluster id entered. Unable to update tags.")
java.lang.String id,
@NotEmpty(message="No tags entered. Unable to update.")
java.util.Set<java.lang.String> tags)
throws GenieException
id - The id of the cluster to update the tags for.
Not null/empty/blank.tags - The tags to replace existing tags
with. Not null/empty.GenieException - if there is an errorvoid removeAllTagsForCluster(@NotBlank(message="No cluster id entered. Unable to remove tags.")
java.lang.String id)
throws GenieException
id - The id of the cluster to remove the tags from.
Not null/empty/blank.GenieException - if there is an errorvoid removeTagForCluster(@NotBlank(message="No cluster id entered. Unable to remove tag.")
java.lang.String id,
@NotBlank(message="No tag entered. Unable to remove.")
java.lang.String tag)
throws GenieException
id - The id of the cluster to remove the tag from. Not
null/empty/blank.tag - The tag to remove. Not null/empty/blank.GenieException - if there is an errorvoid addCommandsForCluster(@NotBlank(message="No cluster id entered. Unable to add commands.")
java.lang.String id,
@NotEmpty(message="No command ids entered. Unable to add commands.")
java.util.List<java.lang.String> commandIds)
throws GenieException
id - The id of the cluster to add the command file to. Not
null/empty/blank.commandIds - The ids of the commands to add. Not null/empty.GenieException - if there is an errorjava.util.List<Command> getCommandsForCluster(@NotBlank(message="No cluster id entered. Unable to get commands.") java.lang.String id, java.util.Set<CommandStatus> statuses) throws GenieException
id - The id of the cluster to get the commands for. Not
null/empty/blank.statuses - The statuses to get commands forGenieException - if there is an errorvoid setCommandsForCluster(@NotBlank(message="No cluster id entered. Unable to update commands.")
java.lang.String id,
@NotNull(message="No command ids entered. Unable to update commands.")
java.util.List<java.lang.String> commandIds)
throws GenieException
id - The id of the cluster to update the command files for. Not
null/empty/blank.commandIds - The ids of the commands to replace existing
commands with. Not null/empty.GenieException - if there is an errorvoid removeAllCommandsForCluster(@NotBlank(message="No cluster id entered. Unable to remove commands.")
java.lang.String id)
throws GenieException
id - The id of the cluster to remove the commands from. Not
null/empty/blank.GenieException - if there is an errorvoid removeCommandForCluster(@NotBlank(message="No cluster id entered. Unable to remove command.")
java.lang.String id,
@NotBlank(message="No command id entered. Unable to remove command.")
java.lang.String cmdId)
throws GenieException
id - The id of the cluster to remove the command from. Not
null/empty/blank.cmdId - The id of the command to remove. Not null/empty/blank.GenieException - if there is an error