Enumerations

JobStateMatcher

static

number

A matcher that specifies categories of job states.

Value

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.

Level

static

number

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

Value

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.

State

static

number

The application state, corresponding to YarnProtos.YarnApplicationStateProto.

Value

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.

State

static

number

The cluster state.

Value

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.

State

static

number

The job state.

Value

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

static

number

Value

UNSPECIFIED

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.

Substate

static

number

Value

UNSPECIFIED

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.

Properties

JobStateMatcher

static

number

A matcher that specifies categories of job states.

Value

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.

Level

static

number

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

Value

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.

State

static

number

The application state, corresponding to YarnProtos.YarnApplicationStateProto.

Value

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.

State

static

number

The cluster state.

Value

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.

State

static

number

The job state.

Value

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

static

number

Value

UNSPECIFIED

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.

Substate

static

number

Value

UNSPECIFIED

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.

Abstract types

AcceleratorConfig

static

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

Properties

Parameter

acceleratorTypeUri

string

Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes

Examples

acceleratorCount

number

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

See also

google.cloud.dataproc.v1.AcceleratorConfig definition in proto format

CancelJobRequest

static

A request to cancel a job.

Properties

Parameter

projectId

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.

jobId

string

Required. The job ID.

See also

google.cloud.dataproc.v1.CancelJobRequest definition in proto format

Cluster

static

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

Properties

Parameter

projectId

string

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

clusterName

string

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

config

Object

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

This object should have the same structure as ClusterConfig

labels

Object with string properties

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

Object

Output-only. Cluster status.

This object should have the same structure as ClusterStatus

statusHistory

Array of Object

Output-only. The previous cluster status.

This object should have the same structure as ClusterStatus

clusterUuid

string

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

metrics

Object

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.

This object should have the same structure as ClusterMetrics

See also

google.cloud.dataproc.v1.Cluster definition in proto format

ClusterConfig

static

The cluster config.

Properties

Parameter

configBucket

string

Optional. A Google 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.

gceClusterConfig

Object

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

This object should have the same structure as GceClusterConfig

masterConfig

Object

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

This object should have the same structure as InstanceGroupConfig

workerConfig

Object

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

This object should have the same structure as InstanceGroupConfig

secondaryWorkerConfig

Object

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

This object should have the same structure as InstanceGroupConfig

softwareConfig

Object

Optional. The config settings for software inside the cluster.

This object should have the same structure as SoftwareConfig

initializationActions

Array of Object

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/v1/instance/attributes/dataproc-role)
  if [[ "${ROLE}" == 'Master' ]]; then
    ... master specific actions ...
  else
    ... worker specific actions ...
  fi

This object should have the same structure as NodeInitializationAction

See also

google.cloud.dataproc.v1.ClusterConfig definition in proto format

ClusterMetrics

static

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.

Properties

Parameter

hdfsMetrics

Object with number properties

The HDFS metrics.

yarnMetrics

Object with number properties

The YARN metrics.

See also

google.cloud.dataproc.v1.ClusterMetrics definition in proto format

ClusterStatus

static

The status of a cluster and its instances.

Properties

Parameter

state

number

Output-only. The cluster's state.

The number should be among the values of State

detail

string

Output-only. Optional details of cluster's state.

stateStartTime

Object

Output-only. Time when this state was entered.

This object should have the same structure as Timestamp

substate

number

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

The number should be among the values of Substate

See also

google.cloud.dataproc.v1.ClusterStatus definition in proto format

CreateClusterRequest

static

A request to create a cluster.

Properties

Parameter

projectId

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

Object

Required. The cluster to create.

This object should have the same structure as Cluster

See also

google.cloud.dataproc.v1.CreateClusterRequest definition in proto format

DeleteClusterRequest

static

A request to delete a cluster.

Properties

Parameter

projectId

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.

clusterName

string

Required. The cluster name.

See also

google.cloud.dataproc.v1.DeleteClusterRequest definition in proto format

DeleteJobRequest

static

A request to delete a job.

Properties

Parameter

projectId

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.

jobId

string

Required. The job ID.

See also

google.cloud.dataproc.v1.DeleteJobRequest definition in proto format

DiagnoseClusterRequest

static

A request to collect cluster diagnostic information.

Properties

Parameter

projectId

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.

clusterName

string

Required. The cluster name.

See also

google.cloud.dataproc.v1.DiagnoseClusterRequest definition in proto format

DiagnoseClusterResults

static

The location of diagnostic output.

Property

Parameter

outputUri

string

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

See also

google.cloud.dataproc.v1.DiagnoseClusterResults definition in proto format

DiskConfig

static

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

Properties

Parameter

bootDiskSizeGb

number

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

numLocalSsds

number

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.

See also

google.cloud.dataproc.v1.DiskConfig definition in proto format

GceClusterConfig

static

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

Properties

Parameter

zoneUri

string

Optional. The zone where the Google 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:

networkUri

string

Optional. The Google 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:

subnetworkUri

string

Optional. The Google 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:

internalIpOnly

boolean

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.

