Package google.cloud.dataproc.v1beta2

Index

ClusterController

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

CreateCluster

rpc CreateCluster(CreateClusterRequest) returns (Operation)

Creates a cluster in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteCluster

rpc DeleteCluster(DeleteClusterRequest) returns (Operation)

Deletes a cluster in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DiagnoseCluster

rpc DiagnoseCluster(DiagnoseClusterRequest) returns (Operation)

Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetCluster

rpc GetCluster(GetClusterRequest) returns (Cluster)

Gets the resource representation for a cluster in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListClusters

rpc ListClusters(ListClustersRequest) returns (ListClustersResponse)

Lists all regions/{region}/clusters in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateCluster

rpc UpdateCluster(UpdateClusterRequest) returns (Operation)

Updates a cluster in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

JobController

The JobController provides methods to manage jobs.

CancelJob

rpc CancelJob(CancelJobRequest) returns (Job)

Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteJob

rpc DeleteJob(DeleteJobRequest) returns (Empty)

Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetJob

rpc GetJob(GetJobRequest) returns (Job)

Gets the resource representation for a job in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListJobs

rpc ListJobs(ListJobsRequest) returns (ListJobsResponse)

Lists regions/{region}/jobs in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

SubmitJob

rpc SubmitJob(SubmitJobRequest) returns (Job)

Submits a job to a cluster.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateJob

rpc UpdateJob(UpdateJobRequest) returns (Job)

Updates a job in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

WorkflowTemplateService

The API interface for managing Workflow Templates in the Cloud Dataproc API.

CreateWorkflowTemplate

rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest) returns (WorkflowTemplate)

Creates new workflow template.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteWorkflowTemplate

rpc DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest) returns (Empty)

Deletes a workflow template. It does not cancel in-progress workflows.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetWorkflowTemplate

rpc GetWorkflowTemplate(GetWorkflowTemplateRequest) returns (WorkflowTemplate)

Retrieves the latest workflow template.

Can retrieve previously instantiated template by specifying optional version parameter.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

InstantiateInlineWorkflowTemplate

rpc InstantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest) returns (Operation)

Instantiates a template and begins execution.

This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.

The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The Operation.metadata will be WorkflowMetadata.

On successful completion, Operation.response will be Empty.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

InstantiateWorkflowTemplate

rpc InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest) returns (Operation)

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The Operation.metadata will be WorkflowMetadata.

On successful completion, Operation.response will be Empty.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListWorkflowTemplates

rpc ListWorkflowTemplates(ListWorkflowTemplatesRequest) returns (ListWorkflowTemplatesResponse)

Lists workflows that match the specified filter in the request.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateWorkflowTemplate

rpc UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest) returns (WorkflowTemplate)

Updates (replaces) workflow template. The updated template must contain version that matches the current server version.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

AcceleratorConfig

Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).

Fields
accelerator_type_uri

string

Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See [Compute Engine AcceleratorTypes]( /compute/docs/reference/beta/acceleratorTypes)

Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80

Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.

accelerator_count

int32

The number of the accelerator cards of this type exposed to this instance.

CancelJobRequest

A request to cancel a job.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the job belongs to.

region

string

Required. The Cloud Dataproc region in which to handle the request.

job_id

string

Required. The job ID.

Authorization requires the following Google IAM permission on the specified resource job_id:

  • dataproc.jobs.cancel

Cluster

Describes the identifying information, config, and status of a cluster of Compute Engine instances.

Fields
project_id

string

Required. The Google Cloud Platform project ID that the cluster belongs to.

cluster_name

string

Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.

config

ClusterConfig

Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated.

labels

map<string, string>

Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

status

ClusterStatus

Output only. Cluster status.

status_history[]

ClusterStatus

Output only. The previous cluster status.

cluster_uuid

string

Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.

metrics

ClusterMetrics

Output only. Contains cluster daemon metrics such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

ClusterConfig

The cluster config.

Fields
config_bucket

string

Optional. A Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.

gce_cluster_config

GceClusterConfig

Required. The shared Compute Engine config settings for all instances in a cluster.

master_config

InstanceGroupConfig

Optional. The Compute Engine config settings for the master instance in a cluster.

worker_config

InstanceGroupConfig

Optional. The Compute Engine config settings for worker instances in a cluster.

secondary_worker_config

InstanceGroupConfig

Optional. The Compute Engine config settings for additional worker instances in a cluster.

software_config

SoftwareConfig

Optional. The config settings for software inside the cluster.

lifecycle_config

LifecycleConfig

Optional. The config setting for auto delete cluster schedule.

initialization_actions[]

NodeInitializationAction

Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's

role

metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):

ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role)
if [[ "${ROLE}" == 'Master' ]]; then
  ... master specific actions ...
else
  ... worker specific actions ...
fi

encryption_config

EncryptionConfig

Optional. Encryption settings for the cluster.

ClusterMetrics

Contains cluster daemon metrics, such as HDFS and YARN stats.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

Fields
hdfs_metrics

map<string, int64>

The HDFS metrics.

yarn_metrics

map<string, int64>

The YARN metrics.

ClusterOperation

The cluster operation triggered by a workflow.

Fields
operation_id

string

Output only. The id of the cluster operation.

error

string

Output only. Error, if operation failed.

done

bool

Output only. Indicates the operation is done.

ClusterOperationMetadata

Metadata describing the operation.

Fields
cluster_name

string

Output only. Name of the cluster for the operation.

cluster_uuid

string

Output only. Cluster UUID for the operation.

status

ClusterOperationStatus

Output only. Current operation status.

status_history[]

ClusterOperationStatus

Output only. The previous operation status.

operation_type

string

Output only. The operation type.

description

string

Output only. Short description of operation.

labels

map<string, string>

Output only. Labels associated with the operation

warnings[]

string

Output only. Errors encountered during operation execution.

ClusterOperationStatus

The status of the operation.

Fields
state

State

Output only. A message containing the operation state.

inner_state

string

Output only. A message containing the detailed operation state.

details

string

Output only. A message containing any operation metadata details.

state_start_time

Timestamp

Output only. The time this state was entered.

State

The operation state.

Enums
UNKNOWN Unused.
PENDING The operation has been created.
RUNNING The operation is running.
DONE The operation is done; either cancelled or completed.

ClusterSelector

A selector that chooses target cluster for jobs based on metadata.

Fields
zone

string

Optional. The zone where workflow process executes. This parameter does not affect the selection of the cluster.

If unspecified, the zone of the first cluster matching the selector is used.

cluster_labels

map<string, string>

Required. The cluster labels. Cluster must have all labels to match.

ClusterStatus

The status of a cluster and its instances.

Fields
state

State

Output only. The cluster's state.

detail

string

Output only. Optional details of cluster's state.

state_start_time

Timestamp

Output only. Time when this state was entered.

substate

Substate

Output only. Additional state information that includes status reported by the agent.

State

The cluster state.

Enums
UNKNOWN The cluster state is unknown.
CREATING The cluster is being created and set up. It is not ready for use.
RUNNING The cluster is currently running and healthy. It is ready for use.
ERROR The cluster encountered an error. It is not ready for use.
DELETING The cluster is being deleted. It cannot be used.
UPDATING The cluster is being updated. It continues to accept and process jobs.

Substate

The cluster substate.

Enums
UNSPECIFIED The cluster substate is unknown.
UNHEALTHY

The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).

Applies to RUNNING state.

STALE_STATUS

The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).

Applies to RUNNING state.

CreateClusterRequest

A request to create a cluster.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

Authorization requires the following Google IAM permission on the specified resource project_id:

  • dataproc.clusters.create

region

string

Required. The Cloud Dataproc region in which to handle the request.

cluster

Cluster

Required. The cluster to create.

request_id

string

Optional. A unique id used to identify the request. If the server receives two CreateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.

It is recommended to always set this value to a UUID.

The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

CreateWorkflowTemplateRequest

A request to create a workflow template.

Fields
parent

string

Required. The "resource name" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}

Authorization requires the following Google IAM permission on the specified resource parent:

  • dataproc.workflowTemplates.create

template

WorkflowTemplate

Required. The Dataproc workflow template to create.

DeleteClusterRequest

A request to delete a cluster.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

region

string

Required. The Cloud Dataproc region in which to handle the request.

cluster_name

string

Required. The cluster name.

Authorization requires the following Google IAM permission on the specified resource cluster_name:

  • dataproc.clusters.delete

cluster_uuid

string

Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist.

request_id

string

Optional. A unique id used to identify the request. If the server receives two DeleteClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.

It is recommended to always set this value to a UUID.

The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

DeleteJobRequest

A request to delete a job.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the job belongs to.

region

string

Required. The Cloud Dataproc region in which to handle the request.

job_id

string

Required. The job ID.

Authorization requires the following Google IAM permission on the specified resource job_id:

  • dataproc.jobs.delete

DeleteWorkflowTemplateRequest

A request to delete a workflow template.

