public class YarnContainerClusterTemplate extends java.lang.Object implements YarnContainerClusterOperations
Modifier and Type | Field and Description |
---|---|
protected org.springframework.web.client.RestTemplate |
restTemplate |
Constructor and Description |
---|
YarnContainerClusterTemplate(java.lang.String baseUri)
Constructs a
YarnContainerClusterTemplate using a RestTemplate instantiated
with HttpComponentsClientHttpRequestFactory . |
YarnContainerClusterTemplate(java.lang.String baseUri,
org.springframework.web.client.RestTemplate restTemplate)
Constructs a
YarnContainerClusterTemplate using a given RestTemplate . |
Modifier and Type | Method and Description |
---|---|
ContainerClusterResource |
clusterCreate(ContainerClusterCreateRequest request)
Create a container cluster.
|
void |
clusterDestroy(java.lang.String clusterId)
Destroy a container cluster.
|
ContainerClusterResource |
clusterInfo(java.lang.String clusterId)
Get a container cluster info.
|
ContainerClusterResource |
clusterModify(java.lang.String clusterId,
ContainerClusterCreateRequest request)
Modify a container cluster.
|
ContainerClusterResource |
clusterStart(java.lang.String clusterId,
ContainerClusterModifyRequest request)
Start a container cluster.
|
ContainerClusterResource |
clusterStop(java.lang.String clusterId,
ContainerClusterModifyRequest request)
Stop a container cluster.
|
YarnContainerClusterEndpointResource |
getClusters()
Get a clusters info.
|
public YarnContainerClusterTemplate(java.lang.String baseUri)
YarnContainerClusterTemplate
using a RestTemplate
instantiated
with HttpComponentsClientHttpRequestFactory
.baseUri
- the base uripublic YarnContainerClusterTemplate(java.lang.String baseUri, org.springframework.web.client.RestTemplate restTemplate)
YarnContainerClusterTemplate
using a given RestTemplate
.baseUri
- the base urirestTemplate
- the rest templatepublic YarnContainerClusterEndpointResource getClusters() throws YarnContainerClusterClientException
YarnContainerClusterOperations
getClusters
in interface YarnContainerClusterOperations
YarnContainerClusterEndpointResource
YarnContainerClusterClientException
- if client experienced an errorpublic ContainerClusterResource clusterCreate(ContainerClusterCreateRequest request) throws YarnContainerClusterClientException
YarnContainerClusterOperations
clusterCreate
in interface YarnContainerClusterOperations
request
- the create requestContainerClusterResource
YarnContainerClusterClientException
- if client experienced an errorpublic ContainerClusterResource clusterInfo(java.lang.String clusterId) throws YarnContainerClusterClientException
YarnContainerClusterOperations
clusterInfo
in interface YarnContainerClusterOperations
clusterId
- the cluster identifierContainerClusterResource
YarnContainerClusterClientException
- if client experienced an errorpublic ContainerClusterResource clusterStart(java.lang.String clusterId, ContainerClusterModifyRequest request) throws YarnContainerClusterClientException
YarnContainerClusterOperations
clusterStart
in interface YarnContainerClusterOperations
clusterId
- the cluster identifierrequest
- the modify request.ContainerClusterResource
YarnContainerClusterClientException
- if client experienced an errorpublic ContainerClusterResource clusterStop(java.lang.String clusterId, ContainerClusterModifyRequest request) throws YarnContainerClusterClientException
YarnContainerClusterOperations
clusterStop
in interface YarnContainerClusterOperations
clusterId
- the cluster identifierrequest
- the modify request.ContainerClusterResource
YarnContainerClusterClientException
- if client experienced an errorpublic ContainerClusterResource clusterModify(java.lang.String clusterId, ContainerClusterCreateRequest request) throws YarnContainerClusterClientException
YarnContainerClusterOperations
clusterModify
in interface YarnContainerClusterOperations
clusterId
- the cluster identifierrequest
- the create request.ContainerClusterResource
YarnContainerClusterClientException
- if client experienced an errorpublic void clusterDestroy(java.lang.String clusterId) throws YarnContainerClusterClientException
YarnContainerClusterOperations
clusterDestroy
in interface YarnContainerClusterOperations
clusterId
- the cluster identifierYarnContainerClusterClientException
- if client experienced an error