serviceAccount

string

Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing 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

serviceAccountScopes

Array of string

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

tags

Array of string

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

metadata

Object with string properties

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

See also

google.cloud.dataproc.v1.GceClusterConfig definition in proto format

GetClusterRequest

static

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

Properties

Parameter

projectId

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.

clusterName

string

Required. The cluster name.

See also

google.cloud.dataproc.v1.GetClusterRequest definition in proto format

GetJobRequest

static

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

Properties

Parameter

projectId

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.

jobId

string

Required. The job ID.

See also

google.cloud.dataproc.v1.GetJobRequest definition in proto format

HadoopJob

static

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

Properties

Parameter

mainJarFileUri

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'

mainClass

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.

args

Array of 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.

jarFileUris

Array of string

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

fileUris

Array of 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.

archiveUris

Array of 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

Object with string properties

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.

loggingConfig

Object

Optional. The runtime log config for job execution.

This object should have the same structure as LoggingConfig

See also

google.cloud.dataproc.v1.HadoopJob definition in proto format

HiveJob

static

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

Properties

Parameter

queryFileUri

string

The HCFS URI of the script that contains Hive queries.

queryList

Object

A list of queries.

This object should have the same structure as QueryList

continueOnFailure

boolean

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.

scriptVariables

Object with string properties

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

properties

Object with string properties

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.

jarFileUris

Array of 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.

See also

google.cloud.dataproc.v1.HiveJob definition in proto format

InstanceGroupConfig

static

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

Properties

Parameter

numInstances

number

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

instanceNames

Array of string

Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).

imageUri

string

Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.

machineTypeUri

string

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

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

diskConfig

Object

Optional. Disk option config settings.

This object should have the same structure as DiskConfig

isPreemptible

boolean

Optional. Specifies that this instance group contains preemptible instances.

managedGroupConfig

Object

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

This object should have the same structure as ManagedGroupConfig

accelerators

Array of Object

Optional. The Google Compute Engine accelerator configuration for these instances.

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

This object should have the same structure as AcceleratorConfig

See also

google.cloud.dataproc.v1.InstanceGroupConfig definition in proto format

Job

static

A Cloud Dataproc job resource.

Properties

Parameter

reference

Object

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.

This object should have the same structure as JobReference

placement

Object

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

This object should have the same structure as JobPlacement

hadoopJob

Object

Job is a Hadoop job.

This object should have the same structure as HadoopJob

sparkJob

Object

Job is a Spark job.

This object should have the same structure as SparkJob

pysparkJob

Object

Job is a Pyspark job.

This object should have the same structure as PySparkJob

hiveJob

Object

Job is a Hive job.

This object should have the same structure as HiveJob

pigJob

Object

Job is a Pig job.

This object should have the same structure as PigJob

sparkSqlJob

Object

Job is a SparkSql job.

This object should have the same structure as SparkSqlJob

status

Object

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

This object should have the same structure as JobStatus

statusHistory

Array of Object

Output-only. The previous job status.

This object should have the same structure as JobStatus

yarnApplications

Array of Object

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.

This object should have the same structure as YarnApplication

driverOutputResourceUri

string

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

driverControlFilesUri

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

Object with string properties

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

Object

Optional. Job scheduling configuration.

This object should have the same structure as JobScheduling

See also

google.cloud.dataproc.v1.Job definition in proto format

JobPlacement

static

Cloud Dataproc job config.

Properties

Parameter

clusterName

string

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

clusterUuid

string

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

See also

google.cloud.dataproc.v1.JobPlacement definition in proto format

JobReference

static

Encapsulates the full scoping used to reference a job.

Properties

Parameter

projectId

string

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

jobId

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.

See also

google.cloud.dataproc.v1.JobReference definition in proto format

JobScheduling

static

Job scheduling options.

Beta Feature: These options are available for testing purposes only. They may be changed before final release.

Property

Parameter

maxFailuresPerHour

number

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.

See also

google.cloud.dataproc.v1.JobScheduling definition in proto format

JobStatus

static

Cloud Dataproc job status.

Properties

Parameter

state

number

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

The number should be among the values of State

details

string

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

stateStartTime

Object

Output-only. The time when this state was entered.

This object should have the same structure as Timestamp

substate

number

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

The number should be among the values of Substate

See also

google.cloud.dataproc.v1.JobStatus definition in proto format

ListClustersRequest

static

A request to list the clusters in a project.

Properties

Parameter

projectId

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.

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 =

pageSize

number

Optional. The standard List page size.

pageToken

string

Optional. The standard List page token.

See also

google.cloud.dataproc.v1.ListClustersRequest definition in proto format

ListClustersResponse

static

The list of all clusters in a project.

Properties

Parameter

clusters

Array of Object

Output-only. The clusters in the project.

This object should have the same structure as Cluster

nextPageToken

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.

See also

google.cloud.dataproc.v1.ListClustersResponse definition in proto format

ListJobsRequest

static

A request to list jobs in a project.

Properties

Parameter

projectId

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.

pageSize

number

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

pageToken

string

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

clusterName

string

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

jobStateMatcher

number

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

If filter is provided, jobStateMatcher will be ignored.

The number should be among the values of JobStateMatcher

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 =

See also

google.cloud.dataproc.v1.ListJobsRequest definition in proto format

ListJobsResponse

static

A list of jobs in a project.

Properties

Parameter

jobs

Array of Object

Output-only. Jobs list.

This object should have the same structure as Job

nextPageToken

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.

See also

google.cloud.dataproc.v1.ListJobsResponse definition in proto format

LoggingConfig

static

The runtime logging config of the job.

Property

Parameter

driverLogLevels

Object with number properties

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'

See also

google.cloud.dataproc.v1.LoggingConfig definition in proto format

ManagedGroupConfig

static

Specifies the resources used to actively manage an instance group.

Properties

Parameter

instanceTemplateName

string

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

instanceGroupManagerName

string

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

See also

google.cloud.dataproc.v1.ManagedGroupConfig definition in proto format

NodeInitializationAction

static

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

Properties

Parameter

executableFile

string

Required. Google Cloud Storage URI of executable file.

executionTimeout

Object

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.

This object should have the same structure as Duration

See also

google.cloud.dataproc.v1.NodeInitializationAction definition in proto format

PigJob

static

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

Properties

Parameter

queryFileUri

string

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

queryList

Object

A list of queries.

This object should have the same structure as QueryList

continueOnFailure

boolean

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.

scriptVariables

Object with string properties

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

properties

Object with string properties

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.

jarFileUris

Array of 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.

loggingConfig

Object

Optional. The runtime log config for job execution.

This object should have the same structure as LoggingConfig

See also

google.cloud.dataproc.v1.PigJob definition in proto format

PySparkJob

static

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

Properties

Parameter

mainPythonFileUri

string

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

args

Array of 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.

pythonFileUris

Array of string

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

jarFileUris

Array of string

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

fileUris

Array of string

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

archiveUris

Array of string

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

properties

Object with string properties

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.

loggingConfig

Object

Optional. The runtime log config for job execution.

This object should have the same structure as LoggingConfig

See also

google.cloud.dataproc.v1.PySparkJob definition in proto format

QueryList

static

A list of queries to run on a cluster.

Property

Parameter

queries

Array of 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",
      ]
    }
  }
See also

google.cloud.dataproc.v1.QueryList definition in proto format

SoftwareConfig

static

Specifies the selection and config of software inside the cluster.

Properties

Parameter

imageVersion

string

Optional. The version of software inside the cluster. It must match the regular expression [0-9]+.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).

properties

Object with string properties

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.

See also

google.cloud.dataproc.v1.SoftwareConfig definition in proto format

SparkJob

static

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

Properties

Parameter

mainJarFileUri

string

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

mainClass

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.

args

Array of 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.

jarFileUris

Array of string

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

fileUris

Array of string

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

archiveUris

Array of 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

Object with string properties

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.

loggingConfig

Object

Optional. The runtime log config for job execution.

This object should have the same structure as LoggingConfig

See also

google.cloud.dataproc.v1.SparkJob definition in proto format

SparkSqlJob

static

A Cloud Dataproc job for running Apache Spark SQL queries.

Properties

Parameter

queryFileUri

string

The HCFS URI of the script that contains SQL queries.

queryList

Object

A list of queries.

This object should have the same structure as QueryList

scriptVariables

Object with string properties

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

properties

Object with string properties

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.

jarFileUris

Array of string

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

loggingConfig

Object

Optional. The runtime log config for job execution.

This object should have the same structure as LoggingConfig

See also

google.cloud.dataproc.v1.SparkSqlJob definition in proto format

SubmitJobRequest

static

A request to submit a job.

Properties

Parameter

projectId

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

Object

Required. The job resource.

This object should have the same structure as Job

See also

google.cloud.dataproc.v1.SubmitJobRequest definition in proto format

UpdateClusterRequest

static

A request to update a cluster.

Properties

Parameter

projectId

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.

clusterName

string

Required. The cluster name.

cluster

Object

Required. The changes to the cluster.

This object should have the same structure as Cluster

updateMask

Object

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:

Mask Purpose
labels Update labels
config.worker_config.num_instances Resize primary worker group
config.secondary_worker_config.num_instances Resize secondary worker group

This object should have the same structure as FieldMask

See also

google.cloud.dataproc.v1.UpdateClusterRequest definition in proto format

UpdateJobRequest

static

A request to update a job.

Properties

Parameter

projectId

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.

jobId

string

Required. The job ID.

job

Object

Required. The changes to the job.

This object should have the same structure as Job

updateMask

Object

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.

This object should have the same structure as FieldMask

See also

google.cloud.dataproc.v1.UpdateJobRequest definition in proto format

YarnApplication

static

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.

Properties

Parameter

name

string

Required. The application name.

state

number

Required. The application state.

The number should be among the values of State

progress

number

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

trackingUrl

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.

See also

google.cloud.dataproc.v1.YarnApplication definition in proto format