Currently started workflows will remain running.

Fields
name

string

Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

Authorization requires the following Google IAM permission on the specified resource name:

  • dataproc.workflowTemplates.delete

version

int32

Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.

DiagnoseClusterRequest

A request to collect cluster diagnostic information.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

region

string

Required. The Cloud Dataproc region in which to handle the request.

cluster_name

string

Required. The cluster name.

Authorization requires the following Google IAM permission on the specified resource cluster_name:

  • dataproc.clusters.diagnose

DiagnoseClusterResults

The location of diagnostic output.

Fields
output_uri

string

Output only. The Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.

DiskConfig

Specifies the config of disk options for a group of VM instances.

Fields
boot_disk_type

string

Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive).

boot_disk_size_gb

int32

Optional. Size in GB of the boot disk (default is 500GB).

num_local_ssds

int32

Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.

EncryptionConfig

Encryption settings for the cluster.

Fields
gce_pd_kms_key_name

string

Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster.

GceClusterConfig

Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster.

Fields
zone_uri

string

Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the "global" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.

A full URL, partial URI, or short name are valid. Examples:

  • https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]
  • projects/[project_id]/zones/[zone]
  • us-central1-f

network_uri

string

Optional. The Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using Subnetworks for more information).

A full URL, partial URI, or short name are valid. Examples:

  • https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default
  • projects/[project_id]/regions/global/default
  • default

subnetwork_uri

string

Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.

A full URL, partial URI, or short name are valid. Examples:

  • https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0
  • projects/[project_id]/regions/us-east1/sub0
  • sub0

internal_ip_only

bool

Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.

service_account

string

Optional. The service account of the instances. Defaults to the default Compute Engine service account. Custom service accounts need permissions equivalent to the following IAM roles:

  • roles/logging.logWriter
  • roles/storage.objectAdmin

(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com

service_account_scopes[]

string

Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included:

If no scopes are specified, the following defaults are also provided:

tags[]

string

The Compute Engine tags to add to all instances (see Tagging instances).

metadata

map<string, string>

The Compute Engine metadata entries to add to all instances (see Project and instance metadata).

GetClusterRequest

Request to get the resource representation for a cluster in a project.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

region

string

Required. The Cloud Dataproc region in which to handle the request.

cluster_name

string

Required. The cluster name.

Authorization requires the following Google IAM permission on the specified resource cluster_name:

  • dataproc.clusters.get

GetJobRequest

A request to get the resource representation for a job in a project.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the job belongs to.

region

string

Required. The Cloud Dataproc region in which to handle the request.

job_id

string

Required. The job ID.

Authorization requires the following Google IAM permission on the specified resource job_id:

  • dataproc.jobs.get

GetWorkflowTemplateRequest

A request to fetch a workflow template.

Fields
name

string

Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

Authorization requires the following Google IAM permission on the specified resource name:

  • dataproc.workflowTemplates.get

version

int32

Optional. The version of workflow template to retrieve. Only previously instatiated versions can be retrieved.

If unspecified, retrieves the current version.

HadoopJob

A Cloud Dataproc job for running Apache Hadoop MapReduce jobs on Apache Hadoop YARN.

Fields
args[]

string

Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.

jar_file_uris[]

string

Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.

file_uris[]

string

Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.

archive_uris[]

string

Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.

properties

map<string, string>

Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.

logging_config

LoggingConfig

Optional. The runtime log config for job execution.

Union field driver. Required. Indicates the location of the driver's main class. Specify either the jar file that contains the main class or the main class name. To specify both, add the jar file to jar_file_uris, and then specify the main class name in this property. driver can be only one of the following:
main_jar_file_uri

string

The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'

main_class

string

The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.

HiveJob

A Cloud Dataproc job for running Apache Hive queries on YARN.

Fields
continue_on_failure

bool

Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.

script_variables

map<string, string>

Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name="value";).

properties

map<string, string>

Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.

jar_file_uris[]

string

Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.

Union field queries. Required. The sequence of Hive queries to execute, specified as either an HCFS file URI or a list of queries. queries can be only one of the following:
query_file_uri

string

The HCFS URI of the script that contains Hive queries.

query_list

QueryList

A list of queries.

InstanceGroupConfig

Optional. The config settings for Compute Engine resources in an instance group, such as a master or worker group.

Fields
num_instances

int32

Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.

instance_names[]

string

Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group.

image_uri

string

Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version.

machine_type_uri

string

Optional. The Compute Engine machine type used for cluster instances.

A full URL, partial URI, or short name are valid. Examples:

  • https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
  • projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
  • n1-standard-2

Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2.

