Package 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 and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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);
}
======================= NodeGroupControllerClient =======================
Service Description: The `NodeGroupControllerService` provides methods to manage node groups of Compute Engine managed instances.
Sample for NodeGroupControllerClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]");
NodeGroup response = nodeGroupControllerClient.getNodeGroup(name);
}
======================= SessionTemplateControllerClient =======================
Service Description: The SessionTemplateController provides methods to manage session templates.
Sample for SessionTemplateControllerClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SessionTemplateControllerClient sessionTemplateControllerClient =
SessionTemplateControllerClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
SessionTemplate sessionTemplate = SessionTemplate.newBuilder().build();
SessionTemplate response =
sessionTemplateControllerClient.createSessionTemplate(parent, sessionTemplate);
}
======================= SessionControllerClient =======================
Service Description: The `SessionController` provides methods to manage interactive sessions.
Sample for SessionControllerClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SessionControllerClient sessionControllerClient = SessionControllerClient.create()) {
SessionName name = SessionName.of("[PROJECT]", "[LOCATION]", "[SESSION]");
Session response = sessionControllerClient.getSession(name);
}
======================= WorkflowTemplateServiceClient =======================
Service Description: The API interface for managing Workflow Templates in the Dataproc API.
Sample for WorkflowTemplateServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
WorkflowTemplateServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
WorkflowTemplate response =
workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
}
-
ClassesClassDescriptionService Description: The API interface for managing autoscaling policies in the Dataproc API.Settings class to configure an instance of
AutoscalingPolicyServiceClient.Builder for AutoscalingPolicyServiceSettings.Service Description: The BatchController provides methods to manage batch workloads.Settings class to configure an instance ofBatchControllerClient.Builder for BatchControllerSettings.Service Description: The ClusterControllerService provides methods to manage clusters of Compute Engine instances.Settings class to configure an instance ofClusterControllerClient.Builder for ClusterControllerSettings.Service Description: The JobController provides methods to manage jobs.Settings class to configure an instance ofJobControllerClient.Builder for JobControllerSettings.Service Description: The `NodeGroupControllerService` provides methods to manage node groups of Compute Engine managed instances.Settings class to configure an instance ofNodeGroupControllerClient.Builder for NodeGroupControllerSettings.Service Description: The `SessionController` provides methods to manage interactive sessions.Settings class to configure an instance ofSessionControllerClient.Builder for SessionControllerSettings.Service Description: The SessionTemplateController provides methods to manage session templates.Settings class to configure an instance ofSessionTemplateControllerClient.Builder for SessionTemplateControllerSettings.Service Description: The API interface for managing Workflow Templates in the Dataproc API.Settings class to configure an instance ofWorkflowTemplateServiceClient.Builder for WorkflowTemplateServiceSettings.