#[non_exhaustive]pub struct Job {Show 13 fields
pub reference: Option<JobReference>,
pub placement: Option<JobPlacement>,
pub status: Option<JobStatus>,
pub status_history: Vec<JobStatus>,
pub yarn_applications: Vec<YarnApplication>,
pub driver_output_resource_uri: String,
pub driver_control_files_uri: String,
pub labels: HashMap<String, String>,
pub scheduling: Option<JobScheduling>,
pub job_uuid: String,
pub done: bool,
pub driver_scheduling_config: Option<DriverSchedulingConfig>,
pub type_job: Option<TypeJob>,
/* private fields */
}Expand description
A Dataproc job resource.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.reference: Option<JobReference>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 <code>job_id</code>.
placement: Option<JobPlacement>Required. Job information, including how, when, and where to run the job.
status: Option<JobStatus>Output only. The job status. Additional application-specific status information might be contained in the <code>type_job</code> and <code>yarn_applications</code> fields.
status_history: Vec<JobStatus>Output only. The previous job status.
yarn_applications: Vec<YarnApplication>Output only. The collection of YARN applications spun up by this job.
Beta Feature: This report is available for testing purposes only. It might be changed before final release.
driver_output_resource_uri: StringOutput only. A URI pointing to the location of the stdout of the job’s driver program.
driver_control_files_uri: StringOutput only. If present, the location of miscellaneous control files
which can be used as part of job setup and handling. If not present,
control files might be placed in the same location as driver_output_uri.
labels: HashMap<String, String>Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values can 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: Option<JobScheduling>Optional. Job scheduling configuration.
job_uuid: StringOutput only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that might be reused over time.
done: boolOutput only. Indicates whether the job is completed. If the value is
false, the job is still in progress. If true, the job is completed, and
status.state field will indicate if it was successful, failed,
or cancelled.
driver_scheduling_config: Option<DriverSchedulingConfig>Optional. Driver scheduling configuration.
type_job: Option<TypeJob>Required. The application/framework-specific portion of the job.
Implementations§
Source§impl Job
impl Job
pub fn new() -> Self
Sourcepub fn set_reference<T>(self, v: T) -> Selfwhere
T: Into<JobReference>,
pub fn set_reference<T>(self, v: T) -> Selfwhere
T: Into<JobReference>,
Sets the value of reference.
Sourcepub fn set_or_clear_reference<T>(self, v: Option<T>) -> Selfwhere
T: Into<JobReference>,
pub fn set_or_clear_reference<T>(self, v: Option<T>) -> Selfwhere
T: Into<JobReference>,
Sets or clears the value of reference.
Sourcepub fn set_placement<T>(self, v: T) -> Selfwhere
T: Into<JobPlacement>,
pub fn set_placement<T>(self, v: T) -> Selfwhere
T: Into<JobPlacement>,
Sets the value of placement.
Sourcepub fn set_or_clear_placement<T>(self, v: Option<T>) -> Selfwhere
T: Into<JobPlacement>,
pub fn set_or_clear_placement<T>(self, v: Option<T>) -> Selfwhere
T: Into<JobPlacement>,
Sets or clears the value of placement.
Sourcepub fn set_status<T>(self, v: T) -> Self
pub fn set_status<T>(self, v: T) -> Self
Sets the value of status.
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
Sets or clears the value of status.
Sourcepub fn set_status_history<T, V>(self, v: T) -> Self
pub fn set_status_history<T, V>(self, v: T) -> Self
Sets the value of status_history.
Sourcepub fn set_yarn_applications<T, V>(self, v: T) -> Self
pub fn set_yarn_applications<T, V>(self, v: T) -> Self
Sets the value of yarn_applications.
Sourcepub fn set_driver_output_resource_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_driver_output_resource_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of driver_output_resource_uri.
Sourcepub fn set_driver_control_files_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_driver_control_files_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of driver_control_files_uri.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_scheduling<T>(self, v: T) -> Selfwhere
T: Into<JobScheduling>,
pub fn set_scheduling<T>(self, v: T) -> Selfwhere
T: Into<JobScheduling>,
Sets the value of scheduling.
Sourcepub fn set_or_clear_scheduling<T>(self, v: Option<T>) -> Selfwhere
T: Into<JobScheduling>,
pub fn set_or_clear_scheduling<T>(self, v: Option<T>) -> Selfwhere
T: Into<JobScheduling>,
Sets or clears the value of scheduling.
Sourcepub fn set_job_uuid<T: Into<String>>(self, v: T) -> Self
pub fn set_job_uuid<T: Into<String>>(self, v: T) -> Self
Sets the value of job_uuid.
Sourcepub fn set_driver_scheduling_config<T>(self, v: T) -> Selfwhere
T: Into<DriverSchedulingConfig>,
pub fn set_driver_scheduling_config<T>(self, v: T) -> Selfwhere
T: Into<DriverSchedulingConfig>,
Sets the value of driver_scheduling_config.
Sourcepub fn set_or_clear_driver_scheduling_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<DriverSchedulingConfig>,
pub fn set_or_clear_driver_scheduling_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<DriverSchedulingConfig>,
Sets or clears the value of driver_scheduling_config.
Sourcepub fn set_type_job<T: Into<Option<TypeJob>>>(self, v: T) -> Self
pub fn set_type_job<T: Into<Option<TypeJob>>>(self, v: T) -> Self
Sets the value of type_job.
Note that all the setters affecting type_job are mutually
exclusive.
Sourcepub fn hadoop_job(&self) -> Option<&Box<HadoopJob>>
pub fn hadoop_job(&self) -> Option<&Box<HadoopJob>>
The value of type_job
if it holds a HadoopJob, None if the field is not set or
holds a different branch.
Sourcepub fn set_hadoop_job<T: Into<Box<HadoopJob>>>(self, v: T) -> Self
pub fn set_hadoop_job<T: Into<Box<HadoopJob>>>(self, v: T) -> Self
Sets the value of type_job
to hold a HadoopJob.
Note that all the setters affecting type_job are
mutually exclusive.
Sourcepub fn spark_job(&self) -> Option<&Box<SparkJob>>
pub fn spark_job(&self) -> Option<&Box<SparkJob>>
The value of type_job
if it holds a SparkJob, None if the field is not set or
holds a different branch.
Sourcepub fn set_spark_job<T: Into<Box<SparkJob>>>(self, v: T) -> Self
pub fn set_spark_job<T: Into<Box<SparkJob>>>(self, v: T) -> Self
Sets the value of type_job
to hold a SparkJob.
Note that all the setters affecting type_job are
mutually exclusive.
Sourcepub fn pyspark_job(&self) -> Option<&Box<PySparkJob>>
pub fn pyspark_job(&self) -> Option<&Box<PySparkJob>>
The value of type_job
if it holds a PysparkJob, None if the field is not set or
holds a different branch.
Sourcepub fn set_pyspark_job<T: Into<Box<PySparkJob>>>(self, v: T) -> Self
pub fn set_pyspark_job<T: Into<Box<PySparkJob>>>(self, v: T) -> Self
Sets the value of type_job
to hold a PysparkJob.
Note that all the setters affecting type_job are
mutually exclusive.
Sourcepub fn hive_job(&self) -> Option<&Box<HiveJob>>
pub fn hive_job(&self) -> Option<&Box<HiveJob>>
The value of type_job
if it holds a HiveJob, None if the field is not set or
holds a different branch.
Sourcepub fn set_hive_job<T: Into<Box<HiveJob>>>(self, v: T) -> Self
pub fn set_hive_job<T: Into<Box<HiveJob>>>(self, v: T) -> Self
Sets the value of type_job
to hold a HiveJob.
Note that all the setters affecting type_job are
mutually exclusive.
Sourcepub fn pig_job(&self) -> Option<&Box<PigJob>>
pub fn pig_job(&self) -> Option<&Box<PigJob>>
The value of type_job
if it holds a PigJob, None if the field is not set or
holds a different branch.
Sourcepub fn set_pig_job<T: Into<Box<PigJob>>>(self, v: T) -> Self
pub fn set_pig_job<T: Into<Box<PigJob>>>(self, v: T) -> Self
Sets the value of type_job
to hold a PigJob.
Note that all the setters affecting type_job are
mutually exclusive.
Sourcepub fn spark_r_job(&self) -> Option<&Box<SparkRJob>>
pub fn spark_r_job(&self) -> Option<&Box<SparkRJob>>
The value of type_job
if it holds a SparkRJob, None if the field is not set or
holds a different branch.
Sourcepub fn set_spark_r_job<T: Into<Box<SparkRJob>>>(self, v: T) -> Self
pub fn set_spark_r_job<T: Into<Box<SparkRJob>>>(self, v: T) -> Self
Sets the value of type_job
to hold a SparkRJob.
Note that all the setters affecting type_job are
mutually exclusive.
Sourcepub fn spark_sql_job(&self) -> Option<&Box<SparkSqlJob>>
pub fn spark_sql_job(&self) -> Option<&Box<SparkSqlJob>>
The value of type_job
if it holds a SparkSqlJob, None if the field is not set or
holds a different branch.
Sourcepub fn set_spark_sql_job<T: Into<Box<SparkSqlJob>>>(self, v: T) -> Self
pub fn set_spark_sql_job<T: Into<Box<SparkSqlJob>>>(self, v: T) -> Self
Sets the value of type_job
to hold a SparkSqlJob.
Note that all the setters affecting type_job are
mutually exclusive.
Sourcepub fn presto_job(&self) -> Option<&Box<PrestoJob>>
pub fn presto_job(&self) -> Option<&Box<PrestoJob>>
The value of type_job
if it holds a PrestoJob, None if the field is not set or
holds a different branch.
Sourcepub fn set_presto_job<T: Into<Box<PrestoJob>>>(self, v: T) -> Self
pub fn set_presto_job<T: Into<Box<PrestoJob>>>(self, v: T) -> Self
Sets the value of type_job
to hold a PrestoJob.
Note that all the setters affecting type_job are
mutually exclusive.
Sourcepub fn trino_job(&self) -> Option<&Box<TrinoJob>>
pub fn trino_job(&self) -> Option<&Box<TrinoJob>>
The value of type_job
if it holds a TrinoJob, None if the field is not set or
holds a different branch.
Sourcepub fn set_trino_job<T: Into<Box<TrinoJob>>>(self, v: T) -> Self
pub fn set_trino_job<T: Into<Box<TrinoJob>>>(self, v: T) -> Self
Sets the value of type_job
to hold a TrinoJob.
Note that all the setters affecting type_job are
mutually exclusive.