disk_config

DiskConfig

Optional. Disk option config settings.

is_preemptible

bool

Optional. Specifies that this instance group contains preemptible instances.

managed_group_config

ManagedGroupConfig

Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.

accelerators[]

AcceleratorConfig

Optional. The Compute Engine accelerator configuration for these instances.

Beta Feature: This feature is still under development. It may be changed before final release.

min_cpu_platform

string

Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform.

InstantiateInlineWorkflowTemplateRequest

A request to instantiate an inline workflow template.

Fields
parent

string

Required. The "resource name" of the workflow template region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}

Authorization requires the following Google IAM permission on the specified resource parent:

  • dataproc.workflowTemplates.instantiateInline

template

WorkflowTemplate

Required. The workflow template to instantiate.

instance_id

string

Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.

It is recommended to always set this value to a UUID.

The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

InstantiateWorkflowTemplateRequest

A request to instantiate a workflow template.

Fields
name

string

Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

Authorization requires the following Google IAM permission on the specified resource name:

  • dataproc.workflowTemplates.instantiate

version

int32

Optional. The version of workflow template to instantiate. If specified, the workflow will be instantiated only if the current version of the workflow template has the supplied version.

This option cannot be used to instantiate a previous version of workflow template.

instance_id
(deprecated)

string

Deprecated. Please use request_id field instead.

request_id

string

Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.

It is recommended to always set this value to a UUID.

The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

parameters

map<string, string>

Optional. Map from parameter names to values that should be used for those parameters.

Job

A Cloud Dataproc job resource.

Fields
reference

JobReference

Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a

job_id

.

placement

JobPlacement

Required. Job information, including how, when, and where to run the job.

status

JobStatus

Output only. The job status. Additional application-specific status information may be contained in the

type_job

and

yarn_applications

fields.

status_history[]

JobStatus

Output only. The previous job status.

yarn_applications[]

YarnApplication

Output only. The collection of YARN applications spun up by this job.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

driver_output_resource_uri

string

Output only. A URI pointing to the location of the stdout of the job's driver program.

driver_control_files_uri

string

Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.

labels

map<string, string>

Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a job.

scheduling

JobScheduling

Optional. Job scheduling configuration.

Union field type_job. Required. The application/framework-specific portion of the job. type_job can be only one of the following:
hadoop_job

HadoopJob

Job is a Hadoop job.

spark_job

SparkJob

Job is a Spark job.

pyspark_job

PySparkJob

Job is a Pyspark job.

hive_job

HiveJob

Job is a Hive job.

pig_job

PigJob

Job is a Pig job.

spark_sql_job

SparkSqlJob

Job is a SparkSql job.

JobPlacement

Cloud Dataproc job config.

Fields
cluster_name

string

Required. The name of the cluster where the job will be submitted.

cluster_uuid

string

Output only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted.

JobReference

Encapsulates the full scoping used to reference a job.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the job belongs to.

job_id

string

Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.

JobScheduling

Job scheduling options.

Fields
max_failures_per_hour

int32

Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.

A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.

Maximum value is 10.

JobStatus

Cloud Dataproc job status.

Fields
state

State

Output only. A state message specifying the overall job state.

details

string

Output only. Optional job state details, such as an error description if the state is

ERROR

.

state_start_time

Timestamp

Output only. The time when this state was entered.

substate

Substate

Output only. Additional state information, which includes status reported by the agent.

State

The job state.

Enums
STATE_UNSPECIFIED The job state is unknown.
PENDING The job is pending; it has been submitted, but is not yet running.
SETUP_DONE Job has been received by the service and completed initial setup; it will soon be submitted to the cluster.
RUNNING The job is running on the cluster.
CANCEL_PENDING A CancelJob request has been received, but is pending.
CANCEL_STARTED Transient in-flight resources have been canceled, and the request to cancel the running job has been issued to the cluster.
CANCELLED The job cancellation was successful.
DONE The job has completed successfully.
ERROR The job has completed, but encountered an error.
ATTEMPT_FAILURE

Job attempt has failed. The detail field contains failure details for this attempt.

Applies to restartable jobs only.

Substate

The job substate.

Enums
UNSPECIFIED The job substate is unknown.
SUBMITTED

The Job is submitted to the agent.

Applies to RUNNING state.

QUEUED

The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the "details" field for the reason for the delay.

Applies to RUNNING state.

STALE_STATUS

The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.

Applies to RUNNING state.

LifecycleConfig

Specifies the cluster auto delete related schedule configuration.

