类 BmrClient


  • public class BmrClient
    extends AbstractBceClient
    Provides the client for accessing the Baidu MapReduce service.
    • 构造器详细资料

      • BmrClient

        public BmrClient()
        Constructs a new client to invoke service methods on BMR.
      • BmrClient

        public BmrClient​(BceClientConfiguration clientConfiguration)
        Constructs a new BMR client using the client configuration to access BMR.
        参数:
        clientConfiguration - The BCE client configuration options.
    • 方法详细资料

      • listClusters

        public ListClustersResponse listClusters​(ListClustersRequest request)
        List BMR clusters owned by the authenticated user. Users must authenticate with a valid BCE Access Key ID, and the response contains all the BMR clusters owned by the user.
        参数:
        request - The request containing valid query parameters.
        返回:
        The response containing a list of the BMR clusters owned by the authenticated sender of the request.
      • listClusters

        public ListClustersResponse listClusters()
        List BMR clusters owned by the authenticated user.
        返回:
        The response containing a list of the BMR clusters owned by the authenticated sender of the request.
      • listClusters

        public ListClustersResponse listClusters​(int maxKeys)
        List BMR clusters owned by the authenticated user.
        参数:
        maxKeys - The maximum number of clusters returned.
        返回:
        The response containing a list of the BMR clusters owned by the authenticated sender of the request. And the size of list is limited below maxKeys.
      • listClusters

        public ListClustersResponse listClusters​(String marker,
                                                 int maxKeys)
        List BMR clusters owned by the authenticated user.
        参数:
        marker - The start record of clusters.
        maxKeys - The maximum number of clusters returned.
        返回:
        The response containing a list of the BMR clusters owned by the authenticated sender of the request. The clusters' records start from the marker and the size of list is limited below maxKeys.
      • getCluster

        public GetClusterResponse getCluster​(GetClusterRequest request)
        Describe the detail information of the target cluster.
        参数:
        request - The request object containing the ID of the target cluster.
        返回:
        response containing the detail information of the target cluster.
      • getClusterAmbariPassword

        public AmbariResponse getClusterAmbariPassword​(String clusterId)
        Describe the Ambari Password information of the target cluster.
        参数:
        clusterId - ID of the target cluster.
        返回:
        response containing the Ambari Password information of the target cluster.
      • saveTemplateByCluster

        public TemplateClusterResponse saveTemplateByCluster​(TemplateClusterRequest request)
        save a template by clusterID
        参数:
        request - The request object containing the ID of the target cluster
        返回:
        response containing the ID of the new template
      • getCluster

        public GetClusterResponse getCluster​(String clusterId)
        Describe the detail information of the target cluster.
        参数:
        clusterId - The ID of the target cluster.
        返回:
        The response containing the detail information of the target cluster.
      • createCluster

        public CreateClusterResponse createCluster​(CreateClusterRequest request)
        Create a cluster with the specified options.
        参数:
        request - The request containing all options for creating a BMR cluster.
        返回:
        The response containing the ID of the newly created cluster.
      • modifyInstanceGroups

        public void modifyInstanceGroups​(ModifyInstanceGroupsRequest request)
        Modify the instance groups of the target cluster.
        参数:
        request - The request containing the ID of BMR cluster and the instance groups to be modified.
      • terminateCluster

        public void terminateCluster​(TerminateClusterRequest request)
        Terminate a BMR cluster and release all the virtual machine instances.
        参数:
        request - The request containing the ID of the cluster to be terminated.
      • terminateCluster

        public void terminateCluster​(String clusterId)
        Terminate a BMR cluster and release all the virtual machine instances.
        参数:
        clusterId - The ID of the cluster to be terminated.
      • listInstanceGroups

        public ListInstanceGroupsResponse listInstanceGroups​(ListInstanceGroupsRequest request)
        List the instance groups of the target BMR cluster.
        参数:
        request - containing the ID of target BMR cluster.
        返回:
        The response containing a list of InstanceGroup objects.
      • listInstanceGroups

        public ListInstanceGroupsResponse listInstanceGroups​(String clusterId)
        List the instance groups of the target BMR cluster.
        参数:
        clusterId - the ID of target BMR cluster.
        返回:
        The response containing a list of InstanceGroup objects.
      • listInstances

        public ListInstancesResponse listInstances​(ListInstancesRequest request)
        List the instances belonging to the target instance group in the BMR cluster.
        参数:
        request - containing the ID of target BMR cluster and the ID of the instance group.
        返回:
        The response containing a list of Instance objects.
      • listInstances

        public ListInstancesResponse listInstances​(String clusterId,
                                                   String instanceGroupId)
        List the instances belonging to the target instance in the BMR cluster.
        参数:
        clusterId - the ID of target BMR cluster.
        instanceGroupId - the ID of target instance group.
        返回:
        The response containing a list of Instance objects.
      • addSteps

        public AddStepsResponse addSteps​(AddStepsRequest request)
        Add steps to a BMR cluster.
        参数:
        request - containing the ID of target BMR cluster and several steps to be added.
        返回:
        The response containing a list of IDs of newly added steps.
      • listSteps

        public ListStepsResponse listSteps​(ListStepsRequest request)
        List all the steps of the target BMR cluster.
        参数:
        request - The request containing the ID of target BMR cluster.
        返回:
        The response containing the list of steps owned by the cluster.
      • listSteps

        public ListStepsResponse listSteps​(String clusterId)
        List all the steps of the target BMR cluster.
        参数:
        clusterId - The ID of the target BMR cluster.
        返回:
        The response containing the list of steps owned by the cluster.
      • listSteps

        public ListStepsResponse listSteps​(String clusterId,
                                           int maxKeys)
        List all the steps of the target BMR cluster.
        参数:
        clusterId - The ID of the target BMR cluster.
        maxKeys - The maximum number of steps returned.
        返回:
        The response containing the list of steps owned by the cluster. And the size of list is limited below maxKeys.
      • listSteps

        public ListStepsResponse listSteps​(String clusterId,
                                           String marker,
                                           int maxKeys)
        List all the steps of the target BMR cluster.
        参数:
        clusterId - The ID of the target BMR cluster.
        marker - The start record of steps.
        maxKeys - The maximum number of steps returned.
        返回:
        The response containing a list of the BMR steps owned by the cluster. The steps' records start from the marker and the size of list is limited below maxKeys.
      • getStep

        public GetStepResponse getStep​(GetStepRequest request)
        Describe the detail information of the target step.

        The request is valid just if the step exists and the step is owned by the cluster

        参数:
        request - The request containing the ID of BMR cluster and the ID of step.
        返回:
        The response containing the detail information of target step.
      • getStep

        public GetStepResponse getStep​(String clusterId,
                                       String stepId)
        Describe the detail information of the target step.
        参数:
        clusterId - The ID of the cluster which owns the step.
        stepId - The ID of the target step.
        返回:
        The response containing the detail information of the target step.
      • deleteEip

        public void deleteEip​(EipRequest request)
        Delete the master of a cluster 's EIP
        参数:
        request - the cluster's ID
      • renameCluster

        public NormalResponse renameCluster​(RenameCluseterRequest request)
        rename a cluster's name
        参数:
        request - contains cluster's ID and cluster's new name
        返回:
        the success info
      • addEip

        public void addEip​(EipRequest request)
        add an EIP of the master node of a cluster
        参数:
        request - contains instanceID and clusterID
      • getTemplateInfo

        public TemplateInfoResponse getTemplateInfo​(TemplateIdRequest request)
        get the TemplateInfo
        参数:
        request - contains the templateID and adminPassword
        返回:
        all of config message of the template
      • deleteTemplate

        public NormalResponse deleteTemplate​(TemplateIdRequest request)
        delete template by id
        参数:
        request - contains templateid and adminPassword
        返回:
        success message
      • bindEip

        public void bindEip​(EipBindRequest request)
        bind EIP for the bmr instance of a cluster
        参数:
        request - bind request
      • unBindEip

        public void unBindEip​(EipUnBindRequest request)
        unbind EIP for the bmr instance of a cluster
        参数:
        request - unbind request
      • listClusterHosts

        public ListClusterHostsResponse listClusterHosts​(String clusterId)
        List host info for a cluster
        参数:
        clusterId - cluster uuid