Package com.netflix.genie.client
Class ClusterClient
- java.lang.Object
- 
- com.netflix.genie.client.ClusterClient
 
- 
 public class ClusterClient extends java.lang.ObjectClient library for the Cluster Service.- Since:
- 3.0.0
 
- 
- 
Constructor SummaryConstructors Constructor Description ClusterClient(@NotEmpty java.lang.String url, java.util.List<okhttp3.Interceptor> interceptors, GenieNetworkConfiguration genieNetworkConfiguration)Deprecated.ClusterClient(@NotNull retrofit2.Retrofit retrofit)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddCommandsToCluster(java.lang.String clusterId, java.util.List<java.lang.String> commandIds)Method to add commands to a cluster.voidaddConfigsToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> configs)Method to add configs to a cluster.voidaddDependenciesToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> dependencies)Method to add dependencies to a cluster.voidaddTagsToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> tags)Method to add tags to a cluster.java.lang.StringcreateCluster(Cluster cluster)Create a cluster ing genie.voiddeleteAllClusters()Method to delete all clusters from Genie.voiddeleteCluster(java.lang.String clusterId)Method to delete a cluster from Genie.ClustergetCluster(java.lang.String clusterId)Method to get a Cluster from Genie.java.util.List<Cluster>getClusters()Method to get a list of all the clusters.java.util.List<Cluster>getClusters(java.lang.String name, java.util.List<java.lang.String> statusList, java.util.List<java.lang.String> tagList, java.lang.Long minUpdateTime, java.lang.Long maxUpdateTime)java.util.List<Cluster>getClusters(java.lang.String name, java.util.List<java.lang.String> statusList, java.util.List<java.lang.String> tagList, java.lang.Long minUpdateTime, java.lang.Long maxUpdateTime, @Min(1L) java.lang.Integer pageSize, SortAttribute sortAttribute, SortDirection sortDirection, @Min(0L) java.lang.Integer pageIndex)Method to get a list of all the clusters from Genie for the query parameters specified.java.util.List<Command>getCommandsForCluster(java.lang.String clusterId)Method to get all the commands for a cluster.java.util.Set<java.lang.String>getConfigsForCluster(java.lang.String clusterId)Method to get all the configs for a cluster.java.util.Set<java.lang.String>getDependenciesForCluster(java.lang.String clusterId)Method to get all the dependency files for an cluster.java.util.Set<java.lang.String>getTagsForCluster(java.lang.String clusterId)Method to get all the tags for a cluster.voidpatchCluster(java.lang.String clusterId, com.github.fge.jsonpatch.JsonPatch patch)Method to patch a cluster using json patch instructions.voidremoveAllCommandsForCluster(java.lang.String clusterId)Remove all commands for this cluster.voidremoveAllConfigsForCluster(java.lang.String clusterId)Remove all configs for this cluster.voidremoveAllDependenciesForCluster(java.lang.String clusterId)Remove all dependencies for this cluster.voidremoveAllTagsForCluster(java.lang.String clusterId)Remove all tags for this cluster.voidremoveCommandFromCluster(java.lang.String clusterId, java.lang.String commandId)Remove a command from a cluster.voidremoveTagFromCluster(java.lang.String clusterId, java.lang.String tag)Remove a tag from a cluster.voidupdateCluster(java.lang.String clusterId, Cluster cluster)Method to updated a cluster.voidupdateCommandsForCluster(java.lang.String clusterId, java.util.List<java.lang.String> commandIds)Method to update commands for a cluster.voidupdateConfigsForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> configs)Method to update configs for a cluster.voidupdateDependenciesForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> dependencies)Method to update dependencies for a cluster.voidupdateTagsForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> tags)Method to update tags for a cluster.
 
- 
- 
- 
Constructor Detail- 
ClusterClientpublic ClusterClient(@NotNull @NotNull retrofit2.Retrofit retrofit)Constructor.- Parameters:
- retrofit- The configured- Retrofitclient to a Genie server
 
 - 
