Reference documentation and code samples for the Google Cloud Dataproc V1 Client class SparkBatch.
A configuration for running anApache Sparkbatch workload.
Generated from protobuf messagegoogle.cloud.dataproc.v1.SparkBatch
Namespace
Google \ Cloud \ Dataproc \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ main_jar_file_uri
string
Optional. The HCFS URI of the jar file that contains the main class.
↳ main_class
string
Optional. The name of the driver main class. The jar file that contains the class must be in the classpath or specified injar_file_uris.
↳ args
array
Optional. The arguments to pass to the driver. Do not include arguments that can be set as batch properties, such as--conf, since a collision can occur that causes an incorrect batch submission.
↳ jar_file_uris
array
Optional. HCFS URIs of jar files to add to the classpath of the Spark driver and tasks.
↳ file_uris
array
Optional. HCFS URIs of files to be placed in the working directory of each executor.
↳ archive_uris
array
Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types:.jar,.tar,.tar.gz,.tgz, and.zip.
getMainJarFileUri
Optional. The HCFS URI of the jar file that contains the main class.
Returns
Type
Description
string
hasMainJarFileUri
setMainJarFileUri
Optional. The HCFS URI of the jar file that contains the main class.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getMainClass
Optional. The name of the driver main class. The jar file that contains
the class must be in the classpath or specified injar_file_uris.
Returns
Type
Description
string
hasMainClass
setMainClass
Optional. The name of the driver main class. The jar file that contains
the class must be in the classpath or specified injar_file_uris.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getArgs
Optional. The arguments to pass to the driver. Do not include arguments
that can be set as batch properties, such as--conf, since a collision
can occur that causes an incorrect batch submission.
Optional. The arguments to pass to the driver. Do not include arguments
that can be set as batch properties, such as--conf, since a collision
can occur that causes an incorrect batch submission.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getJarFileUris
Optional. HCFS URIs of jar files to add to the classpath of the
Spark driver and tasks.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dataproc V1 Client - Class SparkBatch (3.14.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.14.0 (latest)](/php/docs/reference/cloud-dataproc/latest/V1.SparkBatch)\n- [3.13.4](/php/docs/reference/cloud-dataproc/3.13.4/V1.SparkBatch)\n- [3.12.0](/php/docs/reference/cloud-dataproc/3.12.0/V1.SparkBatch)\n- [3.11.0](/php/docs/reference/cloud-dataproc/3.11.0/V1.SparkBatch)\n- [3.10.1](/php/docs/reference/cloud-dataproc/3.10.1/V1.SparkBatch)\n- [3.9.0](/php/docs/reference/cloud-dataproc/3.9.0/V1.SparkBatch)\n- [3.8.1](/php/docs/reference/cloud-dataproc/3.8.1/V1.SparkBatch)\n- [3.7.1](/php/docs/reference/cloud-dataproc/3.7.1/V1.SparkBatch)\n- [3.6.1](/php/docs/reference/cloud-dataproc/3.6.1/V1.SparkBatch)\n- [3.5.1](/php/docs/reference/cloud-dataproc/3.5.1/V1.SparkBatch)\n- [3.4.0](/php/docs/reference/cloud-dataproc/3.4.0/V1.SparkBatch)\n- [3.3.0](/php/docs/reference/cloud-dataproc/3.3.0/V1.SparkBatch)\n- [3.2.2](/php/docs/reference/cloud-dataproc/3.2.2/V1.SparkBatch)\n- [2.6.1](/php/docs/reference/cloud-dataproc/2.6.1/V1.SparkBatch)\n- [2.5.0](/php/docs/reference/cloud-dataproc/2.5.0/V1.SparkBatch)\n- [2.3.0](/php/docs/reference/cloud-dataproc/2.3.0/V1.SparkBatch)\n- [2.2.3](/php/docs/reference/cloud-dataproc/2.2.3/V1.SparkBatch)\n- [2.1.0](/php/docs/reference/cloud-dataproc/2.1.0/V1.SparkBatch)\n- [2.0.0](/php/docs/reference/cloud-dataproc/2.0.0/V1.SparkBatch) \nReference documentation and code samples for the Google Cloud Dataproc V1 Client class SparkBatch.\n\nA configuration for running an [Apache Spark](https://spark.apache.org/)\nbatch workload.\n\nGenerated from protobuf message `google.cloud.dataproc.v1.SparkBatch`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dataproc \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getMainJarFileUri\n\nOptional. The HCFS URI of the jar file that contains the main class.\n\n### hasMainJarFileUri\n\n### setMainJarFileUri\n\nOptional. The HCFS URI of the jar file that contains the main class.\n\n### getMainClass\n\nOptional. The name of the driver main class. The jar file that contains\nthe class must be in the classpath or specified in `jar_file_uris`.\n\n### hasMainClass\n\n### setMainClass\n\nOptional. The name of the driver main class. The jar file that contains\nthe class must be in the classpath or specified in `jar_file_uris`.\n\n### getArgs\n\nOptional. The arguments to pass to the driver. Do not include arguments\nthat can be set as batch properties, such as `--conf`, since a collision\ncan occur that causes an incorrect batch submission.\n\n### setArgs\n\nOptional. The arguments to pass to the driver. Do not include arguments\nthat can be set as batch properties, such as `--conf`, since a collision\ncan occur that causes an incorrect batch submission.\n\n### getJarFileUris\n\nOptional. HCFS URIs of jar files to add to the classpath of the\nSpark driver and tasks.\n\n### setJarFileUris\n\nOptional. HCFS URIs of jar files to add to the classpath of the\nSpark driver and tasks.\n\n### getFileUris\n\nOptional. HCFS URIs of files to be placed in the working directory of\neach executor.\n\n### setFileUris\n\nOptional. HCFS URIs of files to be placed in the working directory of\neach executor.\n\n### getArchiveUris\n\nOptional. HCFS URIs of archives to be extracted into the working directory\nof each executor. Supported file types:\n`.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.\n\n### setArchiveUris\n\nOptional. HCFS URIs of archives to be extracted into the working directory\nof each executor. Supported file types:\n`.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.\n\n### getDriver"]]