@Path(value="/v2/clusters") public class ClusterHandler extends AbstractAuthHandler
Modifier and Type | Method and Description |
---|---|
void |
abortClusterJob(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Abort the cluster operation that is currently running for the given cluster.
|
void |
addClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Add specific services to a cluster.
|
void |
changeClusterParameter(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Changes a cluster parameter like lease time.
|
void |
createCluster(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder)
Create a new cluster.
|
void |
deleteCluster(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Delete a specific cluster that is deletable by the user.
|
void |
getCluster(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Get a specific cluster visible to the user.
|
void |
getClusterConfig(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Get the config used by the cluster.
|
void |
getClusters(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder)
Get all clusters visible to the user.
|
void |
getClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Get all services on a specific cluster visible to the user.
|
void |
getClusterStatus(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Get the status of a specific cluster visible to the user.
|
void |
getPlanForJob(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId,
String planId)
Get the task plan for an operation that has taken place or is currently taking place on a cluster.
|
void |
getPlansForCluster(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Get all plans for cluster operations that have taken place or are currently taking place on a cluster.
|
void |
pauseClusterJob(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Pause the cluster operation that is currently running for the given cluster.
|
void |
putClusterConfig(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Overwrite the config used by an active cluster.
|
void |
restartAllClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Restarts all services on the cluster, taking into account service dependencies for order of service stops
and starts.
|
void |
restartClusterService(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId,
String serviceId)
Restarts the specified service on the cluster, plus all services that depend on it,
taking into account service dependencies for order of service stops and starts.
|
void |
resumeClusterJob(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Resume the cluster operation that is currently paused for the given cluster.
|
void |
startAllClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Starts all services on the cluster, taking into account service dependencies for order of service starts.
|
void |
startClusterService(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId,
String serviceId)
Starts the specified service, plus all services it depends on, on the cluster.
|
void |
stopAllClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Stops all services on the cluster, taking into account service dependencies for order of service stops.
|
void |
stopClusterService(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId,
String serviceId)
Stops the specified service on the cluster, plus all services that depend on it,
taking into account service dependencies for order of service stops.
|
void |
syncClusterTemplate(org.jboss.netty.handler.codec.http.HttpRequest request,
co.cask.http.HttpResponder responder,
String clusterId)
Sync the cluster template of the cluster to the current version of the cluster template.
|
getAndAuthenticateAccount
@GET public void getClusters(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder)
Cluster.Status
.request
- Request for clusters.responder
- Responder for sending the response.@GET @Path(value="/{cluster-id}") public void getCluster(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request for a cluster.responder
- Responder for sending the response.clusterId
- Id of the cluster to get.@GET @Path(value="/{cluster-id}/config") public void getClusterConfig(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request for config of a cluster.responder
- Responder for sending the response.clusterId
- Id of the cluster containing the config to get.@GET @Path(value="/{cluster-id}/services") public void getClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request for services on a cluster.responder
- Responder for sending the response.clusterId
- Id of the cluster containing the services to get.@GET @Path(value="/{cluster-id}/status") public void getClusterStatus(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request for cluster status.responder
- Responder for sending the response.clusterId
- Id of the cluster whose status to get.@POST public void createCluster(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder)
request
- Request to add a cluster.responder
- Responder for sending the response.@DELETE @Path(value="/{cluster-id}") public void deleteCluster(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to delete cluster.responder
- Responder for sending the response.clusterId
- Id of the cluster to delete.@POST @Path(value="/{cluster-id}/abort") public void abortClusterJob(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to abort the cluster operation.responder
- Responder for sending the response.clusterId
- Id of the cluster to abort.@POST @Path(value="/{cluster-id}/pause") public void pauseClusterJob(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to pause the cluster operation.responder
- Responder for sending the response.clusterId
- Id of the cluster to pause.@POST @Path(value="/{cluster-id}/resume") public void resumeClusterJob(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to resume the cluster operation.responder
- Responder for sending the response.clusterId
- Id of the cluster to resume.@POST @Path(value="/{cluster-id}") public void changeClusterParameter(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to change cluster parameter.responder
- Responder to send the response.clusterId
- Id of the cluster to change.@GET @Path(value="/{cluster-id}/plans/{plan-id}") public void getPlanForJob(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId, @PathParam(value="plan-id") String planId)
request
- Request for the plan.responder
- Responder to send the response.clusterId
- Id of the cluster whose plan we want to get.planId
- Id of the plan for the cluster.@GET @Path(value="/{cluster-id}/plans") public void getPlansForCluster(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request for cluster plans.responder
- Responder for sending the response.clusterId
- Id of the cluster whose plans we have to fetch.@PUT @Path(value="/{cluster-id}/config") public void putClusterConfig(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request for config of a cluster.responder
- Responder for sending the response.clusterId
- Id of the cluster containing the config to get.@POST @Path(value="/{cluster-id}/services") public void addClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to add services to a cluster.responder
- Responder for sending the response.clusterId
- Id of the cluster to add services to.@POST @Path(value="/{cluster-id}/services/start") public void startAllClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to start cluster services.responder
- Responder for sending the response.clusterId
- Id of the cluster whose services should be started.@POST @Path(value="/{cluster-id}/services/stop") public void stopAllClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to stop cluster services.responder
- Responder for sending the response.clusterId
- Id of the cluster whose services should be stopped.@POST @Path(value="/{cluster-id}/services/restart") public void restartAllClusterServices(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to restart cluster services.responder
- Responder for sending the response.clusterId
- Id of the cluster whose services should be restarted.@POST @Path(value="/{cluster-id}/services/{service-id}/start") public void startClusterService(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId, @PathParam(value="service-id") String serviceId)
request
- Request to start cluster service.responder
- Responder for sending the response.clusterId
- Id of the cluster whose services should be started.@POST @Path(value="/{cluster-id}/services/{service-id}/stop") public void stopClusterService(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId, @PathParam(value="service-id") String serviceId)
request
- Request to stop cluster services.responder
- Responder for sending the response.clusterId
- Id of the cluster whose services should be stopped.@POST @Path(value="/{cluster-id}/services/{service-id}/restart") public void restartClusterService(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId, @PathParam(value="service-id") String serviceId)
request
- Request to restart cluster service.responder
- Responder for sending the response.clusterId
- Id of the cluster whose service should be restarted.@POST @Path(value="/{cluster-id}/clustertemplate/sync") public void syncClusterTemplate(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @PathParam(value="cluster-id") String clusterId)
request
- Request to sync the cluster template.responder
- Responder for sending the response.clusterId
- Id of the cluster that should be synced.Copyright © 2013-2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.