Fields
idle_delete_ttl

Duration

Optional. The longest duration that cluster would keep alive while staying idle; passing this threshold will cause cluster to be auto-deleted.

Union field ttl. Optional. Either the exact time the cluster should be deleted at or the cluster maximum age. ttl can be only one of the following:
auto_delete_time

Timestamp

Optional. The time when cluster will be auto-deleted.

auto_delete_ttl

Duration

Optional. The life duration of cluster, the cluster will be auto-deleted at the end of this duration.

ListClustersRequest

A request to list the clusters in a project.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

Authorization requires the following Google IAM permission on the specified resource project_id:

  • dataproc.clusters.list

region

string

Required. The Cloud Dataproc region in which to handle the request.

filter

string

Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:

field = value [AND [field = value]] ...

where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.

Example filter:

status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *

page_size

int32

Optional. The standard List page size.

page_token

string

Optional. The standard List page token.

ListClustersResponse

The list of all clusters in a project.

Fields
clusters[]

Cluster

Output only. The clusters in the project.

next_page_token

string

Output only. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent

ListClustersRequest

.

ListJobsRequest

A request to list jobs in a project.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the job belongs to.

Authorization requires the following Google IAM permission on the specified resource project_id:

  • dataproc.jobs.list

region

string

Required. The Cloud Dataproc region in which to handle the request.

page_size

int32

Optional. The number of results to return in each response.

page_token

string

Optional. The page token, returned by a previous call, to request the next page of results.

cluster_name

string

Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.

job_state_matcher

JobStateMatcher

Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs).

If filter is provided, jobStateMatcher will be ignored.

filter

string

Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:

[field = value] AND [field [= value]] ...

where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.

Example filter:

status.state = ACTIVE AND labels.env = staging AND labels.starred = *

JobStateMatcher

A matcher that specifies categories of job states.

Enums
ALL Match all jobs, regardless of state.
ACTIVE Only match jobs in non-terminal states: PENDING, RUNNING, or CANCEL_PENDING.
NON_ACTIVE Only match jobs in terminal states: CANCELLED, DONE, or ERROR.

ListJobsResponse

A list of jobs in a project.

Fields
jobs[]

Job

Output only. Jobs list.

next_page_token

string

Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent

ListJobsRequest

.

ListWorkflowTemplatesRequest

A request to list workflow templates in a project.

Fields
parent

string

Required. The "resource name" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}

Authorization requires the following Google IAM permission on the specified resource parent:

  • dataproc.workflowTemplates.list

page_size

int32

Optional. The maximum number of results to return in each response.

page_token

string

Optional. The page token, returned by a previous call, to request the next page of results.

ListWorkflowTemplatesResponse

A response to a request to list workflow templates in a project.

Fields
templates[]

WorkflowTemplate

Output only. WorkflowTemplates list.

next_page_token

string

Output only. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent

ListWorkflowTemplatesRequest

.

LoggingConfig

The runtime logging config of the job.

Fields
driver_log_levels

map<string, Level>

The per-package log levels for the driver. This may include "root" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'

Level

The Log4j level for job execution. When running an Apache Hive job, Cloud Dataproc configures the Hive client to an equivalent verbosity level.

Enums
LEVEL_UNSPECIFIED Level is unspecified. Use default level for log4j.
ALL Use ALL level for log4j.
TRACE Use TRACE level for log4j.
DEBUG Use DEBUG level for log4j.
INFO Use INFO level for log4j.
WARN Use WARN level for log4j.
ERROR Use ERROR level for log4j.
FATAL Use FATAL level for log4j.
OFF Turn off log4j.

ManagedCluster

Cluster that is managed by the workflow.

Fields
cluster_name

string

Required. The cluster name prefix. A unique cluster name will be formed by appending a random suffix.

The name must contain only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must begin with a letter. Cannot begin or end with hyphen. Must consist of between 2 and 35 characters.

config

ClusterConfig

Required. The cluster configuration.

labels

map<string, string>

Optional. The labels to associate with this cluster.

Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}

Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 32 labels can be associated with a given cluster.

ManagedGroupConfig

Specifies the resources used to actively manage an instance group.

Fields
instance_template_name

string

Output only. The name of the Instance Template used for the Managed Instance Group.

instance_group_manager_name

string

Output only. The name of the Instance Group Manager for this group.

NodeInitializationAction

Specifies an executable to run on a fully configured node and a timeout period for executable completion.

Fields
executable_file

string

Required. Cloud Storage URI of executable file.

execution_timeout

