Yandex Data Processing API, REST: Job.Create
Creates a job for a cluster.
HTTP request
POST https://dataproc.api.cloud.yandex.net/dataproc/v1/clusters/{clusterId}/jobs
Path parameters
|
Field |
Description |
|
clusterId |
string Required field. ID of the cluster to create a job for. The maximum string length in characters is 50. |
Body parameters
{
"name": "string",
// Includes only one of the fields `mapreduceJob`, `sparkJob`, `pysparkJob`, `hiveJob`
"mapreduceJob": {
"args": [
"string"
],
"jarFileUris": [
"string"
],
"fileUris": [
"string"
],
"archiveUris": [
"string"
],
"properties": "object",
// Includes only one of the fields `mainJarFileUri`, `mainClass`
"mainJarFileUri": "string",
"mainClass": "string"
// end of the list of possible fields
},
"sparkJob": {
"args": [
"string"
],
"jarFileUris": [
"string"
],
"fileUris": [
"string"
],
"archiveUris": [
"string"
],
"properties": "object",
"mainJarFileUri": "string",
"mainClass": "string",
"packages": [
"string"
],
"repositories": [
"string"
],
"excludePackages": [
"string"
]
},
"pysparkJob": {
"args": [
"string"
],
"jarFileUris": [
"string"
],
"fileUris": [
"string"
],
"archiveUris": [
"string"
],
"properties": "object",
"mainPythonFileUri": "string",
"pythonFileUris": [
"string"
],
"packages": [
"string"
],
"repositories": [
"string"
],
"excludePackages": [
"string"
]
},
"hiveJob": {
"properties": "object",
"continueOnFailure": "boolean",
"scriptVariables": "object",
"jarFileUris": [
"string"
],
// Includes only one of the fields `queryFileUri`, `queryList`
"queryFileUri": "string",
"queryList": {
"queries": [
"string"
]
}
// end of the list of possible fields
}
// end of the list of possible fields
}
|
Field |
Description |
|
name |
string Name of the job. The string length in characters must be less than 256. Value must match the regular expression |
|
mapreduceJob |
Specification for a MapReduce job. Includes only one of the fields Specification for the job. |
|
sparkJob |
Specification for a Spark job. Includes only one of the fields Specification for the job. |
|
pysparkJob |
Specification for a PySpark job. Includes only one of the fields Specification for the job. |
|
hiveJob |
Specification for a Hive job. Includes only one of the fields Specification for the job. |
MapreduceJob
|
Field |
Description |
|
args[] |
string Optional arguments to pass to the driver. The maximum string length in characters for each value is 1024. The maximum number of elements is 32. |
|
jarFileUris[] |
string JAR file URIs to add to CLASSPATH of the Yandex Data Processing driver and each task. The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
fileUris[] |
string URIs of resource files to be copied to the working directory of Yandex Data Processing drivers The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
archiveUris[] |
string URIs of archives to be extracted to the working directory of Yandex Data Processing drivers and tasks. The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
properties |
object (map<string, string>) Property names and values, used to configure Yandex Data Processing and MapReduce. The maximum string length in characters for each value is 256. The string length in characters for each key must be 1-128. Each key must match the regular expression |
|
mainJarFileUri |
string HCFS URI of the .jar file containing the driver class. The string length in characters must be less than 2048. Includes only one of the fields |
|
mainClass |
string The name of the driver class. The string length in characters must be less than 256. Includes only one of the fields |
SparkJob
|
Field |
Description |
|
args[] |
string Optional arguments to pass to the driver. The maximum string length in characters for each value is 10000. The maximum number of elements is 256. |
|
jarFileUris[] |
string JAR file URIs to add to CLASSPATH of the Yandex Data Processing driver and each task. The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
fileUris[] |
string URIs of resource files to be copied to the working directory of Yandex Data Processing drivers The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
archiveUris[] |
string URIs of archives to be extracted to the working directory of Yandex Data Processing drivers and tasks. The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
properties |
object (map<string, string>) Property names and values, used to configure Yandex Data Processing and Spark. The maximum string length in characters for each value is 256. The string length in characters for each key must be 1-128. Each key must match the regular expression |
|
mainJarFileUri |
string Required field. The HCFS URI of the JAR file containing the The string length in characters must be less than 2048. |
|
mainClass |
string The name of the driver class. The string length in characters must be less than 256. |
|
packages[] |
string List of maven coordinates of jars to include on the driver and executor classpaths. The string length in characters for each value must be less than 256. The maximum number of elements is 100. |
|
repositories[] |
string List of additional remote repositories to search for the maven coordinates given with --packages. The string length in characters for each value must be less than 2048. The maximum number of elements is 10. |
|
excludePackages[] |
string List of groupId:artifactId, to exclude while resolving the dependencies provided in --packages to avoid dependency conflicts. The string length in characters for each value must be less than 256. The maximum number of elements is 100. |
PysparkJob
|
Field |
Description |
|
args[] |
string Optional arguments to pass to the driver. The maximum string length in characters for each value is 100000. The maximum number of elements is 2500. |
|
jarFileUris[] |
string JAR file URIs to add to CLASSPATH of the Yandex Data Processing driver and each task. The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
fileUris[] |
string URIs of resource files to be copied to the working directory of Yandex Data Processing drivers The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
archiveUris[] |
string URIs of archives to be extracted to the working directory of Yandex Data Processing drivers and tasks. The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
properties |
object (map<string, string>) Property names and values, used to configure Yandex Data Processing and PySpark. The maximum string length in characters for each value is 10000. The string length in characters for each key must be 1-128. Each key must match the regular expression |
|
mainPythonFileUri |
string Required field. URI of the file with the driver code. Must be a .py file. The string length in characters must be less than 2048. |
|
pythonFileUris[] |
string URIs of Python files to pass to the PySpark framework. The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
packages[] |
string List of maven coordinates of jars to include on the driver and executor classpaths. The string length in characters for each value must be less than 256. The maximum number of elements is 100. |
|
repositories[] |
string List of additional remote repositories to search for the maven coordinates given with --packages. The string length in characters for each value must be less than 2048. The maximum number of elements is 10. |
|
excludePackages[] |
string List of groupId:artifactId, to exclude while resolving the dependencies provided in --packages to avoid dependency conflicts. The string length in characters for each value must be less than 256. The maximum number of elements is 100. |
HiveJob
|
Field |
Description |
|
properties |
object (map<string, string>) Property names and values, used to configure Yandex Data Processing and Hive. The maximum string length in characters for each value is 256. The string length in characters for each key must be 1-128. Each key must match the regular expression |
|
continueOnFailure |
boolean Flag indicating whether a job should continue to run if a query fails. |
|
scriptVariables |
object (map<string, string>) Query variables and their values. The maximum string length in characters for each value is 2048. The string length in characters for each key must be 1-128. Each key must match the regular expression |
|
jarFileUris[] |
string JAR file URIs to add to CLASSPATH of the Hive driver and each task. The string length in characters for each value must be less than 2048. The maximum number of elements is 100. |
|
queryFileUri |
string URI of the script with all the necessary Hive queries. The string length in characters must be less than 2048. Includes only one of the fields |
|
queryList |
List of Hive queries to be used in the job. Includes only one of the fields |
QueryList
|
Field |
Description |
|
queries[] |
string List of Hive queries. The string length in characters for each value must be less than 10240. The maximum number of elements is 100. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": "object",
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object"
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
object Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
object The normal response of the operation in case of success. Includes only one of the fields The operation result. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |