Resource: Batch
A representation of a batch workload in the service.
JSON representation |
---|
{ "name" : string , "uuid" : string , "createTime" : string , "runtimeInfo" : { object ( |
name
string
Output only. The resource name of the batch.
uuid
string
Output only. A batch UUID (Unique Universal Identifier). The service generates this value when it creates the batch.
createTime
string (
Timestamp
format)
Output only. The time when the batch was created.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
runtimeInfo
object (
RuntimeInfo
)
Output only. Runtime information about batch execution.
state
enum (
State
)
Output only. The state of the batch.
stateTime
string (
Timestamp
format)
Output only. The time when the batch entered a current state.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
creator
string
Output only. The email address of the user who created the batch.
labels
map (key: string, value: string)
Optional. The labels to associate with this batch. Label keysmust contain 1 to 63 characters, and must conform to RFC 1035 . Label valuesmay 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 batch.
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
runtimeConfig
object (
RuntimeConfig
)
Optional. Runtime configuration for the batch execution.
environmentConfig
object (
EnvironmentConfig
)
Optional. Environment configuration for the batch execution.
operation
string
Output only. The resource name of the operation associated with this batch.
stateHistory[]
object (
StateHistory
)
Output only. Historical state information for the batch.
batch_config
. The application/framework-specific portion of the batch configuration. batch_config
can be only one of the following:pysparkBatch
object (
PySparkBatch
)
Optional. PySpark batch config.
sparkBatch
object (
SparkBatch
)
Optional. Spark batch config.
sparkRBatch
object (
SparkRBatch
)
Optional. SparkR batch config.
sparkSqlBatch
object (
SparkSqlBatch
)
Optional. SparkSql batch config.
PySparkBatch
A configuration for running an Apache PySpark batch workload.
JSON representation |
---|
{ "mainPythonFileUri" : string , "args" : [ string ] , "pythonFileUris" : [ string ] , "jarFileUris" : [ string ] , "fileUris" : [ string ] , "archiveUris" : [ string ] } |
Fields | |
---|---|
mainPythonFileUri
|
Required. The HCFS URI of the main Python file to use as the Spark driver. Must be a .py file. |
args[]
|
Optional. The arguments to pass to the driver. Do not include arguments that can be set as batch properties, such as |
pythonFileUris[]
|
Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: |
jarFileUris[]
|
Optional. HCFS URIs of jar files to add to the classpath of the Spark driver and tasks. |
fileUris[]
|
Optional. HCFS URIs of files to be placed in the working directory of each executor. |
archiveUris[]
|
Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: |
SparkBatch
A configuration for running an Apache Spark batch workload.
JSON representation |
---|
{ "args" : [ string ] , "jarFileUris" : [ string ] , "fileUris" : [ string ] , "archiveUris" : [ string ] , // Union field |
args[]
string
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.
jarFileUris[]
string
Optional. HCFS URIs of jar files to add to the classpath of the Spark driver and tasks.
fileUris[]
string
Optional. HCFS URIs of files to be placed in the working directory of each executor.
archiveUris[]
string
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
.
driver
. The specification of the main method to call to drive the Spark workload. 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 jar_file_uris
, and then specify the main class name in main_class
. driver
can be only one of the following:mainJarFileUri
string
Optional. The HCFS URI of the jar file that contains the main class.
mainClass
string
Optional. The name of the driver main class. The jar file that contains the class must be in the classpath or specified in jarFileUris
.
SparkRBatch
A configuration for running an Apache SparkR batch workload.
JSON representation |
---|
{ "mainRFileUri" : string , "args" : [ string ] , "fileUris" : [ string ] , "archiveUris" : [ string ] } |
Fields | |
---|---|
mainRFileUri
|
Required. The HCFS URI of the main R file to use as the driver. Must be a |
args[]
|
Optional. The arguments to pass to the Spark driver. Do not include arguments that can be set as batch properties, such as |
fileUris[]
|
Optional. HCFS URIs of files to be placed in the working directory of each executor. |
archiveUris[]
|
Optional. HCFS URIs of archives to be extracted into the working directory of each executor. Supported file types: |
SparkSqlBatch
A configuration for running Apache Spark SQL queries as a batch workload.
JSON representation |
---|
{ "queryFileUri" : string , "queryVariables" : { string : string , ... } , "jarFileUris" : [ string ] } |
Fields | |
---|---|
queryFileUri
|
Required. The HCFS URI of the script that contains Spark SQL queries to execute. |
queryVariables
|
Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: An object containing a list of |
jarFileUris[]
|
Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. |
State
The batch state.
Enums | |
---|---|
STATE_UNSPECIFIED
|
The batch state is unknown. |
PENDING
|
The batch is created before running. |
RUNNING
|
The batch is running. |
CANCELLING
|
The batch is cancelling. |
CANCELLED
|
The batch cancellation was successful. |
SUCCEEDED
|
The batch completed successfully. |
FAILED
|
The batch is no longer running due to an error. |
StateHistory
Historical state information.
JSON representation |
---|
{
"state"
:
enum (
|
Fields | |
---|---|
state
|
Output only. The state of the batch at this point in history. |
stateStartTime
|
Output only. The time when the batch entered the historical state. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Methods |
|
---|---|
|
Creates a batch workload that executes asynchronously. |
|
Deletes the batch workload resource. |
|
Gets the batch workload resource representation. |
|
Lists batch workloads. |