Duration

Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.

OrderedJob

A job executed by the workflow.

Fields
step_id

string

Required. The step id. The id must be unique among all jobs within the template.

The step id is used as prefix for job id, as job goog-dataproc-workflow-step-id label, and in prerequisiteStepIds field from other steps.

The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.

labels

map<string, string>

Optional. The labels to associate with this job.

Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}

Label values must be between 1 and 63 characters long, and must conform to the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 32 labels can be associated with a given job.

scheduling

JobScheduling

Optional. Job scheduling configuration.

prerequisite_step_ids[]

string

Optional. The optional list of prerequisite job step_ids. If not specified, the job will start at the beginning of workflow.

Union field job_type. Required. The job definition. job_type can be only one of the following:
hadoop_job

HadoopJob

Job is a Hadoop job.

spark_job

SparkJob

Job is a Spark job.

pyspark_job

PySparkJob

Job is a Pyspark job.

hive_job

HiveJob

Job is a Hive job.

pig_job

PigJob

Job is a Pig job.

spark_sql_job

SparkSqlJob

Job is a SparkSql job.

ParameterValidation

Configuration for parameter validation.

Fields
Union field validation_type. Required. The type of validation to be performed. validation_type can be only one of the following:
regex

RegexValidation

Validation based on regular expressions.

values

ValueValidation

Validation based on a list of allowed values.

PigJob

A Cloud Dataproc job for running Apache Pig queries on YARN.

Fields
continue_on_failure

bool

Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.

script_variables

map<string, string>

Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).

properties

map<string, string>

Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.

jar_file_uris[]

string

Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.

logging_config

LoggingConfig

Optional. The runtime log config for job execution.

Union field queries. Required. The sequence of Pig queries to execute, specified as an HCFS file URI or a list of queries. queries can be only one of the following:
query_file_uri

string

The HCFS URI of the script that contains the Pig queries.

query_list

QueryList

A list of queries.

PySparkJob

A Cloud Dataproc job for running Apache PySpark applications on YARN.

Fields
main_python_file_uri

string

Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.

args[]

string

Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.

python_file_uris[]

string

Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.

jar_file_uris[]

string

Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.

file_uris[]

string

Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.

archive_uris[]

string

Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.

properties

map<string, string>

Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.

logging_config

LoggingConfig

Optional. The runtime log config for job execution.

QueryList

A list of queries to run on a cluster.

Fields
queries[]

string

Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:

"hiveJob": {
  "queryList": {
    "queries": [
      "query1",
      "query2",
      "query3;query4",
    ]
  }
}

RegexValidation

Validation based on regular expressions.

Fields
regexes[]

string

Required. RE2 regular expressions used to validate the parameter's value. The value must match the regex in its entirety (substring matches are not sufficient).

SoftwareConfig

Specifies the selection and config of software inside the cluster.

Fields
image_version

string

Optional. The version of software inside the cluster. It must be one of the supported Cloud Dataproc Versions, such as "1.2" (including a subminor version, such as "1.2.29"), or the "preview" version. If unspecified, it defaults to the latest version.

properties

map<string, string>

Optional. The properties to set on daemon config files.

Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:

  • capacity-scheduler: capacity-scheduler.xml
  • core: core-site.xml
  • distcp: distcp-default.xml
  • hdfs: hdfs-site.xml
  • hive: hive-site.xml
  • mapred: mapred-site.xml
  • pig: pig.properties
  • spark: spark-defaults.conf
  • yarn: yarn-site.xml

For more information, see Cluster properties.

SparkJob

A Cloud Dataproc job for running Apache Spark applications on YARN.

Fields
args[]

string

Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.

jar_file_uris[]

string

Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.

file_uris[]

string

Optional. HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.

archive_uris[]

string

Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.

properties

map<string, string>

Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.

logging_config

LoggingConfig

Optional. The runtime log config for job execution.

Union field driver. Required. The specification of the main method to call to drive the job. Specify either the jar file that contains the main class or the main class name. To pass both a main jar and a main class in that jar, add the jar to CommonJob.jar_file_uris, and then specify the main class name in main_class. driver can be only one of the following:
main_jar_file_uri

string

The HCFS URI of the jar file that contains the main class.

main_class

string

The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.

SparkSqlJob

A Cloud Dataproc job for running Apache Spark SQL queries.

Fields
script_variables

map<string, string>

Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name="value";).

properties

map<string, string>

Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.

jar_file_uris[]

string

Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.

logging_config

LoggingConfig

Optional. The runtime log config for job execution.