ClusterClient@Deprecated public ClusterClient(@NotEmpty @NotEmpty java.lang.String url, @Nullable java.util.List<okhttp3.Interceptor> interceptors, @Nullable GenieNetworkConfiguration genieNetworkConfiguration) throws GenieClientExceptionDeprecated.Constructor.- Parameters:
- url- The endpoint URL of the Genie API. Not null or empty
- interceptors- Any interceptors to configure the client with, can include security ones
- genieNetworkConfiguration- The network configuration parameters. Could be null
- Throws:
- GenieClientException- On error
 
 
- 
 - 
Method Detail- 
createClusterpublic java.lang.String createCluster(Cluster cluster) throws java.io.IOException, GenieClientException Create a cluster ing genie.- Parameters:
- cluster- A cluster object.
- Returns:
- The id of the cluster created.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
getClusterspublic java.util.List<Cluster> getClusters() throws java.io.IOException, GenieClientException Method to get a list of all the clusters.- Returns:
- A list of clusters.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
getClusterspublic java.util.List<Cluster> getClusters(java.lang.String name, java.util.List<java.lang.String> statusList, java.util.List<java.lang.String> tagList, java.lang.Long minUpdateTime, java.lang.Long maxUpdateTime) throws java.io.IOException, GenieClientException Deprecated.Method to get a list of all the clusters from Genie for the query parameters specified.- Parameters:
- name- The name of the cluster.
- statusList- The list of statuses.
- tagList- The list of tags.
- minUpdateTime- Minimum Time after which cluster was updated.
- maxUpdateTime- Maximum Time before which cluster was updated.
- Returns:
- A list of clusters.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
getClusterspublic java.util.List<Cluster> getClusters(@Nullable java.lang.String name, @Nullable java.util.List<java.lang.String> statusList, @Nullable java.util.List<java.lang.String> tagList, @Nullable java.lang.Long minUpdateTime, @Nullable java.lang.Long maxUpdateTime, @Nullable @Min(1L) @Min(1L) java.lang.Integer pageSize, @Nullable SortAttribute sortAttribute, @Nullable SortDirection sortDirection, @Nullable @Min(0L) @Min(0L) java.lang.Integer pageIndex) throws java.io.IOException, GenieClientException Method to get a list of all the clusters from Genie for the query parameters specified.- Parameters:
- name- The name of the cluster.
- statusList- The list of statuses.
- tagList- The list of tags.
- minUpdateTime- Minimum Time after which cluster was updated.
- maxUpdateTime- Maximum Time before which cluster was updated.
- pageSize- The maximum number of results returned
- sortAttribute- The entity attribute used to sort
- sortDirection- The sort direction
- pageIndex- The page index
- Returns:
- A list of clusters.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
getClusterpublic Cluster getCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException Method to get a Cluster from Genie.- Parameters:
- clusterId- The id of the cluster to get.
- Returns:
- The cluster details.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
deleteClusterpublic void deleteCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientExceptionMethod to delete a cluster from Genie.- Parameters:
- clusterId- The id of the cluster.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
deleteAllClusterspublic void deleteAllClusters() throws java.io.IOException, GenieClientExceptionMethod to delete all clusters from Genie.- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
patchClusterpublic void patchCluster(java.lang.String clusterId, com.github.fge.jsonpatch.JsonPatch patch) throws java.io.IOException, GenieClientExceptionMethod to patch a cluster using json patch instructions.- Parameters:
- clusterId- The id of the cluster.
- patch- The patch object specifying all the instructions.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
updateClusterpublic void updateCluster(java.lang.String clusterId, Cluster cluster) throws java.io.IOException, GenieClientExceptionMethod to updated a cluster.- Parameters:
- clusterId- The id of the cluster.
- cluster- The updated cluster object to use.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
getConfigsForClusterpublic java.util.Set<java.lang.String> getConfigsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientExceptionMethod to get all the configs for a cluster.- Parameters:
- clusterId- The id of the cluster.
- Returns:
- The set of configs for the cluster.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
addConfigsToClusterpublic void addConfigsToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> configs) throws java.io.IOException, GenieClientExceptionMethod to add configs to a cluster.- Parameters:
- clusterId- The id of the cluster.
- configs- The set of configs to add.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
updateConfigsForClusterpublic void updateConfigsForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> configs) throws java.io.IOException, GenieClientExceptionMethod to update configs for a cluster.- Parameters:
- clusterId- The id of the cluster.
- configs- The set of configs to add.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
removeAllConfigsForClusterpublic void removeAllConfigsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientExceptionRemove all configs for this cluster.- Parameters:
- clusterId- The id of the cluster.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
getDependenciesForClusterpublic java.util.Set<java.lang.String> getDependenciesForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientExceptionMethod to get all the dependency files for an cluster.- Parameters:
- clusterId- The id of the cluster.
- Returns:
- The set of dependencies for the cluster.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues
 
 - 
