类 CreateClusterRequest


  • public class CreateClusterRequest
    extends AbstractBceRequest
    Provides options for creating a BMR cluster.

    The essential options are imageType, imageVersion, instanceGroups, and the optional ones are clientToken, name, autoTerminate, logUri, applications and steps.

    • 构造器详细资料

      • CreateClusterRequest

        public CreateClusterRequest()
    • 方法详细资料

      • getImageType

        public String getImageType()
      • setImageType

        public void setImageType​(String imageType)
      • getImageVersion

        public String getImageVersion()
      • setImageVersion

        public void setImageVersion​(String imageVersion)
      • getClientToken

        public String getClientToken()
      • setClientToken

        public void setClientToken​(String clientToken)
      • getAutoTerminate

        public boolean getAutoTerminate()
      • setAutoTerminate

        public void setAutoTerminate​(boolean autoTerminate)
      • getLogUri

        public String getLogUri()
      • setLogUri

        public void setLogUri​(String logUri)
      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getServiceHaEnabled

        public boolean getServiceHaEnabled()
      • setServiceHaEnabled

        public void setServiceHaEnabled​(boolean serviceHaEnabled)
      • getSafeModeEnabled

        public boolean getSafeModeEnabled()
      • setSafeModeEnabled

        public void setSafeModeEnabled​(boolean safeModeEnabled)
      • getAdminPassword

        public String getAdminPassword()
      • setAdminPassword

        public void setAdminPassword​(String adminPassword)
      • getSecurityGroup

        public String getSecurityGroup()
      • setSecurityGroup

        public void setSecurityGroup​(String securityGroup)
      • getVpcId

        public String getVpcId()
      • setVpcId

        public void setVpcId​(String vpcId)
      • getSubnetId

        public String getSubnetId()
      • setSubnetId

        public void setSubnetId​(String subnetId)
      • getAvailabilityZone

        public String getAvailabilityZone()
      • setAvailabilityZone

        public void setAvailabilityZone​(String availabilityZone)
      • withImageType

        public CreateClusterRequest withImageType​(String imageType)
        Configure the image type for the cluster.
        参数:
        imageType - The image type for cluster's instances.
        返回:
        CreateClusterRequest
      • withImageVersion

        public CreateClusterRequest withImageVersion​(String imageVersion)
        Configure image version for the cluster.
        参数:
        imageVersion - The image version for the cluster's instance.
        返回:
        CreateClusterRequest
      • withAutoTerminate

        public CreateClusterRequest withAutoTerminate​(boolean autoTerminate)
        Configure auto-terminate property for the cluster. If set the autoTerminate as true, then the cluster will be terminated when all the steps are done. And the autoTerminate is true by default.
        参数:
        autoTerminate - true if the cluster should be auto terminated.
        返回:
        CreateClusterRequest
      • withLogUri

        public CreateClusterRequest withLogUri​(String logUri)
        Configure optional BOS uri for logs of steps. If the uri is not set, then the logs for the cluster and steps are not saved in the BOS.
        参数:
        logUri - The valid BOS uri for the logs.
        返回:
        CreateClusterRequest
      • withName

        public CreateClusterRequest withName​(String name)
        Configure optional name of the cluster.If not set, then the name of the cluster will be "my-cluster" by default.
        参数:
        name - The name for the cluster.
        返回:
        CreateClusterRequest
      • withServiceHaEnabled

        public CreateClusterRequest withServiceHaEnabled​(boolean serviceHaEnabled)
        Configure optional service HA enable of the cluster. If true will create a ha cluster, default is false.
        参数:
        serviceHaEnabled - true if the serivce ha enable, default is false.
        返回:
        CreateClusterRequest
      • withSafeModeEnabled

        public CreateClusterRequest withSafeModeEnabled​(boolean safeModeEnabled)
        Configure optional safe mode enable of the cluster. If true will create a cluster running as safe mode, default is false.
        参数:
        safeModeEnabled - true if the safe mode enable, default is false.
        返回:
        CreateClusterRequest
      • withInstanceGroup

        public CreateClusterRequest withInstanceGroup​(InstanceGroupConfig instanceGroup)
        Configure the instance group for the cluster.
        参数:
        instanceGroup - An InstanceGroupConfig instance.
        返回:
        CreateClusterRequest
      • withApplication

        public CreateClusterRequest withApplication​(ApplicationConfig application)
        Configure optional application for the cluster. BMR provides applications such as Hive、Pig、HBase for the cluster.
        参数:
        application - An ApplicationConfig instance.
        返回:
        CreateClusterRequest
      • withStep

        public CreateClusterRequest withStep​(StepConfig step)
        Configure optional step for the cluster. The step will be scheduled and executed after the cluster is ACTIVE. And the step also can be added to the cluster by sending AddStepsRequest.
        参数:
        step - a StepConfig instance to be added.
        返回:
        CreateClusterRequest
      • withSteps

        public CreateClusterRequest withSteps​(List<StepConfig> steps)
        Configure the steps to be added. This method will replace the CreateClusterRequest instance's steps by the @param steps totally, thus it should be invoked ahead of withStep method if both of them are used for the same CreateClusterRequest instance.
        参数:
        steps - a List of StepConfig instances to be added.
        返回:
        CreateClusterRequest
      • withClientToken

        public CreateClusterRequest withClientToken​(String clientToken)
        Configure optional client token for the request. The request will be idempotent if client token is provided.
        参数:
        clientToken - An ASCII string whose length is less than 64.
        返回:
        CreateClusterRequest
      • withAdminPassword

        public CreateClusterRequest withAdminPassword​(String adminPassword)
        Configure request adminPassword for the request.
        参数:
        adminPassword - an password for cluster for example bmrtest@123
        返回:
        CreateClusterRequest
      • withVpcId

        public CreateClusterRequest withVpcId​(String vpcId)
        Configure request vpc network name for the request.
        参数:
        vpcId - vpcId for create cluster
        返回:
        CreateClusterRequest
      • withSubnetId

        public CreateClusterRequest withSubnetId​(String subnetId)
        Configure request subnet name for the request.
        参数:
        subnetId - subnetId for cluster
        返回:
        CreateClusterRequest
      • withAvailabilityZone

        public CreateClusterRequest withAvailabilityZone​(String availabilityZone)
        Configure request availabilityZone of creating cluster.
        参数:
        availabilityZone - cluster availabilityZone
        返回:
        CreateClusterRequest
      • withSecurityGroup

        public CreateClusterRequest withSecurityGroup​(String securityGroup)
        Configure request security group for the request.
        参数:
        securityGroup - securityGroup for cluster
        返回:
        CreateClusterRequest