Union field queries. Required. The sequence of Spark SQL queries to execute, specified as either an HCFS file URI or as a list of queries. queries can be only one of the following:
query_file_uri

string

The HCFS URI of the script that contains SQL queries.

query_list

QueryList

A list of queries.

SubmitJobRequest

A request to submit a job.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the job belongs to.

Authorization requires one or more of the following Google IAM permissions on the specified resource project_id:

  • dataproc.jobs.create
  • dataproc.clusters.use

region

string

Required. The Cloud Dataproc region in which to handle the request.

job

Job

Required. The job resource.

request_id

string

Optional. A unique id used to identify the request. If the server receives two SubmitJobRequest requests with the same id, then the second request will be ignored and the first Job created and stored in the backend is returned.

It is recommended to always set this value to a UUID.

The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

TemplateParameter

A configurable parameter that replaces one or more fields in the template. Parameterizable fields: - Labels - File uris - Job properties - Job arguments - Script variables - Main class (in HadoopJob and SparkJob) - Zone (in ClusterSelector)

Fields
name

string

Required. Parameter name. The parameter name is used as the key, and paired with the parameter value, which are passed to the template when the template is instantiated. The name must contain only capital letters (A-Z), numbers (0-9), and underscores (_), and must not start with a number. The maximum length is 40 characters.

fields[]

string

Required. Paths to all fields that the parameter replaces. A field is allowed to appear in at most one parameter's list of field paths.

A field path is similar in syntax to a google.protobuf.FieldMask. For example, a field path that references the zone field of a workflow template's cluster selector would be specified as

placement.clusterSelector.zone

.

Also, field paths can reference fields using the following syntax:

  • Values in maps can be referenced by key. Examples
  • labels['key']
  • placement.clusterSelector.clusterLabels['key']
  • placement.managedCluster.labels['key']
  • placement.clusterSelector.clusterLabels['key']
  • jobs[step-id].labels['key']
  • Jobs in the jobs list can be referenced by step-id. Examples:

  • jobs[step-id].hadoopJob.mainJarFileUri
  • jobs[step-id].hiveJob.queryFileUri
  • jobs[step-id].pySparkJob.mainPythonFileUri
  • jobs[step-id].hadoopJob.jarFileUris[0]
  • jobs[step-id].hadoopJob.archiveUris[0]
  • jobs[step-id].hadoopJob.fileUris[0]
  • jobs[step-id].pySparkJob.pythonFileUris[0]
  • Items in repeated fields can be referenced by a zero-based index. Example:

  • jobs[step-id].sparkJob.args[0]
  • Other examples:

  • jobs[step-id].hadoopJob.properties['key']
  • jobs[step-id].hadoopJob.args[0]
  • jobs[step-id].hiveJob.scriptVariables['key']
  • jobs[step-id].hadoopJob.mainJarFileUri
  • placement.clusterSelector.zone

It may not be possible to parameterize maps and repeated fields in their entirety since only individual map values and individual items in repeated fields can be referenced. For example, the following field paths are invalid:

  • placement.clusterSelector.clusterLabels
  • jobs[step-id].sparkJob.args

description

string

Optional. Brief description of the parameter. Must not exceed 1024 characters.

validation

ParameterValidation

Optional. Validation rules to be applied to this parameter's value.

UpdateClusterRequest

A request to update a cluster.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project the cluster belongs to.

region

string

Required. The Cloud Dataproc region in which to handle the request.

cluster_name

string

Required. The cluster name.

cluster

Cluster

Required. The changes to the cluster.

Authorization requires the following Google IAM permission on the specified resource cluster:

  • dataproc.clusters.update

graceful_decommission_timeout

Duration

Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day.

Only supported on Dataproc image versions 1.2 and higher.

update_mask

FieldMask

Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:

{
  "config":{
    "workerConfig":{
      "numInstances":"5"
    }
  }
}

Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:

{
  "config":{
    "secondaryWorkerConfig":{
      "numInstances":"5"
    }
  }
}

Note: currently only the following fields can be updated:

MaskPurpose
labelsUpdates labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
config.lifecycle_config.auto_delete_ttlReset MAX TTL duration
config.lifecycle_config.auto_delete_timeUpdate MAX TTL deletion timestamp
config.lifecycle_config.idle_delete_ttlUpdate Idle TTL duration

request_id

string

Optional. A unique id used to identify the request. If the server receives two UpdateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.

It is recommended to always set this value to a UUID.

The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

UpdateJobRequest

A request to update a job.

Fields
project_id

string

Required. The ID of the Google Cloud Platform project that the job belongs to.

