Get
Returns the specified job.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetJobRequest = cloudApi.dataproc.job_service.GetJobRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.JobServiceClient);
const result = await client.get(
GetJobRequest.fromPartial({
clusterId: "clusterId",
jobId: "jobId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.dataproc.v1.job_service_pb2 import GetJobRequest
from yandex.cloud.dataproc.manager.v1.job_service_pb2_grpc import JobServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(JobServiceStub)
response = service.Get(GetJobRequest(cluster_id="clusterId", job_id="jobId"))
print(response)
GetJobRequest
clusterId
: string
ID of the cluster to request a job from.
jobId
: string
ID of the job to return.
To get a job ID make a JobService.List request.
Job
A Data Proc job. For details about the concept, see documentation.
Status
STATUS_UNSPECIFIED
PROVISIONING
Job is logged in the database and is waiting for the agent to run it.
PENDING
Job is acquired by the agent and is in the queue for execution.
RUNNING
Job is being run in the cluster.
ERROR
Job failed to finish the run properly.
DONE
Job is finished.
CANCELLED
Job is cancelled.
CANCELLING
Job is waiting for cancellation.
id
: string
ID of the job. Generated at creation time.
clusterId
: string
ID of the Data Proc cluster that the job belongs to.
createdAt
: google.protobuf.Timestamp
Creation timestamp.
startedAt
: google.protobuf.Timestamp
The time when the job was started.
finishedAt
: google.protobuf.Timestamp
The time when the job was finished.
name
: string
Name of the job, specified in the JobService.Create request.
createdBy
: string
The id of the user who created the job
status
: Status
Job status.
One of jobSpec
Specification for the job.
mapreduceJob
: MapreduceJobSpecification for a MapReduce job.
sparkJob
: SparkJobSpecification for a Spark job.
pysparkJob
: PysparkJobSpecification for a PySpark job.
hiveJob
: HiveJobSpecification for a Hive job.
applicationInfo
: ApplicationInfo
Attributes of YARN application.
MapreduceJob
args
: string
Optional arguments to pass to the driver.
jarFileUris
: string
JAR file URIs to add to CLASSPATH of the Data Proc driver and each task.
fileUris
: string
URIs of resource files to be copied to the working directory of Data Proc drivers and distributed Hadoop tasks.
archiveUris
: string
URIs of archives to be extracted to the working directory of Data Proc drivers and tasks.
properties
: string
Property names and values, used to configure Data Proc and MapReduce.
One of driver
mainJarFileUri
: stringHCFS URI of the .jar file containing the driver class.
mainClass
: stringThe name of the driver class.
SparkJob
args
: string
Optional arguments to pass to the driver.
jarFileUris
: string
JAR file URIs to add to CLASSPATH of the Data Proc driver and each task.
fileUris
: string
URIs of resource files to be copied to the working directory of Data Proc drivers and distributed Hadoop tasks.
archiveUris
: string
URIs of archives to be extracted to the working directory of Data Proc drivers and tasks.
properties
: string
Property names and values, used to configure Data Proc and Spark.
mainJarFileUri
: string
The HCFS URI of the JAR file containing the main
class for the job.
mainClass
: string
The name of the driver class.
packages
: string
List of maven coordinates of jars to include on the driver and executor classpaths.
repositories
: string
List of additional remote repositories to search for the maven coordinates given with --packages.
excludePackages
: string
List of groupId:artifactId, to exclude while resolving the dependencies provided in --packages to avoid dependency conflicts.
PysparkJob
args
: string
Optional arguments to pass to the driver.
jarFileUris
: string
JAR file URIs to add to CLASSPATH of the Data Proc driver and each task.
fileUris
: string
URIs of resource files to be copied to the working directory of Data Proc drivers and distributed Hadoop tasks.
archiveUris
: string
URIs of archives to be extracted to the working directory of Data Proc drivers and tasks.
properties
: string
Property names and values, used to configure Data Proc and PySpark.
mainPythonFileUri
: string
URI of the file with the driver code. Must be a .py file.
pythonFileUris
: string
URIs of Python files to pass to the PySpark framework.
packages
: string
List of maven coordinates of jars to include on the driver and executor classpaths.
repositories
: string
List of additional remote repositories to search for the maven coordinates given with --packages.
excludePackages
: string
List of groupId:artifactId, to exclude while resolving the dependencies provided in --packages to avoid dependency conflicts.
HiveJob
properties
: string
Property names and values, used to configure Data Proc and Hive.
continueOnFailure
: bool
Flag indicating whether a job should continue to run if a query fails.
scriptVariables
: string
Query variables and their values.
jarFileUris
: string
JAR file URIs to add to CLASSPATH of the Hive driver and each task.
One of queryType
queryFileUri
: stringURI of the script with all the necessary Hive queries.
queryList
: QueryListList of Hive queries to be used in the job.
ApplicationInfo
id
: string
ID of YARN application
applicationAttempts
: ApplicationAttempt
YARN application attempts
QueryList
queries
: string
List of Hive queries.
ApplicationAttempt
id
: string
ID of YARN application attempt
amContainerId
: string
ID of YARN Application Master container