com.baidubce.services.bmr
Class BmrClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.bmr.BmrClient

public class BmrClient
extends AbstractBceClient

Provides the client for accessing the Baidu MapReduce service.


Field Summary
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
BmrClient()
          Constructs a new client to invoke service methods on BMR.
BmrClient(BceClientConfiguration clientConfiguration)
          Constructs a new BMR client using the client configuration to access BMR.
 
Method Summary
 AddStepsResponse addSteps(AddStepsRequest request)
          Add steps to a BMR cluster.
 CreateClusterResponse createCluster(CreateClusterRequest request)
          Create a cluster with the specified options.
 GetClusterResponse getCluster(GetClusterRequest request)
          Describe the detail information of the target cluster.
 GetClusterResponse getCluster(String clusterId)
          Describe the detail information of the target cluster.
 GetStepResponse getStep(GetStepRequest request)
          Describe the detail information of the target step.
 GetStepResponse getStep(String clusterId, String stepId)
          Describe the detail information of the target step.
 ListClustersResponse listClusters()
          List BMR clusters owned by the authenticated user.
 ListClustersResponse listClusters(int maxKeys)
          List BMR clusters owned by the authenticated user.
 ListClustersResponse listClusters(ListClustersRequest request)
          List BMR clusters owned by the authenticated user.
 ListClustersResponse listClusters(String marker, int maxKeys)
          List BMR clusters owned by the authenticated user.
 ListInstanceGroupsResponse listInstanceGroups(ListInstanceGroupsRequest request)
          List the instance groups of the target BMR cluster.
 ListInstanceGroupsResponse listInstanceGroups(String clusterId)
          List the instance groups of the target BMR cluster.
 ListInstancesResponse listInstances(ListInstancesRequest request)
          List the instances belonging to the target instance group in the BMR cluster.
 ListInstancesResponse listInstances(String clusterId, String instanceGroupId)
          List the instances belonging to the target instance in the BMR cluster.
 ListStepsResponse listSteps(ListStepsRequest request)
          List all the steps of the target BMR cluster.
 ListStepsResponse listSteps(String clusterId)
          List all the steps of the target BMR cluster.
 ListStepsResponse listSteps(String clusterId, int maxKeys)
          List all the steps of the target BMR cluster.
 ListStepsResponse listSteps(String clusterId, String marker, int maxKeys)
          List all the steps of the target BMR cluster.
 void modifyInstanceGroups(ModifyInstanceGroupsRequest request)
          Modify the instance groups of the target cluster.
 void terminateCluster(String clusterId)
          Terminate a BMR cluster and release all the virtual machine instances.
 void terminateCluster(TerminateClusterRequest request)
          Terminate a BMR cluster and release all the virtual machine instances.
 
Methods inherited from class com.baidubce.AbstractBceClient
getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

Parameters:
clientConfiguration - The BCE client configuration options.
Method Detail

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.

Parameters:
request - The request containing valid query parameters.
Returns:
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.

Returns:
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.

Parameters:
maxKeys - The maximum number of clusters returned.
Returns:
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.

Parameters:
marker - The start record of clusters.
maxKeys - The maximum number of clusters returned.
Returns:
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.

Parameters:
request - The request object containing the ID of the target cluster.
Returns:
response containing the detail information of the target cluster.

getCluster

public GetClusterResponse getCluster(String clusterId)
Describe the detail information of the target cluster.

Parameters:
clusterId - The ID of the target cluster.
Returns:
The response containing the detail information of the target cluster.

createCluster

public CreateClusterResponse createCluster(CreateClusterRequest request)
Create a cluster with the specified options.

Parameters:
request - The request containing all options for creating a BMR cluster.
Returns:
The response containing the ID of the newly created cluster.

modifyInstanceGroups

public void modifyInstanceGroups(ModifyInstanceGroupsRequest request)
Modify the instance groups of the target cluster.

Parameters:
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.

Parameters:
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.

Parameters:
clusterId - The ID of the cluster to be terminated.

listInstanceGroups

public ListInstanceGroupsResponse listInstanceGroups(ListInstanceGroupsRequest request)
List the instance groups of the target BMR cluster.

Parameters:
request - containing the ID of target BMR cluster.
Returns:
The response containing a list of InstanceGroup objects.

listInstanceGroups

public ListInstanceGroupsResponse listInstanceGroups(String clusterId)
List the instance groups of the target BMR cluster.

Parameters:
clusterId - the ID of target BMR cluster.
Returns:
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.

Parameters:
request - containing the ID of target BMR cluster and the ID of the instance group.
Returns:
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.

Parameters:
clusterId - the ID of target BMR cluster.
instanceGroupId - the ID of target instance group.
Returns:
The response containing a list of Instance objects.

addSteps

public AddStepsResponse addSteps(AddStepsRequest request)
Add steps to a BMR cluster.

Parameters:
request - containing the ID of target BMR cluster and several steps to be added.
Returns:
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.

Parameters:
request - The request containing the ID of target BMR cluster.
Returns:
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.

Parameters:
clusterId - The ID of the target BMR cluster.
Returns:
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.

Parameters:
clusterId - The ID of the target BMR cluster.
maxKeys - The maximum number of steps returned.
Returns:
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.

Parameters:
clusterId - The ID of the target BMR cluster.
marker - The start record of steps.
maxKeys - The maximum number of steps returned.
Returns:
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

Parameters:
request - The request containing the ID of BMR cluster and the ID of step.
Returns:
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.

Parameters:
clusterId - The ID of the cluster which owns the step.
stepId - The ID of the target step.
Returns:
The response containing the detail information of the target step.


Copyright © 2018. All rights reserved.