region

string

Required. The Cloud Dataproc region in which to handle the request.

job_id

string

Required. The job ID.

job

Job

Required. The changes to the job.

Authorization requires the following Google IAM permission on the specified resource job:

  • dataproc.jobs.update

update_mask

FieldMask

Required. Specifies the path, relative to

Job

, of the field to update. For example, to update the labels of a Job the

update_mask

parameter would be specified as

labels

, and the PATCH request body would specify the new value. Note: Currently,

labels

is the only field that can be updated.

UpdateWorkflowTemplateRequest

A request to update a workflow template.

Fields
template

WorkflowTemplate

Required. The updated workflow template.

The template.version field must match the current version.

Authorization requires the following Google IAM permission on the specified resource template:

  • dataproc.workflowTemplates.update

ValueValidation

Validation based on a list of allowed values.

Fields
values[]

string

Required. List of allowed values for the parameter.

WorkflowGraph

The workflow graph.

Fields
nodes[]

WorkflowNode

Output only. The workflow nodes.

WorkflowMetadata

A Cloud Dataproc workflow template resource.

Fields
template

string

Output only. The "resource name" of the template.

version

int32

Output only. The version of template at the time of workflow instantiation.

create_cluster

ClusterOperation

Output only. The create cluster operation metadata.

graph

WorkflowGraph

Output only. The workflow graph.

delete_cluster

ClusterOperation

Output only. The delete cluster operation metadata.

state

State

Output only. The workflow state.

cluster_name

string

Output only. The name of the managed cluster.

parameters

map<string, string>

Map from parameter names to values that were used for those parameters.

State

The operation state.

Enums
UNKNOWN Unused.
PENDING The operation has been created.
RUNNING The operation is running.
DONE The operation is done; either cancelled or completed.

WorkflowNode

The workflow node.

Fields
step_id

string

Output only. The name of the node.

prerequisite_step_ids[]

string

Output only. Node's prerequisite nodes.

job_id

string

Output only. The job id; populated after the node enters RUNNING state.

state

NodeState

Output only. The node state.

error

string

Output only. The error detail.

NodeState

The workflow node state.

Enums
NODE_STATUS_UNSPECIFIED State is unspecified.
BLOCKED The node is awaiting prerequisite node to finish.
RUNNABLE The node is runnable but not running.
RUNNING The node is running.
COMPLETED The node completed successfully.
FAILED The node failed. A node can be marked FAILED because its ancestor or peer failed.

WorkflowTemplate

A Cloud Dataproc workflow template resource.

Fields
id

string

Required. The template id.

The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.

name

string

Output only. The "resource name" of the template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

version

int32

Optional. Used to perform a consistent read-modify-write.

This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.

create_time

Timestamp

Output only. The time template was created.

update_time

Timestamp

Output only. The time template was last updated.

labels

map<string, string>

Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.

Label keys must contain 1 to 63 characters, and must conform to RFC 1035.

Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035.

No more than 32 labels can be associated with a template.

placement

WorkflowTemplatePlacement

Required. WorkflowTemplate scheduling information.

jobs[]

OrderedJob

Required. The Directed Acyclic Graph of Jobs to submit.

parameters[]

TemplateParameter

Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.

WorkflowTemplatePlacement

Specifies workflow execution target.

Either managed_cluster or cluster_selector is required.

Fields
Union field placement. Required. Specifies where workflow executes; either on a managed cluster or an existing cluster chosen by labels. placement can be only one of the following:
managed_cluster

ManagedCluster

Optional. A cluster that is managed by the workflow.

cluster_selector

ClusterSelector

Optional. A selector that chooses target cluster for jobs based on metadata.

The selector is evaluated at the time each job is submitted.

YarnApplication

A YARN application created by a job. Application information is a subset of

org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto

.

Beta Feature: This report is available for testing purposes only. It may be changed before final release.

Fields
name

string

Required. The application name.

state

State

Required. The application state.

progress

float

Required. The numerical progress of the application, from 1 to 100.

tracking_url

string

Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.

State

The application state, corresponding to

YarnProtos.YarnApplicationStateProto

.

Enums
STATE_UNSPECIFIED Status is unspecified.
NEW Status is NEW.
NEW_SAVING Status is NEW_SAVING.
SUBMITTED Status is SUBMITTED.
ACCEPTED Status is ACCEPTED.
RUNNING Status is RUNNING.
FINISHED Status is FINISHED.
FAILED Status is FAILED.
KILLED Status is KILLED.
Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Dataproc