public interface Provisioner
| Modifier and Type | Method and Description |
|---|---|
Cluster |
createCluster(ProvisionerContext context)
Request to create a cluster.
|
void |
deleteCluster(ProvisionerContext context,
Cluster cluster)
Request to delete a cluster.
|
Capabilities |
getCapabilities()
Returns
Capabilities of this provisioner. |
Cluster |
getClusterDetail(ProvisionerContext context,
Cluster cluster)
Get details about the cluster.
|
ClusterStatus |
getClusterStatus(ProvisionerContext context,
Cluster cluster)
Get the status of the cluster.
|
PollingStrategy |
getPollingStrategy(ProvisionerContext context,
Cluster cluster)
Get the
PollingStrategy to use when polling for cluster creation or deletion. |
ProvisionerSpecification |
getSpec()
Return the specification for the provisioner.
|
default void |
initialize(ProvisionerSystemContext systemContext)
Initialize the provisioner.
|
default void |
initializeCluster(ProvisionerContext context,
Cluster cluster)
Responsible for any additional initialization steps for the cluster.
|
void |
validateProperties(Map<String,String> properties)
Check that the specified properties are valid.
|
ProvisionerSpecification getSpec()
default void initialize(ProvisionerSystemContext systemContext)
systemContext - the system context that can be used to initialize the provisionervoid validateProperties(Map<String,String> properties)
properties - properties to validateIllegalArgumentException - if the properties are invalidCluster createCluster(ProvisionerContext context) throws Exception
context - provisioner contextRetryableProvisionException - if the operation failed, but may succeed on a retryException - if the operation failed in a non-retryable fashionClusterStatus getClusterStatus(ProvisionerContext context, Cluster cluster) throws Exception
ClusterStatus.NOT_EXISTS should be returned.
This is used to poll for status after createCluster(ProvisionerContext) or
deleteCluster(ProvisionerContext, Cluster) is called.context - provisioner contextcluster - the cluster to get the status ofRetryableProvisionException - if the operation failed, but may succeed on a retryException - if the operation failed in a non-retryable fashionCluster getClusterDetail(ProvisionerContext context, Cluster cluster) throws Exception
ClusterStatus.NOT_EXISTS should be returned. This is called after a cluster has been created, but before
it has been initialized.context - provisioner contextcluster - the cluster to getRetryableProvisionException - if the operation failed, but may succeed on a retryException - if the operation failed in a non-retryable fashiondefault void initializeCluster(ProvisionerContext context, Cluster cluster) throws Exception
context - provisioner contextcluster - the cluster to operate onRetryableProvisionException - if the operation failed, but may succeed on a retryException - if the operation failed in a non-retryable fashionvoid deleteCluster(ProvisionerContext context, Cluster cluster) throws Exception
context - provisioner contextcluster - the cluster to deleteRetryableProvisionException - if the operation failed, but may succeed on a retryException - if the operation failed in a non-retryable fashionPollingStrategy getPollingStrategy(ProvisionerContext context, Cluster cluster)
PollingStrategy to use when polling for cluster creation or deletion. The cluster status is
guaranteed to be ClusterStatus.CREATING or ClusterStatus.DELETING.context - provisioner contextcluster - the cluster to poll status forCapabilities getCapabilities()
Capabilities of this provisioner. Capabilities allow plugins requiring special Requirements
to be run in the provisioner if all the requirements are met. If a program requires a requirement that is not
supported by the provisioner, the platform will fail the program run before provisioning begins.Capabilities of this provisionerCopyright © 2018 Cask Data, Inc. Licensed under the Apache License, Version 2.0.