Job

Struct Job 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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: String

Output only. A URI pointing to the location of the stdout of the job’s driver program.

§driver_control_files_uri: String

Output 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: String

Output 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: bool

Output 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

Source

pub fn new() -> Self

Source

pub fn set_reference<T>(self, v: T) -> Self
where T: Into<JobReference>,

Sets the value of reference.

Source

pub fn set_or_clear_reference<T>(self, v: Option<T>) -> Self
where T: Into<JobReference>,

Sets or clears the value of reference.

Source

pub fn set_placement<T>(self, v: T) -> Self
where T: Into<JobPlacement>,

Sets the value of placement.

Source

pub fn set_or_clear_placement<T>(self, v: Option<T>) -> Self
where T: Into<JobPlacement>,

Sets or clears the value of placement.

Source

pub fn set_status<T>(self, v: T) -> Self
where T: Into<JobStatus>,

Sets the value of status.

Source

pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
where T: Into<JobStatus>,

Sets or clears the value of status.

Source

pub fn set_status_history<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<JobStatus>,

Sets the value of status_history.

Source

pub fn set_yarn_applications<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<YarnApplication>,

Sets the value of yarn_applications.

Source

pub fn set_driver_output_resource_uri<T: Into<String>>(self, v: T) -> Self

Sets the value of driver_output_resource_uri.

Source

pub fn set_driver_control_files_uri<T: Into<String>>(self, v: T) -> Self

Sets the value of driver_control_files_uri.

Source

pub fn set_labels<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of labels.

Source

pub fn set_scheduling<T>(self, v: T) -> Self
where T: Into<JobScheduling>,

Sets the value of scheduling.

Source

pub fn set_or_clear_scheduling<T>(self, v: Option<T>) -> Self
where T: Into<JobScheduling>,

Sets or clears the value of scheduling.

Source

pub fn set_job_uuid<T: Into<String>>(self, v: T) -> Self

Sets the value of job_uuid.

Source

pub fn set_done<T: Into<bool>>(self, v: T) -> Self

Sets the value of done.

Source

pub fn set_driver_scheduling_config<T>(self, v: T) -> Self

Sets the value of driver_scheduling_config.

Source

pub fn set_or_clear_driver_scheduling_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of driver_scheduling_config.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

The value of type_job if it holds a FlinkJob, None if the field is not set or holds a different branch.

Sets the value of type_job to hold a FlinkJob.

Note that all the setters affecting type_job are mutually exclusive.

Trait Implementations§

Source§

impl Clone for Job

Source§

fn clone(&self) -> Job

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Job

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Job

Source§

fn default() -> Job

Returns the “default value” for a type. Read more
Source§

impl Message for Job

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Job

Source§

fn eq(&self, other: &Job) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Job

Auto Trait Implementations§

§

impl Freeze for Job

§

impl RefUnwindSafe for Job

§

impl Send for Job

§

impl Sync for Job

§

impl Unpin for Job

§

impl UnwindSafe for Job

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,