google-cloud-dataproc overview (4.0.2)

com.google.cloud.dataproc.v1

The interfaces provided are listed below, along with usage samples.

AutoscalingPolicyServiceClient

Service Description: The API interface for managing autoscaling policies in the Dataproc API.

Sample for AutoscalingPolicyServiceClient:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
     AutoscalingPolicyServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
   AutoscalingPolicy response =
       autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
 }
 

BatchControllerClient

Service Description: The BatchController provides methods to manage batch workloads.

Sample for BatchControllerClient:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
   BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]");
   Batch response = batchControllerClient.getBatch(name);
 }
 

ClusterControllerClient

Service Description: The ClusterControllerService provides methods to manage clusters of Compute Engine instances.

Sample for ClusterControllerClient:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
   String projectId = "projectId-894832108";
   String region = "region-934795532";
   String clusterName = "clusterName-1141738587";
   Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
 }
 

JobControllerClient

Service Description: The JobController provides methods to manage jobs.

Sample for JobControllerClient:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
   String projectId = "projectId-894832108";
   String region = "region-934795532";
   Job job = Job.newBuilder().build();
   Job response = jobControllerClient.submitJob(projectId, region, job);
 }
 

WorkflowTemplateServiceClient

Service Description: The API interface for managing Workflow Templates in the Dataproc API.

Sample for WorkflowTemplateServiceClient:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
     WorkflowTemplateServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
   WorkflowTemplate response =
       workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
 }
 

com.google.cloud.dataproc.v1.stub