addDependenciesToClusterpublic void addDependenciesToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> dependencies) throws java.io.IOException, GenieClientExceptionMethod to add dependencies to a cluster.- Parameters:
- clusterId- The id of the cluster.
- dependencies- The set of dependencies to add.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues
 
 - 
updateDependenciesForClusterpublic void updateDependenciesForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> dependencies) throws java.io.IOException, GenieClientExceptionMethod to update dependencies for a cluster.- Parameters:
- clusterId- The id of the cluster.
- dependencies- The set of dependencies to add.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues
 
 - 
removeAllDependenciesForClusterpublic void removeAllDependenciesForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientExceptionRemove all dependencies for this cluster.- Parameters:
- clusterId- The id of the cluster.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues
 
 - 
getCommandsForClusterpublic java.util.List<Command> getCommandsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException Method to get all the commands for a cluster.- Parameters:
- clusterId- The id of the cluster.
- Returns:
- The set of commands for the cluster.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
addCommandsToClusterpublic void addCommandsToCluster(java.lang.String clusterId, java.util.List<java.lang.String> commandIds) throws java.io.IOException, GenieClientExceptionMethod to add commands to a cluster.- Parameters:
- clusterId- The id of the cluster.
- commandIds- The list of commands to add.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
updateCommandsForClusterpublic void updateCommandsForCluster(java.lang.String clusterId, java.util.List<java.lang.String> commandIds) throws java.io.IOException, GenieClientExceptionMethod to update commands for a cluster.- Parameters:
- clusterId- The id of the cluster.
- commandIds- The set of commands to add.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
removeCommandFromClusterpublic void removeCommandFromCluster(java.lang.String clusterId, java.lang.String commandId) throws java.io.IOException, GenieClientExceptionRemove a command from a cluster.- Parameters:
- clusterId- The id of the cluster.
- commandId- The id of the command to remove.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
removeAllCommandsForClusterpublic void removeAllCommandsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientExceptionRemove all commands for this cluster.- Parameters:
- clusterId- The id of the cluster.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
getTagsForClusterpublic java.util.Set<java.lang.String> getTagsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientExceptionMethod to get all the tags for a cluster.- Parameters:
- clusterId- The id of the cluster.
- Returns:
- The set of tags for the cluster.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
addTagsToClusterpublic void addTagsToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> tags) throws java.io.IOException, GenieClientExceptionMethod to add tags to a cluster.- Parameters:
- clusterId- The id of the cluster.
- tags- The set of tags to add.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
updateTagsForClusterpublic void updateTagsForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> tags) throws java.io.IOException, GenieClientExceptionMethod to update tags for a cluster.- Parameters:
- clusterId- The id of the cluster.
- tags- The set of tags to add.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
removeTagFromClusterpublic void removeTagFromCluster(java.lang.String clusterId, java.lang.String tag) throws java.io.IOException, GenieClientExceptionRemove a tag from a cluster.- Parameters:
- clusterId- The id of the cluster.
- tag- The tag to remove.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 - 
removeAllTagsForClusterpublic void removeAllTagsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientExceptionRemove all tags for this cluster.- Parameters:
- clusterId- The id of the cluster.
- Throws:
- GenieClientException- If the response received is not 2xx.
- java.io.IOException- For Network and other IO issues.
 
 
- 
 
-